aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/make/build-rules.mk24
1 files changed, 15 insertions, 9 deletions
diff --git a/support/make/build-rules.mk b/support/make/build-rules.mk
index d180c89..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
@@ -39,6 +41,10 @@ ifneq ($(findstring ARM/embedded,$(shell $(CC) --version)),)
# GCC ARM Embedded, https://launchpad.net/gcc-arm-embedded/
LD_TOOLCHAIN_PATH := $(LDDIR)/toolchains/gcc-arm-embedded
endif
+ifneq ($(findstring Linaro GCC,$(shell $(CC) --version)),)
+# Summon/Linaro GCC ARM Embedded, https://github.com/esden/summon-arm-toolchain
+LD_TOOLCHAIN_PATH := $(LDDIR)/toolchains/gcc-arm-embedded
+endif
# Add toolchain directory to LD search path
TOOLCHAIN_LDFLAGS := -L $(LD_TOOLCHAIN_PATH)