Allow libnl-3.0 include path be specified

The '/usr/include/libnl3' header path is unsafe for cross-compilation.
Use pkg-config to find libnl-3.0 headers by default and alternatively,
allow LIBNL_INC=<path> to be used in .config to override.

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
This commit is contained in:
Romain Naour 2014-12-29 21:54:02 +01:00 committed by Jouni Malinen
parent f92446fb7d
commit 97fc2dc612

View file

@ -39,7 +39,13 @@ NEED_RFKILL=y
ifdef CONFIG_LIBNL32
DRV_LIBS += -lnl-3
DRV_LIBS += -lnl-genl-3
DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
DRV_CFLAGS += -DCONFIG_LIBNL20
ifdef LIBNL_INC
DRV_CFLAGS += -I$(LIBNL_INC)
else
PKG_CONFIG ?= pkg-config
DRV_CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0)
endif
ifdef CONFIG_LIBNL3_ROUTE
DRV_LIBS += -lnl-route-3
DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE