From 41e92d43d3f2bcce87bda65656cd139437d95b05 Mon Sep 17 00:00:00 2001 From: Daniel Nyström Date: Mon, 27 May 2013 15:19:59 +0200 Subject: build-rules.mk: Add CROSS_COMPILE env var support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since toolchains other then older Code Sourcery (Mentor Graphics) might not use the arm-none-eabi triplet, make it possible to use any triplet by just setting the CROSS_COMPILE environment variable accordingly. Signed-off-by: Daniel Nyström --- support/make/build-rules.mk | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/support/make/build-rules.mk b/support/make/build-rules.mk index f852cab..eec986f 100644 --- a/support/make/build-rules.mk +++ b/support/make/build-rules.mk @@ -1,13 +1,15 @@ # Useful tools -CC := arm-none-eabi-gcc -CXX := arm-none-eabi-g++ -LD := arm-none-eabi-ld -v -AR := arm-none-eabi-ar -AS := arm-none-eabi-gcc -OBJCOPY := arm-none-eabi-objcopy -DISAS := arm-none-eabi-objdump -OBJDUMP := arm-none-eabi-objdump -SIZE := arm-none-eabi-size +CROSS_COMPILE ?= arm-none-eabi- + +CC := $(CROSS_COMPILE)gcc +CXX := $(CROSS_COMPILE)g++ +LD := $(CROSS_COMPILE)ld -v +AR := $(CROSS_COMPILE)ar +AS := $(CROSS_COMPILE)gcc +OBJCOPY := $(CROSS_COMPILE)objcopy +DISAS := $(CROSS_COMPILE)objdump +OBJDUMP := $(CROSS_COMPILE)objdump +SIZE := $(CROSS_COMPILE)size DFU := dfu-util # Suppress annoying output unless V is set -- cgit v1.2.3