aboutsummaryrefslogtreecommitdiff
path: root/scripts/Makefile.IMA
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/Makefile.IMA
parentcd2663f15e74274619dd97dc382bb858ac255872 (diff)
downloadbusybox-b8e653bfbfeee7797e631d6d47cd9cddb7658e4b.tar.gz
Reinstate CONFIG_CROSS_COMPILE_PREFIX
Diffstat (limited to 'scripts/Makefile.IMA')
-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 @@
# This is completely unsupported.
+#
+# Uasge: make -f scripts/Makefile.IMA
+#
# Fix COMBINED_COMPILE upstream (in the Kbuild) and propagate
# the changes back
srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
@@ -11,6 +14,24 @@ MAKEFLAGS += --include-dir=$(srctree)
default: busybox
+include .config
+
+# Cross compiling and selecting different set of gcc/bin-utils
+ifeq ($(CROSS_COMPILE),)
+CROSS_COMPILE := $(subst ",,$(CONFIG_CROSS_COMPILER_PREFIX))
+endif
+
+ifneq ($(CROSS_COMPILE),)
+SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1)
+else
+SUBARCH := $(shell uname -m)
+endif
+SUBARCH := $(shell echo $(SUBARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/s390x/s390/ -e s/parisc64/parisc/ \
+ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
+ARCH ?= $(SUBARCH)
+
ifndef HOSTCC
HOSTCC = cc
endif
@@ -27,19 +48,11 @@ OBJDUMP = $(CROSS_COMPILE)objdump
CFLAGS := $(CFLAGS)
CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q
-include .config
# We need some generic definitions
include $(srctree)/scripts/Kbuild.include
include Makefile.flags
-SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
- -e s/arm.*/arm/ -e s/sa110/arm/ \
- -e s/s390x/s390/ -e s/parisc64/parisc/ \
- -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
-ARCH ?= $(SUBARCH)
-
-# Cross compiling and selecting different set of gcc/bin-utils
-include $(srctree)/arch/$(ARCH)/Makefile
ifdef CONFIG_FEATURE_COMPRESS_USAGE
usage_stuff = include/usage_compressed.h