Fix make clean
This commit is contained in:
@@ -5,6 +5,8 @@ CPP := $(CC) -E
|
|||||||
LD := tools/binutils/bin/arm-none-eabi-ld
|
LD := tools/binutils/bin/arm-none-eabi-ld
|
||||||
OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy
|
OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy
|
||||||
|
|
||||||
|
RM := rm -f
|
||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
SHELL := /bin/bash -o pipefail
|
SHELL := /bin/bash -o pipefail
|
||||||
@@ -94,7 +96,9 @@ TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
|
|||||||
TOOLBASE = $(TOOLDIRS:tools/%=%)
|
TOOLBASE = $(TOOLDIRS:tools/%=%)
|
||||||
TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))
|
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
|
MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
@@ -117,14 +121,14 @@ compare:
|
|||||||
@$(MAKE) COMPARE=1
|
@$(MAKE) COMPARE=1
|
||||||
|
|
||||||
mostlyclean: tidy
|
mostlyclean: tidy
|
||||||
rm -f sound/direct_sound_samples/*.bin
|
$(RM) sound/direct_sound_samples/*.bin
|
||||||
rm -f $(SONG_OBJS) $(MID_SUBDIR)/*.s
|
$(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 {} +
|
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) $(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)/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 {} +
|
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||||
rm -f $(AUTO_GEN_TARGETS)
|
$(RM) $(AUTO_GEN_TARGETS)
|
||||||
@$(MAKE) clean -C berry_fix
|
@$(MAKE) -C berry_fix clean
|
||||||
|
|
||||||
clean-tools:
|
clean-tools:
|
||||||
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
|
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
|
||||||
@@ -132,8 +136,8 @@ clean-tools:
|
|||||||
clean: mostlyclean clean-tools
|
clean: mostlyclean clean-tools
|
||||||
|
|
||||||
tidy:
|
tidy:
|
||||||
rm -f $(ROM) $(ELF) $(MAP)
|
$(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map})
|
||||||
rm -r build/*
|
$(RM) -r build
|
||||||
@$(MAKE) -C berry_fix tidy
|
@$(MAKE) -C berry_fix tidy
|
||||||
|
|
||||||
include graphics_file_rules.mk
|
include graphics_file_rules.mk
|
||||||
|
|||||||
Reference in New Issue
Block a user