X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=Makefile.include;h=8038741a73adb03b7cfe62ce589ce03b34852a3e;hb=2b421d0ecf9ec717a6864da01a071d3c9bfeec7e;hp=81c4915a83bc6a4d7e839b7cae0b7eb90cdf8786;hpb=576c66275f9fbc419b6449a72dd870d29bb4bf31;p=sigrok-firmware-fx2lafw.git diff --git a/Makefile.include b/Makefile.include index 81c4915a..8038741a 100644 --- a/Makefile.include +++ b/Makefile.include @@ -20,13 +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