Refactor makefile a bit

This commit is contained in:
Imbus 2025-02-09 17:44:13 +01:00
parent cc0eac299e
commit 48ef6cc258

View file

@ -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