]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
Fix linking with libnl-3
authorGilles Espinasse <g.esp@free.fr>
Tue, 8 Nov 2011 08:09:43 +0000 (09:09 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 8 Nov 2011 08:05:10 +0000 (09:05 +0100)
iw3.2 fail to link libnl-3.2.2 with this error
/usr/bin/ld: cannot find -lnl-genl

Contrary to previous libnl version, on v3 there is a dedicated libnl-genl-3.0.pc file
Simply use that.

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Makefile

index 8443ee69f26fdabf603356c1895e6b036fc3a35e..fb463244c5961c71a65946083bbf6e4fa0c7d342 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -36,10 +36,11 @@ LIBS += -lnl-genl
 NLLIBNAME = libnl-2.0
 endif
 
+# libnl-3 has a separate libnl-genl-3.0.pc
 ifeq ($(NL3FOUND),Y)
 CFLAGS += -DCONFIG_LIBNL30
-LIBS += -lnl-genl
-NLLIBNAME = libnl-3.0
+LIBS =
+NLLIBNAME = libnl-genl-3.0
 endif
 
 ifeq ($(NLLIBNAME),)