diff options
author | Edvinas Valatka <edacval@gmail.com> | 2015-09-13 02:42:45 +0300 |
---|---|---|
committer | Przemyslaw Pawelczyk <przemoc@gmail.com> | 2015-09-13 21:36:02 +0200 |
commit | cc91bfa701fa9b6eecd8f3aef77fb6c8c5f8c224 (patch) | |
tree | 0d294a0aa9429ad0ef1fc01fa2cdf95ad850334e | |
parent | 7861af367a556f04c5042ee566704e1939b642ed (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-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |