summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-05-29 16:43:12 -0400
committerGitHub <noreply@github.com>2020-05-29 16:43:12 -0400
commit0ff1d4e382111d9d55245fa9e195508a426a0753 (patch)
tree5245f80d2ec0cb84656869a8d2dd6cb6d3199a9b
parente6c0d16a679663e816130ca7bc793cab682f911c (diff)
parenta03ce8e44753728ff82ae4bdf84de04a6e9a30ce (diff)
Merge pull request #129 from ProjectRevoTPP/makefile_compare
add COMPARE option to Makefile(s).
-rw-r--r--Makefile9
-rw-r--r--arm7/Makefile2
-rw-r--r--arm9/Makefile2
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