From 48ef6cc25828498cf48dfa16c57035c84aead02e Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 9 Feb 2025 17:44:13 +0100 Subject: [PATCH] Refactor makefile a bit --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 71ef99e..f90a85b 100644 --- a/Makefile +++ b/Makefile @@ -52,14 +52,14 @@ ch32%: @echo "Fetching $@" @curl $(CURL_FLAGS) $(BASE)/$@ -$(TARGET).bin : $(TARGET).elf - @$(OBJCOPY) -O binary $< $(TARGET).bin +%.bin : %.elf + $(OBJCOPY) -O binary $< $@ -$(TARGET).lst : $(TARGET).elf - @$(OBJDUMP) -S $^ > $(TARGET).lst +%.lst : %.elf + $(OBJDUMP) -S $^ > $@ -$(TARGET).hex : $(TARGET).elf - @$(OBJCOPY) -O ihex $< $(TARGET).hex +%.hex : %.elf + $(OBJCOPY) -O ihex $< $@ flash: $(TARGET).bin minichlink -w $(TARGET).bin flash -b