summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2020-04-19 11:07:15 -0400
committerProjectRevoTPP <projectrevotpp@hotmail.com>2020-04-19 11:07:15 -0400
commitb3306f5d5a899cae77b9a954ae2798e9b648c899 (patch)
tree577034b08a523a6b74c04fc86c5e7086fa8611b5
parent668d5ecfff5a394428fa8a59a7fb7bbbe753bc4b (diff)
phony targets
-rw-r--r--Makefile7
-rw-r--r--tools/mwasmarm_patcher/Makefile4
2 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 71efca0f..3b9d1431 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
# Makefile to build Pokemon Diamond image
+.PHONY: clean tidy all default
+
# Try to include devkitarm if installed
TOOLCHAIN := $(DEVKITARM)
@@ -94,7 +96,10 @@ MWASMARM_PATCHER = tools/mwasmarm_patcher/mwasmarm_patcher$(EXE)
all: $(ROM)
@$(SHA1SUM) -c $(TARGET).sha1
-clean:
+clean: tidy
+ make -C tools/mwasmarm_patcher clean
+
+tidy:
$(RM) -r $(BUILD_DIR)
patch_mwasmarm:
diff --git a/tools/mwasmarm_patcher/Makefile b/tools/mwasmarm_patcher/Makefile
index bc3082dc..df3f5c20 100644
--- a/tools/mwasmarm_patcher/Makefile
+++ b/tools/mwasmarm_patcher/Makefile
@@ -1,7 +1,11 @@
+.PHONY: all clean
+
CC := gcc
CFLAGS := -O3
all: mwasmarm_patcher
+clean: ; rm -f mwasmarm_patcher$(EXE)
+
mwasmarm_patcher: mwasmarm_patcher.c
$(CC) $(CFLAGS) -o $@ $<