2023-11-11 22:51:04 +13:00
|
|
|
# This controls building executables in the `tools` folder.
|
|
|
|
# Can be invoked through the `Makefile` or standalone.
|
2021-06-01 20:40:11 -04:00
|
|
|
|
2021-06-01 23:22:15 -04:00
|
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
|
2023-02-25 16:48:16 -03:00
|
|
|
# Inclusive list. If you don't want a tool to be built, don't add it here.
|
2023-11-11 22:51:04 +13:00
|
|
|
TOOLS_DIR := tools
|
2025-05-30 23:10:54 +02:00
|
|
|
TOOL_NAMES := aif2pcm bin2c gbafix gbagfx jsonproc mapjson mid2agb preproc ramscrgen rsfont scaninc trainerproc compresSmol
|
2024-09-13 15:26:42 -03:00
|
|
|
CHECK_TOOL_NAMES = patchelf mgba-rom-test-hydra
|
2021-06-01 20:40:11 -04:00
|
|
|
|
2023-11-11 22:51:04 +13:00
|
|
|
TOOLDIRS := $(TOOL_NAMES:%=$(TOOLS_DIR)/%)
|
2024-09-13 15:26:42 -03:00
|
|
|
CHECKTOOLDIRS := $(CHECK_TOOL_NAMES:%=$(TOOLS_DIR)/%)
|
2021-06-01 20:40:11 -04:00
|
|
|
|
2023-11-12 13:20:09 +13:00
|
|
|
# Tool making doesnt require a pokeemerald dependency scan.
|
2025-08-04 11:24:49 -04:00
|
|
|
RULES_NO_SCAN += tools check-tools clean-tools clean-check-tools history $(TOOLDIRS) $(CHECKTOOLDIRS)
|
2023-11-12 13:20:09 +13:00
|
|
|
.PHONY: $(RULES_NO_SCAN)
|
2023-11-11 22:51:04 +13:00
|
|
|
|
2025-08-04 11:24:49 -04:00
|
|
|
tools: history $(TOOLDIRS)
|
2021-06-01 20:40:11 -04:00
|
|
|
|
2024-09-13 15:26:42 -03:00
|
|
|
check-tools: $(CHECKTOOLDIRS)
|
|
|
|
|
2021-06-01 20:40:11 -04:00
|
|
|
$(TOOLDIRS):
|
|
|
|
@$(MAKE) -C $@
|
2023-11-11 22:51:04 +13:00
|
|
|
|
2024-09-13 15:26:42 -03:00
|
|
|
$(CHECKTOOLDIRS):
|
|
|
|
@$(MAKE) -C $@
|
|
|
|
|
2023-11-11 22:51:04 +13:00
|
|
|
clean-tools:
|
|
|
|
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
|
2024-09-13 15:26:42 -03:00
|
|
|
|
|
|
|
clean-check-tools:
|
|
|
|
@$(foreach tooldir,$(CHECKTOOLDIRS),$(MAKE) clean -C $(tooldir);)
|
2025-08-04 11:24:49 -04:00
|
|
|
|
|
|
|
history:
|
|
|
|
@$(SHELL) ./check_history.sh
|