Add linking step
This commit is contained in:
5
Makefile
5
Makefile
@@ -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 $@
|
||||
|
||||
Reference in New Issue
Block a user