X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=Makefile.include;h=8038741a73adb03b7cfe62ce589ce03b34852a3e;hb=2b421d0ecf9ec717a6864da01a071d3c9bfeec7e;hp=5c01a958019fb4b8b2a2c20332b2c4e0a6458764;hpb=75fd9ca5eeb560caa092d88c04f5b7da7dddfdb0;p=sigrok-firmware-fx2lafw.git diff --git a/Makefile.include b/Makefile.include index 5c01a958..8038741a 100644 --- a/Makefile.include +++ b/Makefile.include @@ -20,20 +20,16 @@ ## OBJCOPY ?= objcopy - +MAKEBIN ?= makebin FX2LIBDIR ?= ../../fx2lib BUILDDIR ?= build - -DEBUG ?= 0 -ifeq ($(DEBUG), 1) - SDCCFLAGS += -DDEBUG -else - SDCCFLAGS += -DNDEBUG -endif - -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