rk: Makefile set default ARCH and CROSS_COMPILE
author黄涛 <huangtao@rock-chips.com>
Fri, 22 Nov 2013 10:51:07 +0000 (18:51 +0800)
committer黄涛 <huangtao@rock-chips.com>
Fri, 22 Nov 2013 10:51:07 +0000 (18:51 +0800)
Makefile

index 92248d113450106207fea7bc38fac6f6ee5495d2..11f0b5836b4a0d6fb671b3c87d420fa9f9d4b077 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -192,7 +192,11 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
 # "make" in the configured kernel build directory always uses that.
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+ARCH           ?= arm
 ARCH           ?= $(SUBARCH)
+ifneq ($(wildcard ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6),)
+CROSS_COMPILE  ?= ../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
+endif
 CROSS_COMPILE  ?= $(CONFIG_CROSS_COMPILE:"%"=%)
 
 # Architecture as present in compile.h