From 97fc2dc61276f84f08203e23324ba4cd5e3969ce Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Mon, 29 Dec 2014 21:54:02 +0100 Subject: [PATCH] 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= to be used in .config to override. Signed-off-by: Romain Naour --- src/drivers/drivers.mak | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak index ab392bcaf..943407875 100644 --- a/src/drivers/drivers.mak +++ b/src/drivers/drivers.mak @@ -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