diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-02 04:51:29 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-02 04:51:29 +0000 |
commit | b8e653bfbfeee7797e631d6d47cd9cddb7658e4b (patch) | |
tree | 7a0553a4184856af422e57dabbaec68bbe271502 /scripts | |
parent | cd2663f15e74274619dd97dc382bb858ac255872 (diff) | |
download | busybox-w32-b8e653bfbfeee7797e631d6d47cd9cddb7658e4b.tar.gz busybox-w32-b8e653bfbfeee7797e631d6d47cd9cddb7658e4b.tar.bz2 busybox-w32-b8e653bfbfeee7797e631d6d47cd9cddb7658e4b.zip |
Reinstate CONFIG_CROSS_COMPILE_PREFIX
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.IMA | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/scripts/Makefile.IMA b/scripts/Makefile.IMA index 353a4ac1b..988c6a6d1 100644 --- a/scripts/Makefile.IMA +++ b/scripts/Makefile.IMA | |||
@@ -1,4 +1,7 @@ | |||
1 | # This is completely unsupported. | 1 | # This is completely unsupported. |
2 | # | ||
3 | # Uasge: make -f scripts/Makefile.IMA | ||
4 | # | ||
2 | # Fix COMBINED_COMPILE upstream (in the Kbuild) and propagate | 5 | # Fix COMBINED_COMPILE upstream (in the Kbuild) and propagate |
3 | # the changes back | 6 | # the changes back |
4 | srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) | 7 | srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) |
@@ -11,6 +14,24 @@ MAKEFLAGS += --include-dir=$(srctree) | |||
11 | 14 | ||
12 | default: busybox | 15 | default: busybox |
13 | 16 | ||
17 | include .config | ||
18 | |||
19 | # Cross compiling and selecting different set of gcc/bin-utils | ||
20 | ifeq ($(CROSS_COMPILE),) | ||
21 | CROSS_COMPILE := $(subst ",,$(CONFIG_CROSS_COMPILER_PREFIX)) | ||
22 | endif | ||
23 | |||
24 | ifneq ($(CROSS_COMPILE),) | ||
25 | SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1) | ||
26 | else | ||
27 | SUBARCH := $(shell uname -m) | ||
28 | endif | ||
29 | SUBARCH := $(shell echo $(SUBARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | ||
30 | -e s/arm.*/arm/ -e s/sa110/arm/ \ | ||
31 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ | ||
32 | -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) | ||
33 | ARCH ?= $(SUBARCH) | ||
34 | |||
14 | ifndef HOSTCC | 35 | ifndef HOSTCC |
15 | HOSTCC = cc | 36 | HOSTCC = cc |
16 | endif | 37 | endif |
@@ -27,19 +48,11 @@ OBJDUMP = $(CROSS_COMPILE)objdump | |||
27 | CFLAGS := $(CFLAGS) | 48 | CFLAGS := $(CFLAGS) |
28 | CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q | 49 | CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q |
29 | 50 | ||
30 | include .config | ||
31 | # We need some generic definitions | 51 | # We need some generic definitions |
32 | include $(srctree)/scripts/Kbuild.include | 52 | include $(srctree)/scripts/Kbuild.include |
33 | 53 | ||
34 | include Makefile.flags | 54 | include Makefile.flags |
35 | 55 | ||
36 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | ||
37 | -e s/arm.*/arm/ -e s/sa110/arm/ \ | ||
38 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ | ||
39 | -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) | ||
40 | ARCH ?= $(SUBARCH) | ||
41 | |||
42 | # Cross compiling and selecting different set of gcc/bin-utils | ||
43 | -include $(srctree)/arch/$(ARCH)/Makefile | 56 | -include $(srctree)/arch/$(ARCH)/Makefile |
44 | ifdef CONFIG_FEATURE_COMPRESS_USAGE | 57 | ifdef CONFIG_FEATURE_COMPRESS_USAGE |
45 | usage_stuff = include/usage_compressed.h | 58 | usage_stuff = include/usage_compressed.h |