mirror of
https://github.com/zeldaret/ph
synced 2026-07-09 22:11:40 -04:00
Auto-generate LCF
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
ROOT := $(shell pwd)
|
||||
BUILD_DIR := $(ROOT)/build
|
||||
TOOLS_DIR := $(ROOT)/tools
|
||||
LCF_FILE := $(ROOT)/arm9_linker_script.lcf
|
||||
OBJS_FILE := $(ROOT)/arm9_objects.txt
|
||||
LCF_FILE := $(BUILD_DIR)/arm9_linker_script.lcf
|
||||
OBJS_FILE := $(BUILD_DIR)/arm9_objects.txt
|
||||
|
||||
ASM_FILES := $(wildcard asm/*.s)
|
||||
CXX_FILES := $(wildcard src/*.cpp)
|
||||
@@ -23,7 +23,7 @@ LD_FLAGS := -proc arm946e -nostdlib -interworking -m func_02000800 -map closure
|
||||
all: arm9
|
||||
|
||||
.PHONY: arm9
|
||||
arm9: setup $(ASM_OBJS) link
|
||||
arm9: setup $(ASM_OBJS) lcf link
|
||||
|
||||
.PHONY: setup
|
||||
setup:
|
||||
@@ -33,6 +33,10 @@ setup:
|
||||
clean:
|
||||
rm -r build/
|
||||
|
||||
.PHONY: lcf
|
||||
lcf: $(TOOLS_DIR)/lcf.py
|
||||
python $(TOOLS_DIR)/lcf.py
|
||||
|
||||
$(ASM_OBJS): $(BUILD_DIR)/%.o: %.s
|
||||
mkdir -p $(dir $@)
|
||||
$(MW_ASM) $(ASM_FLAGS) $< -o $@
|
||||
|
||||
Reference in New Issue
Block a user