summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-02-11 09:27:43 +0100
committerAetias <aetias@outlook.com>2024-02-11 09:27:43 +0100
commit4842e28f249aedcbac0766624b7e6bb29e176d71 (patch)
tree40619d70ddcb1cb01f275438cd7cbe6e0b1fd021
parent71202d778d877480ffdf20b70ea7c86bd5bd505c (diff)
Add `make eur` and `make usa`
-rw-r--r--Makefile26
1 files changed, 23 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f664e874..433d1471 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,10 @@
-REGION ?= EUR
-
ifeq ($(REGION), EUR)
REGION_NAME := eur
REGION_SUFFIX := P
else ifeq ($(REGION), USA)
REGION_NAME := usa
REGION_SUFFIX := E
-else
+else ifneq ($(REGION),)
$(error Unknown region '$(REGION)')
endif
@@ -52,6 +50,23 @@ ifeq ($(NONMATCHING),1)
CC_FLAGS += -DNONMATCHING
endif
+.PHONY: help
+help:
+ @echo "Usage:"
+ @echo "make extract .................... Extracts provided base ROMs"
+ @echo "make extract REGION=(USA|EUR) ... Extracts specific base ROM"
+ @echo "make eur ........................ Builds European ROM"
+ @echo "make usa ........................ Builds American ROM"
+ @echo "make clean ...................... Clean up build files"
+
+.PHONY: eur
+eur:
+ $(MAKE) all REGION=EUR
+
+.PHONY: usa
+usa:
+ $(MAKE) all REGION=USA
+
.PHONY: all
all: tools rom
sha1sum $(NDS_FILE)
@@ -72,7 +87,12 @@ endif
.PHONY: extract
extract: tools
+ifeq (,$(REGION))
+ $(MAKE) extract REGION=EUR
+ $(MAKE) extract REGION=USA
+else ifneq (,$(wildcard $(BASE_ROM)))
$(TOOLS_DIR)/rom/extractrom -o $(BASE_DIR) -i $(BASE_ROM)
+endif
.PHONY: arm9
arm9: link