From f2275b2c13743ff6059068ac8eaa82733bfa2630 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 23 Apr 2015 11:52:27 +0200 Subject: build: Restore support for cross-compiling the netsniff-ng toolkit Ever since we switched to the hand-crafted ./configure script, support for cross-compiling the netsniff-ng toolkit was basically broken. Restore the abaility to cross-compile our tools by making ./configure consider the CROSS_COMPILE and SYSROOT variables. Example for cross-compiling on arm: $ CROSS_COMPILE=arm-linux-gnueabihf- \ SYSROOT=/usr/arm-linux-gnueabihf \ ./configure $ make assuming the cross-compiled libraries (and their respective pkg-config information) are in /usr/arm-linux-gnueabihf. Signed-off-by: Tobias Klauser --- netsniff-ng/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'netsniff-ng/Makefile') diff --git a/netsniff-ng/Makefile b/netsniff-ng/Makefile index 63bf58f..9fe2ffe 100644 --- a/netsniff-ng/Makefile +++ b/netsniff-ng/Makefile @@ -1,5 +1,5 @@ -netsniff-ng-libs = $(shell pkg-config --libs libnl-3.0) \ - $(shell pkg-config --libs libnl-genl-3.0) \ +netsniff-ng-libs = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnl-3.0) \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnl-genl-3.0) \ -lpthread ifeq ($(CONFIG_LIBPCAP), 1) @@ -76,8 +76,8 @@ ifeq ($(CONFIG_HWTSTAMP), 1) netsniff-ng-objs += tstamping.o endif -netsniff-ng-eflags = $(shell pkg-config --cflags libnl-3.0) \ - $(shell pkg-config --cflags libnl-genl-3.0) \ +netsniff-ng-eflags = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags libnl-3.0) \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --cflags libnl-genl-3.0) \ -DNEED_TCPDUMP_LIKE_FILTER netsniff-ng-confs = ether.conf \ -- cgit v1.2.3-54-g00ecf