aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-10-30 07:48:38 +0000
committerEric Andersen <andersen@codepoet.org>2003-10-30 07:48:38 +0000
commitb8b6816f7b0aa20e1e08e0881f4a428ccd76850e (patch)
treeabb0ffca9413e2014fb4d3289388d946840e8e7b
parentf4fd3a13318f15d212d5519516db50f572f08ada (diff)
downloadbusybox-w32-b8b6816f7b0aa20e1e08e0881f4a428ccd76850e.tar.gz
busybox-w32-b8b6816f7b0aa20e1e08e0881f4a428ccd76850e.tar.bz2
busybox-w32-b8b6816f7b0aa20e1e08e0881f4a428ccd76850e.zip
make certain values specified in the environment always win
-rw-r--r--Rules.mak24
1 files changed, 11 insertions, 13 deletions
diff --git a/Rules.mak b/Rules.mak
index dfc2777ef..3ee323527 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -34,23 +34,23 @@ BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
34# to something more interesting... Target architecture is determined 34# to something more interesting... Target architecture is determined
35# by asking the CC compiler what arch it compiles things for, so unless 35# by asking the CC compiler what arch it compiles things for, so unless
36# your compiler is broken, you should not need to specify TARGET_ARCH 36# your compiler is broken, you should not need to specify TARGET_ARCH
37CROSS =$(subst ",, $(strip $(CROSS_COMPILER_PREFIX))) 37CROSS ?=$(subst ",, $(strip $(CROSS_COMPILER_PREFIX)))
38#CROSS =/usr/i386-linux-uclibc/bin/i386-uclibc- 38#CROSS =/usr/i386-linux-uclibc/bin/i386-uclibc-
39CC = $(CROSS)gcc 39CC ?= $(CROSS)gcc
40AR = $(CROSS)ar 40AR ?= $(CROSS)ar
41AS = $(CROSS)as 41AS ?= $(CROSS)as
42LD = $(CROSS)ld 42LD ?= $(CROSS)ld
43NM = $(CROSS)nm 43NM ?= $(CROSS)nm
44STRIP = $(CROSS)strip 44STRIP ?= $(CROSS)strip
45CPP = $(CC) -E 45CPP ?= $(CC) -E
46MAKEFILES = $(TOPDIR).config 46MAKEFILES = $(TOPDIR).config
47 47
48# What OS are you compiling busybox for? This allows you to include 48# What OS are you compiling busybox for? This allows you to include
49# OS specific things, syscall overrides, etc. 49# OS specific things, syscall overrides, etc.
50TARGET_OS=linux 50TARGET_OS?=linux
51 51
52# Select the compiler needed to build binaries for your development system 52# Select the compiler needed to build binaries for your development system
53HOSTCC = gcc 53HOSTCC ?= gcc
54HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 54HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
55 55
56# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc. 56# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
@@ -86,8 +86,7 @@ ARFLAGS=-r
86 86
87#-------------------------------------------------------- 87#--------------------------------------------------------
88export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP 88export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
89ifeq ($(strip $(TARGET_ARCH)),) 89TARGET_ARCH?=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
90TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
91 -e 's/i.86/i386/' \ 90 -e 's/i.86/i386/' \
92 -e 's/sparc.*/sparc/' \ 91 -e 's/sparc.*/sparc/' \
93 -e 's/arm.*/arm/g' \ 92 -e 's/arm.*/arm/g' \
@@ -99,7 +98,6 @@ TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
99 -e 's/mipsel-.*/mipsel/' \ 98 -e 's/mipsel-.*/mipsel/' \
100 -e 's/cris.*/cris/' \ 99 -e 's/cris.*/cris/' \
101 ) 100 )
102endif
103 101
104# Pull in the user's busybox configuration 102# Pull in the user's busybox configuration
105ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) 103ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)