X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile;h=f5d630a45c97ba2c26c69c23af32f8c64ad7e19f;hb=a2ad9f9801deab2189d36ec0bbcf5192c9a2f635;hp=cc349215eb3c1538c9ca241d090dd9d283f0a237;hpb=c0bd4b6a0c6c0d42235920fb7ddd7110c86e2adb;p=firefly-linux-kernel-4.4.55.git diff --git a/Makefile b/Makefile index cc349215eb3c..f5d630a45c97 100644 --- a/Makefile +++ b/Makefile @@ -192,7 +192,17 @@ 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) +#ARCH ?= $(SUBARCH) +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 +ifneq ($(wildcard ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3),) +CROSS_COMPILE ?= ../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- +endif CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) # Architecture as present in compile.h @@ -329,7 +339,11 @@ include $(srctree)/scripts/Kbuild.include # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as +ifneq ($(wildcard $(CROSS_COMPILE)ld.bfd),) +LD = $(CROSS_COMPILE)ld.bfd +else LD = $(CROSS_COMPILE)ld +endif CC = $(CROSS_COMPILE)gcc CPP = $(CC) -E AR = $(CROSS_COMPILE)ar @@ -1565,3 +1579,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 $@)