From a03ce8e44753728ff82ae4bdf84de04a6e9a30ce Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 29 May 2020 15:10:17 -0400 Subject: add COMPARE option to Makefile(s). --- Makefile | 9 +++++++-- arm7/Makefile | 2 ++ arm9/Makefile | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 020ed45a..ef64ee92 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,9 @@ ifeq ($(NOWINE),1) WINE := endif +# Compare result of arm9, arm7, and ROM to sha1 hash(s) +COMPARE ?= 1 + ################ Target Executable and Sources ############### BUILD_DIR := build @@ -213,7 +216,9 @@ endif MAKEFLAGS += --no-print-directory all: $(ROM) +ifeq ($(COMPARE),1) @$(SHA1SUM) -c $(TARGET).sha1 +endif clean: mostlyclean make -C arm9 clean @@ -255,10 +260,10 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(SBINFILES): arm9 arm7 arm9: - $(MAKE) -C arm9 + $(MAKE) -C arm9 COMPARE=$(COMPARE) arm7: - $(MAKE) -C arm7 + $(MAKE) -C arm7 COMPARE=$(COMPARE) $(BINFILES): %.bin: %.sbin @cp $< $@ diff --git a/arm7/Makefile b/arm7/Makefile index 4d89fbd1..8e1dc1d0 100644 --- a/arm7/Makefile +++ b/arm7/Makefile @@ -117,7 +117,9 @@ endif MAKEFLAGS += --no-print-directory all: $(ROM) +ifeq ($(COMPARE),1) @$(SHA1SUM) -c $(TARGET).sha1 +endif clean: mostlyclean make -C $(TOOLS_DIR)/mwasmarm_patcher clean diff --git a/arm9/Makefile b/arm9/Makefile index 994575ff..b15d1b51 100644 --- a/arm9/Makefile +++ b/arm9/Makefile @@ -222,8 +222,10 @@ endif MAKEFLAGS += --no-print-directory all: $(ROM) +ifeq ($(COMPARE),1) @$(SHA1SUM) -c $(TARGET).sha1 @echo $(ROM): OK +endif clean: mostlyclean make -C $(TOOLS_DIR)/mwasmarm_patcher clean -- cgit v1.2.3