Andrew Geissler | 15ad111 | 2021-01-08 16:09:43 -0600 | [diff] [blame] | 1 | From 314fbde187e9187b1b3e18e50dd937c070e93633 Mon Sep 17 00:00:00 2001 |
| 2 | From: Trevor Woerner <twoerner@gmail.com> |
| 3 | Date: Fri, 4 Dec 2020 01:58:59 -0500 |
| 4 | Subject: [PATCH] switch to "pkg-config" |
| 5 | |
| 6 | I get a build error saying: |
| 7 | |
| 8 | ERROR: /usr/bin/libpng16-config should not be used, use an alternative such as pkg-config |
| 9 | |
| 10 | Therefore switch to the more common and more generic "pkg-config" instead of |
| 11 | using a libpng-specific tool for flags and libraries. |
| 12 | |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 13 | Upstream-Status: Submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] |
Andrew Geissler | 15ad111 | 2021-01-08 16:09:43 -0600 | [diff] [blame] | 14 | Signed-off-by: Trevor Woerner <twoerner@gmail.com> |
| 15 | --- |
| 16 | game/Makefile | 4 ++-- |
| 17 | lib/Makefile | 4 ++-- |
| 18 | mandelbrot/Makefile | 4 ++-- |
| 19 | offscreen/Makefile | 4 ++-- |
| 20 | pngview/Makefile | 4 ++-- |
| 21 | spriteview/Makefile | 4 ++-- |
| 22 | 6 files changed, 12 insertions(+), 12 deletions(-) |
| 23 | |
| 24 | diff --git a/game/Makefile b/game/Makefile |
| 25 | index 6da6a6d..0a90a38 100644 |
| 26 | --- a/game/Makefile |
| 27 | +++ b/game/Makefile |
| 28 | @@ -1,8 +1,8 @@ |
| 29 | OBJS=main.o |
| 30 | BIN=game |
| 31 | |
| 32 | -CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) |
| 33 | -LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng |
| 34 | +CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) |
| 35 | +LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng |
| 36 | |
| 37 | INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux |
| 38 | |
| 39 | diff --git a/lib/Makefile b/lib/Makefile |
| 40 | index 2765c91..1e8c759 100644 |
| 41 | --- a/lib/Makefile |
| 42 | +++ b/lib/Makefile |
| 43 | @@ -11,9 +11,9 @@ OBJS=../common/backgroundLayer.o ../common/imageGraphics.o ../common/key.o \ |
| 44 | |
| 45 | OBJSPNG=../common/spriteLayer.o ../common/loadpng.o ../common/savepng.o ../common/scrollingLayer.o |
| 46 | |
| 47 | -CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) |
| 48 | +CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) |
| 49 | LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm |
| 50 | -LDFLAGSPNG=${LDFLAGS} $(shell libpng-config --ldflags) |
| 51 | +LDFLAGSPNG=${LDFLAGS} $(shell pkg-config --libs libpng) |
| 52 | |
| 53 | INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux |
| 54 | |
| 55 | diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile |
| 56 | index a6e6735..82910bb 100644 |
| 57 | --- a/mandelbrot/Makefile |
| 58 | +++ b/mandelbrot/Makefile |
| 59 | @@ -1,8 +1,8 @@ |
| 60 | OBJS=main.o mandelbrot.o info.o |
| 61 | BIN=mandelbrot |
| 62 | |
| 63 | -CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) |
| 64 | -LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng |
| 65 | +CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) |
| 66 | +LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng |
| 67 | |
| 68 | INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux |
| 69 | |
| 70 | diff --git a/offscreen/Makefile b/offscreen/Makefile |
| 71 | index 8d23354..0120796 100644 |
| 72 | --- a/offscreen/Makefile |
| 73 | +++ b/offscreen/Makefile |
| 74 | @@ -1,8 +1,8 @@ |
| 75 | OBJS=pngresize.o resizeDispmanX.o |
| 76 | BIN=pngresize |
| 77 | |
| 78 | -CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) |
| 79 | -LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng |
| 80 | +CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) |
| 81 | +LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng |
| 82 | |
| 83 | INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux |
| 84 | |
| 85 | diff --git a/pngview/Makefile b/pngview/Makefile |
| 86 | index 8c037ec..71a5d76 100644 |
| 87 | --- a/pngview/Makefile |
| 88 | +++ b/pngview/Makefile |
| 89 | @@ -1,8 +1,8 @@ |
| 90 | OBJS=pngview.o |
| 91 | BIN=pngview |
| 92 | |
| 93 | -CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) |
| 94 | -LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng |
| 95 | +CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) |
| 96 | +LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng |
| 97 | |
| 98 | INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux |
| 99 | |
| 100 | diff --git a/spriteview/Makefile b/spriteview/Makefile |
| 101 | index ada9277..904c1e8 100644 |
| 102 | --- a/spriteview/Makefile |
| 103 | +++ b/spriteview/Makefile |
| 104 | @@ -1,8 +1,8 @@ |
| 105 | OBJS=spriteview.o |
| 106 | BIN=spriteview |
| 107 | |
| 108 | -CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags) |
| 109 | -LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng |
| 110 | +CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) |
| 111 | +LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng |
| 112 | |
| 113 | INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux |
| 114 | |