summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdvinas Valatka <edacval@gmail.com>2015-09-13 02:42:45 +0300
committerPrzemyslaw Pawelczyk <przemoc@gmail.com>2015-09-13 21:36:02 +0200
commitcc91bfa701fa9b6eecd8f3aef77fb6c8c5f8c224 (patch)
tree0d294a0aa9429ad0ef1fc01fa2cdf95ad850334e
parent7861af367a556f04c5042ee566704e1939b642ed (diff)
Makefile: Provide libs after object files when linking.
See: https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Importance_of_linking_order Fixes #29. Signed-off-by: Przemyslaw Pawelczyk <przemoc@gmail.com>
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7eaa7c2..3746029 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,8 @@
#
CC = gcc
CFLAGS += -g -Wall -pedantic -std=c99 -D_FILE_OFFSET_BITS=64 -O2
-LDFLAGS += -lbsd
+LDFLAGS +=
+LIBS += -lbsd
INCLUDES =
INSTALL = install -c
INSTALL_PROGRAM = ${INSTALL}
@@ -47,7 +48,7 @@ all: metastore
metastore: $(OBJECTS)
- $(LINK) -o $@ $^
+ $(LINK) -o $@ $^ $(LIBS)
install: all