1
0
forked from me/IronOS

Add binary generation (#310)

This commit is contained in:
dogtopus
2018-05-26 01:21:06 -03:00
committed by Ben V. Brown
parent 74de59c235
commit a576f44ba2

View File

@@ -177,7 +177,7 @@ OUT_OBJS_CPP=$(addprefix $(OUTPUT_DIR)/,$(OBJS_CPP))
OUT_OBJS_S=$(addprefix $(OUTPUT_DIR)/,$(OBJS_S))
OUT_HEXFILE=$(addprefix $(HEXFILE_DIR)/,$(OUTPUT_EXE))
all: $(OUT_HEXFILE).hex
all: $(OUT_HEXFILE).hex $(OUT_HEXFILE).bin
#
# The rule to create the target directory
@@ -188,6 +188,10 @@ all: $(OUT_HEXFILE).hex
$(SIZE) $^
$(OBJCOPY) $^ -O ihex $@
%.bin : %.elf
$(SIZE) $^
$(OBJCOPY) $^ -O binary $@
$(OUT_HEXFILE).elf : $(OUT_OBJS) $(OUT_OBJS_CPP) $(OUT_OBJS_S) Makefile $(LDSCRIPT)
@test -d $(@D) || mkdir -p $(@D)
@echo Linking $(OUTPUT_EXE).elf