diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2019-12-21 10:20:00 -0500 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2019-12-21 10:20:00 -0500 |
commit | aa6618a597cdd852f84805d0fae70c781904fa84 (patch) | |
tree | 07e75bec8db4fb40e94b7ebe09e1c26aeaf51eaa | |
parent | e6c571df95941b197aa69861e71db3467bb5ffb7 (diff) |
Fix make clean
-rw-r--r-- | Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -5,6 +5,8 @@ CPP := $(CC) -E LD := tools/binutils/bin/arm-none-eabi-ld OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy +RM := rm -f + include config.mk SHELL := /bin/bash -o pipefail @@ -94,7 +96,9 @@ TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*)) TOOLBASE = $(TOOLDIRS:tools/%=%) TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE)) -.PHONY: all rom tools clean-tools mostlyclean clean compare tidy berry_fix $(TOOLDIRS) +ALL_BUILDS := firered firered_rev1 leafgreen leafgreen_rev1 + +.PHONY: all rom tools clean-tools mostlyclean clean compare tidy berry_fix $(TOOLDIRS) $(ALL_BUILDS) $(ALL_BUILDS:%=compare_%) MAKEFLAGS += --no-print-directory @@ -117,14 +121,14 @@ compare: @$(MAKE) COMPARE=1 mostlyclean: tidy - rm -f sound/direct_sound_samples/*.bin - rm -f $(SONG_OBJS) $(MID_SUBDIR)/*.s + $(RM) sound/direct_sound_samples/*.bin + $(RM) $(SONG_OBJS) $(MID_SUBDIR)/*.s find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} + - rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc - rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc + $(RM) $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc + $(RM) $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} + - rm -f $(AUTO_GEN_TARGETS) - @$(MAKE) clean -C berry_fix + $(RM) $(AUTO_GEN_TARGETS) + @$(MAKE) -C berry_fix clean clean-tools: @$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);) @@ -132,8 +136,8 @@ clean-tools: clean: mostlyclean clean-tools tidy: - rm -f $(ROM) $(ELF) $(MAP) - rm -r build/* + $(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map}) + $(RM) -r build @$(MAKE) -C berry_fix tidy include graphics_file_rules.mk |