diff options
author | Pat Erley <pat-lkml@erley.org> | 2008-12-22 10:37:52 -0800 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-12-22 10:37:52 -0800 |
commit | 18a2709287122df862c941a5798b1eadb8b8385d (patch) | |
tree | 9cf22afa257ada8c21dd32d44e22e2514e43cd5c /Makefile | |
parent | b39d2e3db6a0fa27e7a000adde01dad23f53d455 (diff) | |
download | crda-18a2709287122df862c941a5798b1eadb8b8385d.tar.gz crda-18a2709287122df862c941a5798b1eadb8b8385d.tar.bz2 crda-18a2709287122df862c941a5798b1eadb8b8385d.zip |
Allow CRDA to use new libnl2
This patch updates CRDA to use the new libnl-2 interface, and adds
backwards compatability with libnl-1. It follows the same pattern that
the patch included into iw uses.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Pat Erley <pat-lkml@erley.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -25,6 +25,22 @@ endif MKDIR ?= mkdir -p INSTALL ?= install +NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y) +NL2FOUND := $(shell pkg-config --atleast-version=2 libnl-2.0 && echo Y) + +ifeq ($(NL1FOUND),Y) +NLLIBNAME = libnl-1 +endif + +ifeq ($(NL2FOUND),Y) +CFLAGS += -DCONFIG_LIBNL20 +LIBS += -lnl-genl +NLLIBNAME = libnl-2.0 +endif + +LIBS += `pkg-config --libs $(NLLIBNAME)` +CFLAGS += `pkg-config --cflags $(NLLIBNAME)` + ifeq ($(V),1) Q= NQ=@true @@ -43,7 +59,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) crda: reglib.o crda.o $(NQ) ' LD ' $@ - $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --libs libnl-1` $(LDLIBS) + $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $^ $(LDLIBS) regdbdump: reglib.o regdbdump.o print-regdom.o $(NQ) ' LD ' $@ |