From 7be6698699a967215854133b0cfbcd46739e1960 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 7 Feb 2008 12:26:21 +0000 Subject: [PATCH] - improved cross-compiling. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@694 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- Makefile.defs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 36f3e894..ce909331 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -27,7 +27,7 @@ CPPFLAGS += -D_DEBUG \ #LIBSPANDSP_STATIC = yes #LIBSPANDSP_LDIR = /usr/local/lib/ -LDFLAGS = -lm +LDFLAGS += -lm OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]") @@ -48,7 +48,7 @@ else GETARCH=uname -m endif -ARCH := $(shell $(GETARCH) |sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ +ARCH ?= $(shell $(GETARCH) |sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/armv4l/arm/ -e "s/Power Macintosh/ppc/" \ -e "s/cobalt/mips2/" \ -e s/amd64/x86_64/ ) @@ -61,16 +61,15 @@ ifeq ($(ARCH),sparc) endif # need OS specific for this ? -CXX = g++ -CC = gcc +CXX ?= g++ +CC ?= gcc +LD ?= $(CC) -LD = $(CC) - -CXXFLAGS := -Wall -Wno-reorder -fPIC -g \ +CXXFLAGS += -Wall -Wno-reorder -fPIC -g \ -O2 $(EXTRA_CXXFLAGS) -CFLAGS := -Wall -fPIC -g -O2 $(EXTRA_CFLAGS) +CFLAGS += -Wall -fPIC -g -O2 $(EXTRA_CFLAGS) ifeq ($(DEBUG_PLAYOUT), yes) CPPFLAGS += -DDEBUG_PLAYOUTBUF