| diff -aruN iw-0.9.22/Makefile iw-0.9.22.N/Makefile |
| --- iw-0.9.22/Makefile 2013-06-07 18:36:50.000000000 -0700 |
| +++ iw-0.9.22.N/Makefile 2013-06-10 12:09:36.006767045 -0700 |
| @@ -22,6 +22,31 @@ |
| OBJS += sections.o |
| ALL = iw |
| |
| +ifdef NLLIBNAME |
| + |
| +NLLIBS = -lnl |
| + |
| +ifeq ($(NLLIBNAME),libnl-1) |
| +NL1FOUND := Y |
| +endif |
| + |
| +ifeq ($(NLLIBNAME),libnl-2.0) |
| +NL2FOUND := Y |
| +endif |
| + |
| +ifdef NLCFLAGS |
| +CFLAGS += $(NLCFLAGS) |
| +endif |
| + |
| +ifdef NLLDFLAGS |
| +LDFLAGS += $(NLLDFLAGS) |
| +endif |
| + |
| +ifdef NLLIBS |
| +LIBS += $(NLLIBS) |
| +endif |
| + |
| +else |
| NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y) |
| NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y) |
| |
| @@ -30,8 +55,6 @@ |
| endif |
| |
| ifeq ($(NL2FOUND),Y) |
| -CFLAGS += -DCONFIG_LIBNL20 |
| -LIBS += -lnl-genl |
| NLLIBNAME = libnl-2.0 |
| endif |
| |
| @@ -41,6 +64,12 @@ |
| |
| LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME)) |
| CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME)) |
| +endif |
| + |
| +ifeq ($(NL2FOUND),Y) |
| +CFLAGS += -DCONFIG_LIBNL20 |
| +LIBS += -lnl-genl |
| +endif |
| |
| ifeq ($(V),1) |
| Q= |