From: Uwe Hermann Date: Thu, 22 Nov 2012 22:16:41 +0000 (+0100) Subject: Use makebin if objcopy is not available. X-Git-Tag: sigrok-firmware-fx2lafw-0.1.1~17 X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=2b421d0ecf9ec717a6864da01a071d3c9bfeec7e Use makebin if objcopy is not available. Some systems might not have objcopy (e.g. on Mac OS it might not be available per default). We use objcopy if it is found, otherwise we try to use the 'makebin' utility (shipped with sdcc) instead. Thanks 'Harble' on IRC for the report. --- diff --git a/Makefile.include b/Makefile.include index 626c5cda..8038741a 100644 --- a/Makefile.include +++ b/Makefile.include @@ -20,11 +20,16 @@ ## OBJCOPY ?= objcopy +MAKEBIN ?= makebin FX2LIBDIR ?= ../../fx2lib BUILDDIR ?= build SDCCFLAGS += -I../../include $(BUILDDIR)/$(BASENAME).fw: $(BUILDDIR)/$(BASENAME).ihx +ifneq ($(shell which objcopy 2>/dev/null),) $(OBJCOPY) -Iihex $< -Obinary $@ +else + $(MAKEBIN) -p < $< > $@ +endif include $(FX2LIBDIR)/lib/fx2.mk