summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-01-10 15:48:11 +0000
committerEric Andersen <andersen@codepoet.org>2002-01-10 15:48:11 +0000
commitcbc40534b73cd05f1e7800b5419495ceae4099c8 (patch)
treeb8334221089563d1f6d305eba362c2f63cbe6b40 /Rules.mak
parent6dd6e53fbd324f735cf797940194c7501433fdc5 (diff)
Allow people to override the TARGET_ARCH setting
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak3
1 files changed, 3 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index 7dc21f35c..24ce6c229 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -39,9 +39,11 @@ GCCINCDIR = ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1incl
NATIVE_ARCH = ${shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \
-e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g' \
-e 's/v850.*/v850/g'}
+ifeq ($(strip $(TARGET_ARCH)),)
TARGET_ARCH=${shell $(CC) -dumpmachine | sed -e s'/-.*//' -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \
-e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g' \
-e 's/v850.*/v850/g'}
+endif
# Some nice architecture specific optimizations
ifndef OPTIMIZATION
@@ -73,6 +75,7 @@ TARGET_CCFLAGS=--uclibc-use-build-dir $(WARNINGS) $(OPTIMIZATION) $(CPUFLAGS)
CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
TARGET_CFLAGS=$(ARCH_CFLAGS) $(TARGET_CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
+NATIVE_CFLAGS=-O2 -Wall
ifeq ($(strip $(DODEBUG)),true)
CFLAGS += -g