summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e7fecae4..07235c57 100644
--- a/Makefile
+++ b/Makefile
@@ -142,7 +142,7 @@ endif
.SECONDARY:
.DELETE_ON_ERROR:
.SECONDEXPANSION:
-.PHONY: all libs clean mostlyclean tidy tools $(TOOLDIRS) patch_mwasmarm arm9 arm7
+.PHONY: all libs clean mostlyclean tidy tools clean-tools $(TOOLDIRS) patch_mwasmarm arm9 arm7
MAKEFLAGS += --no-print-directory
@@ -151,10 +151,9 @@ ifeq ($(COMPARE),1)
@$(SHA1SUM) -c $(TARGET).sha1
endif
-clean: mostlyclean clean-fs
+clean: mostlyclean clean-fs clean-tools
$(MAKE) -C arm9 clean
$(MAKE) -C arm7 clean
- $(MAKE) -C tools/mwasmarm_patcher clean
clean-fs:
$(RM) $(filter %.narc %.arc,$(HOSTFS_FILES))
@@ -176,10 +175,13 @@ tools: $(TOOLDIRS)
$(TOOLDIRS):
@$(HOST_VARS) $(MAKE) -C $@
+clean-tools:
+ $(foreach tool,$(TOOLDIRS),$(MAKE) clean -C $(tool);)
+
$(MWASMARM): patch_mwasmarm
@:
-patch_mwasmarm:
+patch_mwasmarm: tools/mwasmarm_patcher
$(MWASMARM_PATCHER) $(MWASMARM)
ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS))