From 427e5d2a8a8585903efee0b7782c47aedabcc457 Mon Sep 17 00:00:00 2001 From: MokhaLeee Date: Sun, 29 Sep 2024 11:38:17 +0800 Subject: [PATCH 1/2] Fix tools mk In addition to the tools compiled with C, there are also some Python scripts that do not need to be compiled. They do not need make. Signed-off-by: MokhaLeee --- make_tools.mk | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/make_tools.mk b/make_tools.mk index 41e56c42a..6c931664e 100644 --- a/make_tools.mk +++ b/make_tools.mk @@ -1,14 +1,23 @@ MAKEFLAGS += --no-print-directory -TOOLDIRS := $(filter-out tools/agbcc,$(wildcard tools/*)) +TOOLDIRS := ./tools -.PHONY: all $(TOOLDIRS) clean +TOOLS := +TOOLS += $(TOOLDIRS)/aif2pcm +TOOLS += $(TOOLDIRS)/bin2c +TOOLS += $(TOOLDIRS)/textencode +TOOLS += $(TOOLDIRS)/jsonproc +TOOLS += $(TOOLDIRS)/mid2agb +TOOLS += $(TOOLDIRS)/scaninc +TOOLS += $(TOOLDIRS)/gbagfx -all: $(TOOLDIRS) +.PHONY: all $(TOOLS) clean -$(TOOLDIRS): +all: $(TOOLS) + +$(TOOLS): @$(MAKE) -C $@ clean: - @$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);) + @$(foreach tooldir,$(TOOLS),$(MAKE) clean -C $(tooldir);) From 974a26e69f13c3bcef66d4488091706c87fc1c77 Mon Sep 17 00:00:00 2001 From: MokhaLeee Date: Sun, 29 Sep 2024 15:03:35 +0800 Subject: [PATCH 2/2] move gfx py tools to ./scripts dir --- Makefile | 2 +- make_tools.mk | 19 +++++-------------- {tools => scripts}/gfxtools/lzss_compress.py | 0 .../gfxtools/lzss_decompress.py | 0 {tools => scripts}/gfxtools/lzss_lib.py | 0 {tools => scripts}/gfxtools/rom_def.py | 0 {tools => scripts}/gfxtools/tsa_analysis.py | 0 .../gfxtools/tsa_bin_analysis.py | 0 {tools => scripts}/gfxtools/tsa_generator.py | 0 9 files changed, 6 insertions(+), 15 deletions(-) rename {tools => scripts}/gfxtools/lzss_compress.py (100%) rename {tools => scripts}/gfxtools/lzss_decompress.py (100%) rename {tools => scripts}/gfxtools/lzss_lib.py (100%) rename {tools => scripts}/gfxtools/rom_def.py (100%) rename {tools => scripts}/gfxtools/tsa_analysis.py (100%) rename {tools => scripts}/gfxtools/tsa_bin_analysis.py (100%) rename {tools => scripts}/gfxtools/tsa_generator.py (100%) diff --git a/Makefile b/Makefile index 3e805dc71..403b84a3f 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ AIF2PCM := tools/aif2pcm/aif2pcm$(EXE) MID2AGB := tools/mid2agb/mid2agb$(EXE) TEXTENCODE := tools/textencode/textencode$(EXE) JSONPROC := tools/jsonproc/jsonproc$(EXE) -FETSATOOL := tools/gfxtools/tsa_generator.py +FETSATOOL := scripts/gfxtools/tsa_generator.py ifeq ($(UNAME),Darwin) SED := sed -i '' diff --git a/make_tools.mk b/make_tools.mk index 6c931664e..41e56c42a 100644 --- a/make_tools.mk +++ b/make_tools.mk @@ -1,23 +1,14 @@ MAKEFLAGS += --no-print-directory -TOOLDIRS := ./tools +TOOLDIRS := $(filter-out tools/agbcc,$(wildcard tools/*)) -TOOLS := -TOOLS += $(TOOLDIRS)/aif2pcm -TOOLS += $(TOOLDIRS)/bin2c -TOOLS += $(TOOLDIRS)/textencode -TOOLS += $(TOOLDIRS)/jsonproc -TOOLS += $(TOOLDIRS)/mid2agb -TOOLS += $(TOOLDIRS)/scaninc -TOOLS += $(TOOLDIRS)/gbagfx +.PHONY: all $(TOOLDIRS) clean -.PHONY: all $(TOOLS) clean +all: $(TOOLDIRS) -all: $(TOOLS) - -$(TOOLS): +$(TOOLDIRS): @$(MAKE) -C $@ clean: - @$(foreach tooldir,$(TOOLS),$(MAKE) clean -C $(tooldir);) + @$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);) diff --git a/tools/gfxtools/lzss_compress.py b/scripts/gfxtools/lzss_compress.py similarity index 100% rename from tools/gfxtools/lzss_compress.py rename to scripts/gfxtools/lzss_compress.py diff --git a/tools/gfxtools/lzss_decompress.py b/scripts/gfxtools/lzss_decompress.py similarity index 100% rename from tools/gfxtools/lzss_decompress.py rename to scripts/gfxtools/lzss_decompress.py diff --git a/tools/gfxtools/lzss_lib.py b/scripts/gfxtools/lzss_lib.py similarity index 100% rename from tools/gfxtools/lzss_lib.py rename to scripts/gfxtools/lzss_lib.py diff --git a/tools/gfxtools/rom_def.py b/scripts/gfxtools/rom_def.py similarity index 100% rename from tools/gfxtools/rom_def.py rename to scripts/gfxtools/rom_def.py diff --git a/tools/gfxtools/tsa_analysis.py b/scripts/gfxtools/tsa_analysis.py similarity index 100% rename from tools/gfxtools/tsa_analysis.py rename to scripts/gfxtools/tsa_analysis.py diff --git a/tools/gfxtools/tsa_bin_analysis.py b/scripts/gfxtools/tsa_bin_analysis.py similarity index 100% rename from tools/gfxtools/tsa_bin_analysis.py rename to scripts/gfxtools/tsa_bin_analysis.py diff --git a/tools/gfxtools/tsa_generator.py b/scripts/gfxtools/tsa_generator.py similarity index 100% rename from tools/gfxtools/tsa_generator.py rename to scripts/gfxtools/tsa_generator.py