sovereignx/make_tools.mk

33 lines
962 B
Makefile
Raw Permalink Normal View History

# This controls building executables in the `tools` folder.
# Can be invoked through the `Makefile` or standalone.
MAKEFLAGS += --no-print-directory
# Inclusive list. If you don't want a tool to be built, don't add it here.
TOOLS_DIR := tools
2024-09-13 18:27:40 +01:00
TOOL_NAMES := aif2pcm bin2c gbafix gbagfx jsonproc mapjson mid2agb preproc ramscrgen rsfont scaninc trainerproc
2024-09-13 19:26:42 +01:00
CHECK_TOOL_NAMES = patchelf mgba-rom-test-hydra
TOOLDIRS := $(TOOL_NAMES:%=$(TOOLS_DIR)/%)
2024-09-13 19:26:42 +01:00
CHECKTOOLDIRS := $(CHECK_TOOL_NAMES:%=$(TOOLS_DIR)/%)
# Tool making doesnt require a pokeemerald dependency scan.
2024-09-13 19:26:42 +01:00
RULES_NO_SCAN += tools check-tools clean-tools clean-check-tools $(TOOLDIRS) $(CHECKTOOLDIRS)
.PHONY: $(RULES_NO_SCAN)
tools: $(TOOLDIRS)
2024-09-13 19:26:42 +01:00
check-tools: $(CHECKTOOLDIRS)
$(TOOLDIRS):
@$(MAKE) -C $@
2024-09-13 19:26:42 +01:00
$(CHECKTOOLDIRS):
@$(MAKE) -C $@
clean-tools:
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
2024-09-13 19:26:42 +01:00
clean-check-tools:
@$(foreach tooldir,$(CHECKTOOLDIRS),$(MAKE) clean -C $(tooldir);)