aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorDaniel Nyström <daniel@nystrom.st>2013-05-27 15:19:59 +0200
committerDaniel Nyström <daniel@nystrom.st>2013-06-04 14:17:43 +0200
commit41e92d43d3f2bcce87bda65656cd139437d95b05 (patch)
treeaa325f45230258809720972bbd8e846fa11c61e1 /support
parent933cbd36a28e7c042b1a55ddfea8d18308c5d632 (diff)
downloadlibrambutan-41e92d43d3f2bcce87bda65656cd139437d95b05.tar.gz
librambutan-41e92d43d3f2bcce87bda65656cd139437d95b05.zip
build-rules.mk: Add CROSS_COMPILE env var support
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 <daniel@nystrom.st>
Diffstat (limited to 'support')
-rw-r--r--support/make/build-rules.mk20
1 files 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