diff options
Diffstat (limited to 'Rules.mak')
-rw-r--r-- | Rules.mak | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -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 |
34 | CROSS =$(strip $(subst ",, $(strip $(CROSS_COMPILER_PREFIX)))) | 34 | CC = $(CROSS_COMPILE)gcc |
35 | # be gentle to vi coloring.. ")) | 35 | AR = $(CROSS_COMPILE)ar |
36 | CC = $(CROSS)gcc | 36 | AS = $(CROSS_COMPILE)as |
37 | AR = $(CROSS)ar | 37 | LD = $(CROSS_COMPILE)ld |
38 | AS = $(CROSS)as | 38 | NM = $(CROSS_COMPILE)nm |
39 | LD = $(CROSS)ld | 39 | STRIP = $(CROSS_COMPILE)strip |
40 | NM = $(CROSS)nm | 40 | ELF2FLT = $(CROSS_COMPILE)elf2flt |
41 | STRIP = $(CROSS)strip | ||
42 | ELF2FLT = $(CROSS)elf2flt | ||
43 | CPP = $(CC) -E | 41 | CPP = $(CC) -E |
44 | SED ?= sed | 42 | SED ?= sed |
45 | BZIP2 ?= bzip2 | 43 | BZIP2 ?= bzip2 |
@@ -64,7 +62,7 @@ CC_MAJOR:=$(shell printf "%02d" $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n | |||
64 | CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1)) | 62 | CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1)) |
65 | 63 | ||
66 | #-------------------------------------------------------- | 64 | #-------------------------------------------------------- |
67 | export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP | 65 | export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD NM STRIP CPP |
68 | ifeq ($(strip $(TARGET_ARCH)),) | 66 | ifeq ($(strip $(TARGET_ARCH)),) |
69 | TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \ | 67 | TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \ |
70 | -e 's/i.86/i386/' \ | 68 | -e 's/i.86/i386/' \ |