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 --- Cmds | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Cmds') diff --git a/Cmds b/Cmds index aa8c0a2..fdb80ea 100644 --- a/Cmds +++ b/Cmds @@ -5,14 +5,13 @@ Q = @ SHELL := $(shell if [ -x /bin/bash ]; then echo /bin/bash; else echo /bin/sh; fi) # Compiler related stuff -CC = gcc -LDQ = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CROSS_COMPILE)$(CC) -CCNQ = $(CCACHE) $(CROSS_COMPILE)$(CC) +LDQ = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CC) +CCNQ = $(CCACHE) $(CC) CCQ = $(Q)echo -e " CC\t$<" && $(CCNQ) ifeq ($(DEBUG), 1) - STRIP = $(Q)true + STRIPQ = $(Q)true else - STRIP = $(Q)echo -e " STRIP\t$@" && $(CROSS_COMPILE)strip + STRIPQ = $(Q)echo -e " STRIP\t$@" && $(STRIP) endif # sparse related -- cgit v1.2.3-54-g00ecf