BUILD: Fix LDFLAGS vs. LIBS re linking order in various makefiles
Libraries should always be listed last. Should be backported to 1.8.
Signed-off-by: Christian Ruppert <idl0r@qasl.de>
diff --git a/contrib/modsecurity/Makefile b/contrib/modsecurity/Makefile
index bb918c3..aa0d6e3 100644
--- a/contrib/modsecurity/Makefile
+++ b/contrib/modsecurity/Makefile
@@ -34,14 +34,13 @@
endif
CFLAGS += -g -Wall -pthread
-LDFLAGS += -lpthread $(EVENT_LIB) -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl
INCS += -I../../include -I../../ebtree -I$(MODSEC_INC) -I$(APACHE2_INC) -I$(APR_INC) -I$(LIBXML_INC) -I$(EVENT_INC)
-LIBS =
+LIBS += -lpthread $(EVENT_LIB) -levent_pthreads -lcurl -lapr-1 -laprutil-1 -lxml2 -lpcre -lyajl
OBJS = spoa.o modsec_wrapper.o
modsecurity: $(OBJS)
- $(LD) $(LDFLAGS) $(LIBS) -o $@ $^ $(MODSEC_LIB)/standalone.a
+ $(LD) $(LDFLAGS) -o $@ $^ $(MODSEC_LIB)/standalone.a $(LIBS)
install: modsecurity
install modsecurity $(DESTDIR)$(BINDIR)