From 1f4c88c95243e8d75f25d5b7868c837c47aa578d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 3 Sep 2019 15:33:11 -0400 Subject: Copy Berry Fix MB dism from FR (#777) * Copy Berry Fix MB dism from FR --- Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6222e8787..e38869ca6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ TOOLCHAIN := $(DEVKITARM) +COMPARE ?= 0 ifeq ($(CC),) HOSTCC := gcc @@ -108,7 +109,7 @@ MAKEFLAGS += --no-print-directory # Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: -.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) +.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line)))) @@ -154,11 +155,13 @@ tools: $(TOOLDIRS) $(TOOLDIRS): @$(MAKE) -C $@ CC=$(HOSTCC) CXX=$(HOSTCXX) -rom: $(ROM) +rom: berry_fix $(ROM) +ifeq ($(COMPARE),1) + @$(SHA1) rom.sha1 +endif # For contributors to make sure a change didn't affect the contents of the ROM. -compare: all - @$(SHA1) rom.sha1 +compare: ; @$(MAKE) COMPARE=1 clean: mostlyclean clean-tools @@ -173,6 +176,7 @@ mostlyclean: tidy rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} + rm -f $(AUTO_GEN_TARGETS) + @$(MAKE) clean -C berry_fix tidy: rm -f $(ROM) $(ELF) $(MAP) @@ -297,3 +301,8 @@ $(ROM): $(ELF) $(FIX) $@ -p --silent modern: ; @$(MAKE) MODERN=1 + +berry_fix/berry_fix.gba: berry_fix + +berry_fix: + @$(MAKE) -C berry_fix COMPARE=$(COMPARE) -- cgit v1.2.3