aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-02 04:51:29 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-02 04:51:29 +0000
commitb8e653bfbfeee7797e631d6d47cd9cddb7658e4b (patch)
tree7a0553a4184856af422e57dabbaec68bbe271502 /scripts
parentcd2663f15e74274619dd97dc382bb858ac255872 (diff)
downloadbusybox-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.IMA29
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
4srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) 7srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
@@ -11,6 +14,24 @@ MAKEFLAGS += --include-dir=$(srctree)
11 14
12default: busybox 15default: busybox
13 16
17include .config
18
19# Cross compiling and selecting different set of gcc/bin-utils
20ifeq ($(CROSS_COMPILE),)
21CROSS_COMPILE := $(subst ",,$(CONFIG_CROSS_COMPILER_PREFIX))
22endif
23
24ifneq ($(CROSS_COMPILE),)
25SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1)
26else
27SUBARCH := $(shell uname -m)
28endif
29SUBARCH := $(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/ )
33ARCH ?= $(SUBARCH)
34
14ifndef HOSTCC 35ifndef HOSTCC
15HOSTCC = cc 36HOSTCC = cc
16endif 37endif
@@ -27,19 +48,11 @@ OBJDUMP = $(CROSS_COMPILE)objdump
27CFLAGS := $(CFLAGS) 48CFLAGS := $(CFLAGS)
28CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q 49CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q
29 50
30include .config
31# We need some generic definitions 51# We need some generic definitions
32include $(srctree)/scripts/Kbuild.include 52include $(srctree)/scripts/Kbuild.include
33 53
34include Makefile.flags 54include Makefile.flags
35 55
36SUBARCH := $(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/ )
40ARCH ?= $(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
44ifdef CONFIG_FEATURE_COMPRESS_USAGE 57ifdef CONFIG_FEATURE_COMPRESS_USAGE
45usage_stuff = include/usage_compressed.h 58usage_stuff = include/usage_compressed.h