From cc91bfa701fa9b6eecd8f3aef77fb6c8c5f8c224 Mon Sep 17 00:00:00 2001 From: Edvinas Valatka Date: Sun, 13 Sep 2015 02:42:45 +0300 Subject: 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 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.1