aboutsummaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak22
1 files changed, 10 insertions, 12 deletions
diff --git a/Rules.mak b/Rules.mak
index 61f056661..58a4c3e70 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -24,22 +24,20 @@ BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
24# With a modern GNU make(1) (highly recommended, that's what all the 24# With a modern GNU make(1) (highly recommended, that's what all the
25# developers use), all of the following configuration values can be 25# developers use), all of the following configuration values can be
26# overridden at the command line. For example: 26# overridden at the command line. For example:
27# make CROSS=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app 27# make CROSS_COMPILE=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
28#-------------------------------------------------------- 28#--------------------------------------------------------
29 29
30# If you are running a cross compiler, you will want to set 'CROSS' 30# If you are running a cross compiler, you will want to set CROSS_COMPILE
31# to something more interesting... Target architecture is determined 31# to something more interesting... Target architecture is determined
32# by asking the CC compiler what arch it compiles things for, so unless 32# by asking the CC compiler what arch it compiles things for, so unless
33# your compiler is broken, you should not need to specify TARGET_ARCH 33# your compiler is broken, you should not need to specify TARGET_ARCH
34CROSS =$(strip $(subst ",, $(strip $(CROSS_COMPILER_PREFIX)))) 34CC = $(CROSS_COMPILE)gcc
35# be gentle to vi coloring.. ")) 35AR = $(CROSS_COMPILE)ar
36CC = $(CROSS)gcc 36AS = $(CROSS_COMPILE)as
37AR = $(CROSS)ar 37LD = $(CROSS_COMPILE)ld
38AS = $(CROSS)as 38NM = $(CROSS_COMPILE)nm
39LD = $(CROSS)ld 39STRIP = $(CROSS_COMPILE)strip
40NM = $(CROSS)nm 40ELF2FLT = $(CROSS_COMPILE)elf2flt
41STRIP = $(CROSS)strip
42ELF2FLT = $(CROSS)elf2flt
43CPP = $(CC) -E 41CPP = $(CC) -E
44SED ?= sed 42SED ?= sed
45BZIP2 ?= bzip2 43BZIP2 ?= bzip2
@@ -64,7 +62,7 @@ CC_MAJOR:=$(shell printf "%02d" $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n
64CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1)) 62CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1))
65 63
66#-------------------------------------------------------- 64#--------------------------------------------------------
67export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP 65export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD NM STRIP CPP
68ifeq ($(strip $(TARGET_ARCH)),) 66ifeq ($(strip $(TARGET_ARCH)),)
69TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \ 67TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \
70 -e 's/i.86/i386/' \ 68 -e 's/i.86/i386/' \