add .bin target to Makefile

This commit is contained in:
Stefan Rupp 2014-03-06 23:43:32 +01:00
parent 862e092f56
commit e1fec51599
2 changed files with 5 additions and 1 deletions

View File

@ -4,4 +4,5 @@ syntax: glob
*.map
*.elf
*.hex
*.bin

View File

@ -16,7 +16,7 @@ OBJDUMP = avr-objdump
SIZE = avr-size -A
all: $(PRG).hex
all: $(PRG).hex $(PRG).bin
$(PRG).elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
@ -40,7 +40,10 @@ clean:
rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
hex: $(PRG).hex
bin: $(PRG).bin
%.hex: %.elf
$(OBJCOPY) -j .text -j .data -O ihex $< $@
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@