diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -70,6 +70,19 @@ LD_SCRIPT := $(BUILD_DIR)/ld_script.ld #### Main Rules #### +ALL_BUILDS := ruby ruby_rev1 ruby_rev1 sapphire sapphire_rev1 sapphire_rev2 ruby_de sapphire_de ruby_de_debug + +# Available targets +.PHONY: all clean tidy tools $(ALL_BUILDS) + +# Build tools when building the rom +# Disable dependency scanning for clean/tidy/tools +ifeq (,$(filter-out all,$(MAKECMDGOALS))) +$(info $(shell $(MAKE) tools)) +else +NODEP := 1 +endif + # Disable dependency scanning when NODEP is used for quick building ifeq ($(NODEP),) $(BUILD_DIR)/src/%.o: C_FILE = $(*D)/$(*F).c @@ -99,8 +112,23 @@ clean: tidy find sound/direct_sound_samples \( -iname '*.bin' \) -exec rm {} + $(RM) $(ALL_OBJECTS) find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' \) -exec rm {} + + $(MAKE) clean -C tools/gbagfx + $(MAKE) clean -C tools/scaninc + $(MAKE) clean -C tools/preproc + $(MAKE) clean -C tools/bin2c + $(MAKE) clean -C tools/rsfont + $(MAKE) clean -C tools/aif2pcm + $(MAKE) clean -C tools/ramscrgen + +tools: + $(MAKE) -C tools/gbagfx + $(MAKE) -C tools/scaninc + $(MAKE) -C tools/preproc + $(MAKE) -C tools/bin2c + $(MAKE) -C tools/rsfont + $(MAKE) -C tools/aif2pcm + $(MAKE) -C tools/ramscrgen -ALL_BUILDS := ruby ruby_rev1 ruby_rev1 sapphire sapphire_rev1 sapphire_rev2 ruby_de sapphire_de ruby_de_debug tidy: $(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map}) $(RM) -r build |