1From 07e7b727b7df7fc5bf0e1f296ba136e0653202ea Mon Sep 17 00:00:00 2001 2From: Trevor Woerner <twoerner@gmail.com> 3Date: Fri, 4 Dec 2020 03:25:08 -0500 4Subject: [PATCH] change library linking order 5 6Since -lraspidmxPng requires the png library (libpng), re-arrange the order of 7linking so that it succeeds. Otherwise I get errors like the following: 8 9 undefined reference to `png_create_write_struct' 10 11...as well as undefined references to various other libpng objects. 12 13Upstream-Status: Submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29] 14Signed-off-by: Trevor Woerner <twoerner@gmail.com> 15--- 16 game/Makefile | 2 +- 17 mandelbrot/Makefile | 2 +- 18 offscreen/Makefile | 2 +- 19 pngview/Makefile | 2 +- 20 spriteview/Makefile | 2 +- 21 5 files changed, 5 insertions(+), 5 deletions(-) 22 23diff --git a/game/Makefile b/game/Makefile 24index b756fa2..f33916d 100644 25--- a/game/Makefile 26+++ b/game/Makefile 27@@ -2,7 +2,7 @@ OBJS=main.o 28 BIN=game 29 30 CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) 31-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng 32+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) 33 34 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux 35 36diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile 37index 31097f2..08d1113 100644 38--- a/mandelbrot/Makefile 39+++ b/mandelbrot/Makefile 40@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o 41 BIN=mandelbrot 42 43 CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) 44-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng 45+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) 46 47 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux 48 49diff --git a/offscreen/Makefile b/offscreen/Makefile 50index 4f13fd0..49fc744 100644 51--- a/offscreen/Makefile 52+++ b/offscreen/Makefile 53@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o 54 BIN=pngresize 55 56 CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) 57-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng 58+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) 59 60 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux 61 62diff --git a/pngview/Makefile b/pngview/Makefile 63index cce8d63..bd6c154 100644 64--- a/pngview/Makefile 65+++ b/pngview/Makefile 66@@ -2,7 +2,7 @@ OBJS=pngview.o 67 BIN=pngview 68 69 CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) 70-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng 71+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) 72 73 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux 74 75diff --git a/spriteview/Makefile b/spriteview/Makefile 76index d2fb3c8..89d9e01 100644 77--- a/spriteview/Makefile 78+++ b/spriteview/Makefile 79@@ -2,7 +2,7 @@ OBJS=spriteview.o 80 BIN=spriteview 81 82 CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng) 83-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng 84+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng) 85 86 INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux 87 88