From 239b0b1d4343f987936019c76abb2bc7ff815fee Mon Sep 17 00:00:00 2001 From: Mor Date: Sat, 18 Apr 2020 17:32:11 +0300 Subject: rudimentary matching decompilation of NitroMain --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fac3e52f..cd4882a9 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,8 @@ OBJCOPY := $(CROSS)objcopy # ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o ASFLAGS = -proc arm5te -CFLAGS = -O4,p -proc v5te -thumb -fp soft -lang c -Cpp_exceptions off -interworking +CFLAGS = -O4,p -proc v5te -thumb -fp soft -lang c -Cpp_exceptions off +LDFLAGS = -nodead -w off -proc v5te -interworking ####################### Other Tools ######################### @@ -78,7 +79,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $< $(ELF): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) - $(LD) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) -nodead -w off + $(LD) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) $(LDFLAGS) $(ROM): $(ELF) $(OBJCOPY) -O binary $< $@ -- cgit v1.2.3 From f3d0e11e1e7023ebac9489345e81d11b942a83b3 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 19 Apr 2020 13:32:49 -0400 Subject: correct asm dependency. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a43a9c8..c66c9afd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile to build Pokemon Diamond image -.PHONY: clean tidy all default +.PHONY: clean tidy all default patch_mwasmarm # Try to include devkitarm if installed TOOLCHAIN := $(DEVKITARM) @@ -93,7 +93,7 @@ MWASMARM_PATCHER = tools/mwasmarm_patcher/mwasmarm_patcher$(EXE) ######################### Targets ########################### -all: $(ROM) +all: patch_mwasmarm $(ROM) @$(SHA1SUM) -c $(TARGET).sha1 clean: tidy @@ -110,14 +110,14 @@ ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS)) $(BUILD_DIR)/%.o: %.c $(CC) -c $(CFLAGS) -o $@ $< -$(BUILD_DIR)/%.o: %.s patch_mwasmarm +$(BUILD_DIR)/%.o: %.s $(AS) $(ASFLAGS) $< -o $@ -$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) +$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) undefined_syms.txt $(CPP) $(VERSION_CFLAGS) -MMD -MP -MT $@ -MF $@.d -I include/ -I . -DBUILD_DIR=$(BUILD_DIR) -o $@ $< $(ELF): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) - $(LD) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) -nodead -w off + $(LD) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) -map -nodead -w off $(ROM): $(ELF) $(OBJCOPY) -O binary $< $@ -- cgit v1.2.3