Skip to content

Commit

Permalink
build-rules.mk: Add CROSS_COMPILE env var support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
speakman committed Jun 4, 2013
1 parent ce07837 commit 4ab37d2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions support/make/build-rules.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4ab37d2

Please sign in to comment.