1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Description: fix build failure with ld --as-needed
libraries need to be placed after objects needing them
Author: Thorsten Alteholz <alteholz@debian.org>
Last-Update: 2013-06-01
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ all: makeDirs \
saint-reformat:
$(CC) $(CFLAGS) -c $(SRC)/SAINTreformat/*.c $(SRC)/SAINTreformat/*.h
mv *.o $(BUILD)
- $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-reformat
+ $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-reformat $(LIBS)
rm $(BUILD)/*.o
@echo
@echo
@@ -52,7 +52,7 @@ saint-reformat:
saint-spc-noctrl-matrix:
$(CC) $(CFLAGS) -c $(SRC)/SAINTspc-noctrl-matrix/*.c $(SRC)/SAINTspc-noctrl-matrix/*.h
mv *.o $(BUILD)
- $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl-matrix
+ $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl-matrix $(LIBS)
rm $(BUILD)/*.o
@echo
@echo
@@ -60,7 +60,7 @@ saint-spc-noctrl-matrix:
saint-spc-noctrl:
$(CC) $(CFLAGS) -c $(SRC)/SAINTspc-noctrl/*.c $(SRC)/SAINTspc-noctrl/*.h
mv *.o $(BUILD)
- $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl
+ $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl $(LIBS)
rm $(BUILD)/*.o
@echo
@echo
@@ -69,7 +69,7 @@ saint-spc-noctrl:
saint-spc-ctrl:
$(CC) $(CFLAGS) -c $(SRC)/SAINTspc-ctrl/*.c $(SRC)/SAINTspc-ctrl/*.h
mv *.o $(BUILD)
- $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-ctrl
+ $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-ctrl $(LIBS)
rm $(BUILD)/*.o
@echo
@echo
@@ -78,7 +78,7 @@ saint-spc-ctrl:
saint-int-ctrl:
$(CC) $(CFLAGS) -c $(SRC)/SAINTint-ctrl/*.c $(SRC)/SAINTint-ctrl/*.h
mv *.o $(BUILD)
- $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-int-ctrl
+ $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-int-ctrl $(LIBS)
rm $(BUILD)/*.o
@echo
@echo
|