Add linking step

This commit is contained in:
Alexander Heldt
2024-06-22 19:20:43 +02:00
parent 4c77450e47
commit 8c8a72df71
8 changed files with 5643 additions and 1 deletions

View File

@@ -28,7 +28,10 @@ ASM_FILES := $(patsubst $(BUILD_DIR)/%.i,$(BUILD_DIR)/%.S,$(PREP_FILES))
OBJ_FILES := $(patsubst $(BUILD_DIR)/%.S,$(BUILD_DIR)/%.o,$(ASM_FILES))
.PHONY: build
build: builddir preprocess compile assemble
build: builddir preprocess compile assemble $(BUILD_DIR)/final.elf
$(BUILD_DIR)/final.elf: $(OBJ_FILES)
$(CC) $(LDFLAGS) $^ -o $@
$(BUILD_DIR)/%.i: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -E $^ -o $@