Move targets to make bin and hex files to toplevel makefile.

This commit is contained in:
Gareth McMullin 2015-03-06 14:36:24 -08:00
parent 2b774102fe
commit 1eac78b1c8
6 changed files with 6 additions and 37 deletions

View File

@ -47,6 +47,12 @@ OBJ = $(SRC:.c=.o)
blackmagic: $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)
%.bin: %
$(OBJCOPY) -O binary $^ $@
%.hex: %
$(OBJCOPY) -O ihex $^ $@
.PHONY: clean host_clean all_platforms
clean: host_clean

View File

@ -24,8 +24,5 @@ SRC += cdcacm.c \
all: blackmagic.bin
blackmagic.bin: blackmagic
$(OBJCOPY) -O binary $^ $@
host_clean:
-rm blackmagic.bin

View File

@ -19,5 +19,3 @@ SRC += cdcacm.c \
all: blackmagic.bin
blackmagic.bin: blackmagic
$(OBJCOPY) -O binary $^ $@

View File

@ -23,17 +23,9 @@ SRC += cdcacm.c \
all: blackmagic.bin blackmagic_dfu.bin blackmagic_dfu.hex
blackmagic.bin: blackmagic
$(OBJCOPY) -O binary $^ $@
blackmagic_dfu: usbdfu.o dfucore.o dfu_f1.o
$(CC) $^ -o $@ $(LDFLAGS_BOOT)
blackmagic_dfu.bin: blackmagic_dfu
$(OBJCOPY) -O binary $^ $@
blackmagic_dfu.hex: blackmagic_dfu
$(OBJCOPY) -O ihex $^ $@
host_clean:
-rm blackmagic.bin blackmagic_dfu blackmagic_dfu.bin blackmagic_dfu.hex

View File

@ -22,27 +22,12 @@ SRC += cdcacm.c \
all: blackmagic.bin blackmagic_dfu.bin blackmagic_dfu.hex dfu_upgrade.bin dfu_upgrade.hex
blackmagic.bin: blackmagic
$(OBJCOPY) -O binary $^ $@
blackmagic_dfu: usbdfu.o dfucore.o dfu_f1.o
$(CC) $^ -o $@ $(LDFLAGS_BOOT)
blackmagic_dfu.bin: blackmagic_dfu
$(OBJCOPY) -O binary $^ $@
blackmagic_dfu.hex: blackmagic_dfu
$(OBJCOPY) -O ihex $^ $@
dfu_upgrade: dfu_upgrade.o dfucore.o dfu_f1.o
$(CC) $^ -o $@ $(LDFLAGS)
dfu_upgrade.bin: dfu_upgrade
$(OBJCOPY) -O binary $^ $@
dfu_upgrade.hex: dfu_upgrade
$(OBJCOPY) -O ihex $^ $@
host_clean:
-rm blackmagic.bin blackmagic_dfu blackmagic_dfu.bin blackmagic_dfu.hex dfu_upgrade dfu_upgrade.bin dfu_upgrade.hex

View File

@ -22,18 +22,9 @@ SRC += cdcacm.c \
all: blackmagic.bin blackmagic_dfu.bin blackmagic_dfu.hex
blackmagic.bin: blackmagic
$(OBJCOPY) -O binary $^ $@
blackmagic_dfu: usbdfu.o dfucore.o dfu_f1.o
$(CC) $^ -o $@ $(LDFLAGS_BOOT)
blackmagic_dfu.bin: blackmagic_dfu
$(OBJCOPY) -O binary $^ $@
blackmagic_dfu.hex: blackmagic_dfu
$(OBJCOPY) -O ihex $^ $@
host_clean:
-rm blackmagic.bin blackmagic_dfu blackmagic_dfu.bin blackmagic_dfu.hex