summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 76993668..523a0936 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
# Makefile to build Pokemon Diamond image
+include config.mk
+include filesystem.mk
+
.PHONY: clean tidy all default patch_mwasmarm
# Try to include devkitarm if installed
@@ -191,6 +194,7 @@ SHA1SUM = sha1sum
JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc
GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx
MWASMARM_PATCHER = $(TOOLS_DIR)/mwasmarm_patcher/mwasmarm_patcher$(EXE) -q
+MAKEBANNER = $(WINE) $(TOOLS_DIR)/bin/makebanner.exe
TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwccarm $(TOOLS_DIR)/bin,$(wildcard $(TOOLS_DIR)/*))
TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%)
@@ -268,9 +272,9 @@ arm7:
$(BINFILES): %.bin: %.sbin
@cp $< $@
-$(ELF): $(O_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BINFILES)
+$(ELF): $(BUILD_DIR)/$(LD_SCRIPT) $(O_FILES) $(BINFILES) $(BUILD_DIR)/pokediamond_bnr.bin
# Hack because mwldarm doesn't like the sbin suffix
- $(LD) $(LDFLAGS) $(BUILD_DIR)/$(LD_SCRIPT) -o $(ELF) $(O_FILES) $(BINFILES)
+ $(LD) $(LDFLAGS) -o $@ $^
$(ROM): $(ELF)
$(OBJCOPY) -O binary --gap-fill=0xFF --pad-to=0x04000000 $< $@
@@ -293,7 +297,11 @@ DUMMY != mkdir -p $(ALL_DIRS)
%.png: ;
%.pal: ;
-$(BUILD_DIR)/data/icon.o: graphics/icon.4bpp graphics/icon.gbapal
+$(BUILD_DIR)/pokediamond_bnr.bin: pokediamond.bsf graphics/icon.4bpp graphics/icon.gbapal
+ $(MAKEBANNER) $< $@
+
+symbols.csv: arm9 arm7
+ (echo "Name,Location"; grep -P " *[0-9A-F]{8} [0-9A-F]{8} \S+ +\w+\t\(\w+\.o\)" arm9/build/arm9.elf.xMAP arm7/build/arm7.elf.xMAP | sed -r 's/ *([0-9A-F]{8}) [0-9A-F]{8} \S+ +(\w+)\t\(\w+\.o\)/\2,\1/g' | cut -d: -f2) > $@
### Debug Print ###