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 --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cf6c9bc..7379aca 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # netsniff-ng build system # Copyright 2012 - 2013 Daniel Borkmann -# Copyright 2013 - 2014 Tobias Klauser +# Copyright 2013 - 2015 Tobias Klauser # Subject to the GNU GPL, version 2. -include Config @@ -120,14 +120,13 @@ VERSION_STRING = "$(VERSION_SHORT)$(CONFIG_RC)" VERSION_LONG = "$(VERSION_SHORT)$(CONFIG_RC) ($(NAME))" export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION -export CROSS_COMPILE export DEBUG HARDENING bold = $(shell tput bold) normal = $(shell tput sgr0) -ifeq ("$(origin CROSS_COMPILE)", "command line") - WHAT := Cross compiling +ifneq ("$(CROSS_COMPILE)", "") + WHAT := Cross-compiling else WHAT := Building endif @@ -178,4 +177,4 @@ $(foreach tool,$(TOOLS),$(eval $(call TOOL_templ,$(tool)))) $(TOOLS): $(LDQ) $(LDFLAGS) -o $@/$@ $@/*.o $($@-libs) - $(STRIP) $@/$@ + $(STRIPQ) $@/$@ -- cgit v1.2.3-54-g00ecf