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.
##
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