summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-01-24 13:39:26 -0800
committerLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-24 13:39:26 -0800
commit62a06de3a515f64afd829cdcabcf3bfaf7f6894d (patch)
tree4ad32546db381332cf98a2c8f1d63d0d9363fdb4
parent59ea647265425710bfb805b98d393030444c5abb (diff)
downloadcrda-62a06de3a515f64afd829cdcabcf3bfaf7f6894d.tar.gz
crda-62a06de3a515f64afd829cdcabcf3bfaf7f6894d.tar.bz2
crda-62a06de3a515f64afd829cdcabcf3bfaf7f6894d.zip
crda: Fix --as-needed usagev1.0.1
For --as-needed to work (and for traditional ld too) the libraries should always be passed _after_ the object files, move them so that they are picked up properly. Also rename LIBS to NLLIBS to avoid confusion between LIBS/LDLIBS. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a07fbcf..aaa9ca6 100644
--- a/Makefile
+++ b/Makefile
@@ -48,11 +48,11 @@ endif
ifeq ($(NL2FOUND),Y)
CFLAGS += -DCONFIG_LIBNL20
-LIBS += -lnl-genl
+NLLIBS += -lnl-genl
NLLIBNAME = libnl-2.0
endif
-LIBS += `pkg-config --libs $(NLLIBNAME)`
+NLLIBS += `pkg-config --libs $(NLLIBNAME)`
CFLAGS += `pkg-config --cflags $(NLLIBNAME)`
ifeq ($(V),1)
@@ -85,7 +85,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem)
crda: reglib.o crda.o
$(NQ) ' LD ' $@
- $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $^ $(LDLIBS)
+ $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(NLLIBS)
regdbdump: reglib.o regdbdump.o print-regdom.o
$(NQ) ' LD ' $@