]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - Makefile.include
Use makebin if objcopy is not available.
[sigrok-firmware-fx2lafw.git] / Makefile.include
index c7211d8f06c4ae5d208152a70d0d8645b135e4cc..8038741a73adb03b7cfe62ce589ce03b34852a3e 100644 (file)
 ##
 
 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