makefile: Run clean before running build

This commit is contained in:
Alexander Heldt
2024-08-02 13:35:29 +02:00
parent d9389b4eb8
commit c84cf622f1

View File

@@ -31,7 +31,7 @@ ASM_FILES := $(patsubst $(BUILD_DIR)/%.i,$(BUILD_DIR)/%.S,$(PREP_FILES))
OBJ_FILES := $(patsubst $(BUILD_DIR)/%.S,$(BUILD_DIR)/%.o,$(ASM_FILES)) OBJ_FILES := $(patsubst $(BUILD_DIR)/%.S,$(BUILD_DIR)/%.o,$(ASM_FILES))
.PHONY: build .PHONY: build
build: builddir preprocess compile assemble $(BUILD_DIR)/$(TARGET).elf build: clean builddir preprocess compile assemble $(BUILD_DIR)/$(TARGET).elf
$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf
arm-none-eabi-objcopy -O binary $< $@ arm-none-eabi-objcopy -O binary $< $@