From: Robert Schwebel Date: Fri, 24 Jun 2011 21:21:27 +0200 Subject: [PATCH] make Linux configuration crosscompile aware Currently, the "Linux" configuration cannot be cross compiled because the compiler is configured unconditionally. We add the CROSS_COMPILE prefix: this way it is easily possible to overwrite that variable from the commandline and use any cross compiler. Signed-off-by: Robert Schwebel --- build/config/Linux | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/build/config/Linux b/build/config/Linux index 4781a12..1b3b3d2 100644 --- a/build/config/Linux +++ b/build/config/Linux @@ -15,14 +15,14 @@ LINKMODE ?= SHARED # # Define Tools # -CC = gcc -CXX = g++ +CC = $(CROSS_COMPILE)gcc +CXX = $(CROSS_COMPILE)g++ LINK = $(CXX) -LIB = ar -cr -RANLIB = ranlib +LIB = $(CROSS_COMPILE)ar -cr +RANLIB = $(CROSS_COMPILE)ranlib SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@ SHLIBLN = $(POCO_BASE)/build/script/shlibln -STRIP = strip +STRIP = $(CROSS_COMPILE)strip DEP = $(POCO_BASE)/build/script/makedepend.gcc SHELL = sh RM = rm -rf @@ -38,13 +38,14 @@ SHAREDLIBLINKEXT = .so # # Compiler and Linker Flags # -CFLAGS = +CFLAGS = $(CPPFLAGS) CFLAGS32 = CFLAGS64 = -CXXFLAGS = -Wall -Wno-sign-compare +CXXFLAGS = -Wall -Wno-sign-compare $(CPPFLAGS) CXXFLAGS32 = CXXFLAGS64 = -LINKFLAGS = +SHLIBFLAGS = $(LDFLAGS) +LINKFLAGS = $(LDFLAGS) LINKFLAGS32 = LINKFLAGS64 = STATICOPT_CC =