X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=Makefile.include;h=8038741a73adb03b7cfe62ce589ce03b34852a3e;hb=2b421d0ecf9ec717a6864da01a071d3c9bfeec7e;hp=c7211d8f06c4ae5d208152a70d0d8645b135e4cc;hpb=a15c1f062cebebe9454f1dd69c6a257d15aeff46;p=sigrok-firmware-fx2lafw.git diff --git a/Makefile.include b/Makefile.include index c7211d8f..8038741a 100644 --- a/Makefile.include +++ b/Makefile.include @@ -20,11 +20,16 @@ ## OBJCOPY ?= objcopy +MAKEBIN ?= makebin FX2LIBDIR ?= ../../fx2lib BUILDDIR ?= build -SDCCFLAGS += -I../../include/ +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