Merge remote-tracking branch 'remotes/tegra/android-tegra-2.6.36-honeycomb-mr1' into...
[firefly-linux-kernel-4.4.55.git] / Makefile
index 4519fc71d19ea1ca7949512a33d02e32bbec3091..389b1844df1e9e3345e4dfc135ad346b64753e77 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -188,8 +188,15 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
 export KBUILD_BUILDHOST := $(SUBARCH)
-ARCH           ?= $(SUBARCH)
-CROSS_COMPILE  ?= $(CONFIG_CROSS_COMPILE:"%"=%)
+#ARCH          ?= $(SUBARCH)
+#CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
+ARCH           ?= arm
+ifneq ($(wildcard ../toolchain/arm-eabi-4.4.0),)
+CROSS_COMPILE  ?= ../toolchain/arm-eabi-4.4.0/bin/arm-eabi-
+endif
+ifneq ($(wildcard ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0),)
+CROSS_COMPILE  ?= ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
+endif
 
 # Architecture as present in compile.h
 UTS_MACHINE    := $(ARCH)
@@ -1517,3 +1524,7 @@ FORCE:
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable so we can use it in if_changed and friends.
 .PHONY: $(PHONY)
+
+
+%.o: %.uu prepare scripts FORCE
+       $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)