mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
f47b09faa4
When '$(PREFIX)objdump' is not present fallback to native '(g)objdump'. 'objdump' is used when flashing for some boards but the toolchain may not be installed when building in docker. This will allow using 'objdump' in 'cpu/kinetis/dist/check-fcfield.sh'.
25 lines
872 B
Makefile
25 lines
872 B
Makefile
export CC = $(PREFIX)gcc
|
|
export CXX = $(PREFIX)g++
|
|
export CCAS ?= $(CC)
|
|
ifeq ($(LTO),1)
|
|
export AR = $(PREFIX)gcc-ar
|
|
export RANLIB = $(PREFIX)gcc-ranlib
|
|
else
|
|
export AR = $(PREFIX)ar
|
|
export RANLIB = $(PREFIX)ranlib
|
|
endif
|
|
export AS = $(PREFIX)as
|
|
export NM = $(PREFIX)nm
|
|
export LINK = $(PREFIX)gcc
|
|
export LINKXX = $(PREFIX)g++
|
|
export SIZE = $(PREFIX)size
|
|
export OBJCOPY ?= $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
|
|
ifeq ($(OBJCOPY),)
|
|
$(warning objcopy not found. Hex file will not be created.)
|
|
export OBJCOPY = true
|
|
endif
|
|
# Default to the native (g)objdump, helps when using toolchain from docker
|
|
export OBJDUMP ?= $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
|
|
# We use GDB for debugging
|
|
include $(RIOTMAKE)/tools/gdb.inc.mk
|