make: use gobjcopy if objcopy is not available

This commit is contained in:
Yonezawa-T2 2016-11-01 06:28:43 +09:00 committed by Martine Lenders
parent 61daeff04c
commit fe96a4c9c4
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,10 @@ endif
export AS = $(PREFIX)as
export LINK = $(PREFIX)gcc
export SIZE = $(PREFIX)size
export OBJCOPY = $(PREFIX)objcopy
export OBJCOPY = $(shell command -v $(PREFIX)objcopy gobjcopy objcopy | head -n 1)
ifeq ($(OBJCOPY),)
$(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true
endif
export OBJDUMP = $(PREFIX)objdump
export DBG = $(GDBPREFIX)gdb