summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9637d98a8..ce3a6ec18 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,11 @@ include $(DEVKITARM)/base_tools
export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
+TITLE := POKEMON EMER
+GAME_CODE := BPEE
+MAKER_CODE := 01
+REVISION := 0
+
SHELL := /bin/bash -o pipefail
ROM := pokeemerald.gba
@@ -38,6 +43,7 @@ MID := $(abspath tools/mid2agb/mid2agb)
SCANINC := tools/scaninc/scaninc
PREPROC := tools/preproc/preproc
RAMSCRGEN := tools/ramscrgen/ramscrgen
+FIX := tools/gbafix/gbafix
# Clear the default suffixes
.SUFFIXES:
@@ -165,5 +171,6 @@ $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
$(ROM): $(ELF)
- $(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
+ $(OBJCOPY) -O binary $< $@
+ $(FIX) $@ -p -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION)