make distclean invoke cleantools (#158)

This commit is contained in:
wRadion 2022-08-26 02:30:19 +02:00 committed by GitHub
parent 748b7e9134
commit 029dcb9bdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 15 deletions

View File

@ -228,7 +228,7 @@ else ifeq ($(DEBUG_INFO_LEVEL),1)
else ifeq ($(DEBUG_INFO_LEVEL),0) else ifeq ($(DEBUG_INFO_LEVEL),0)
# If we're compiling with -0g. I don't believe this will do anything worthwhile. # If we're compiling with -0g. I don't believe this will do anything worthwhile.
OPT_FLAGS += -g0 OPT_FLAGS += -g0
else else
# This is our default AND level 2. # This is our default AND level 2.
OPT_FLAGS += -g OPT_FLAGS += -g
endif endif
@ -357,7 +357,7 @@ ifeq ($(HEADLESS),1)
RENDER_API := DUMMY RENDER_API := DUMMY
WINDOW_API := DUMMY WINDOW_API := DUMMY
AUDIO_API := DUMMY AUDIO_API := DUMMY
CONTROLLER_API := CONTROLLER_API :=
endif endif
ifeq ($(TARGET_RPI),1) ifeq ($(TARGET_RPI),1)
@ -606,7 +606,7 @@ RPC_LIBS :=
#ifeq ($(DISCORDRPC),1) #ifeq ($(DISCORDRPC),1)
# ifeq ($(WINDOWS_BUILD),1) # ifeq ($(WINDOWS_BUILD),1)
# RPC_LIBS := lib/discord/libdiscord-rpc.dll # RPC_LIBS := lib/discord/libdiscord-rpc.dll
# else ifeq ($(OSX_BUILD),1) # else ifeq ($(OSX_BUILD),1)
# # needs testing # # needs testing
# RPC_LIBS := lib/discord/libdiscord-rpc.dylib # RPC_LIBS := lib/discord/libdiscord-rpc.dylib
# else # else
@ -827,7 +827,7 @@ ifeq ($(SDL1_USED)$(SDL2_USED),11)
endif endif
# SDL can be used by different systems, so we consolidate all of that shit into this # SDL can be used by different systems, so we consolidate all of that shit into this
ifeq ($(SDL2_USED),1) ifeq ($(SDL2_USED),1)
SDLCONFIG := $(CROSS)sdl2-config SDLCONFIG := $(CROSS)sdl2-config
BACKEND_CFLAGS += -DHAVE_SDL2=1 BACKEND_CFLAGS += -DHAVE_SDL2=1
@ -844,7 +844,7 @@ ifneq ($(SDL1_USED)$(SDL2_USED),00)
else else
BACKEND_CFLAGS += `$(SDLCONFIG) --cflags` BACKEND_CFLAGS += `$(SDLCONFIG) --cflags`
endif endif
ifeq ($(WINDOWS_BUILD),1) ifeq ($(WINDOWS_BUILD),1)
BACKEND_LDFLAGS += `$(SDLCONFIG) --static-libs` -lsetupapi -luser32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion BACKEND_LDFLAGS += `$(SDLCONFIG) --static-libs` -lsetupapi -luser32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion
else else
@ -886,7 +886,7 @@ ifeq ($(TARGET_N64),1)
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d))) RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
else else
ASFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d)) ASFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
RSPASMFLAGS := RSPASMFLAGS :=
endif endif
# C preprocessor flags # C preprocessor flags
@ -1207,9 +1207,9 @@ clean:
cleantools: cleantools:
$(MAKE) -s -C $(TOOLS_DIR) clean $(MAKE) -s -C $(TOOLS_DIR) clean
distclean: clean distclean: clean cleantools
$(PYTHON) extract_assets.py --clean $(PYTHON) extract_assets.py --clean
test: $(ROM) test: $(ROM)
$(EMULATOR) $(EMU_FLAGS) $< $(EMULATOR) $(EMU_FLAGS) $<
@ -1220,7 +1220,7 @@ libultra: $(BUILD_DIR)/libultra.a
$(BUILD_DIR)/$(RPC_LIBS): $(BUILD_DIR)/$(RPC_LIBS):
@$(CP) -f $(RPC_LIBS) $(BUILD_DIR) @$(CP) -f $(RPC_LIBS) $(BUILD_DIR)
$(BUILD_DIR)/$(DISCORD_SDK_LIBS): $(BUILD_DIR)/$(DISCORD_SDK_LIBS):
@$(CP) -f $(DISCORD_SDK_LIBS) $(BUILD_DIR) @$(CP) -f $(DISCORD_SDK_LIBS) $(BUILD_DIR)
@ -1301,7 +1301,7 @@ else
$(BUILD_DIR)/%: %.png $(BUILD_DIR)/%: %.png
$(call print,Converting:,$<,$@) $(call print,Converting:,$<,$@)
$(V)$(N64GRAPHICS) -s raw -i $@ -g $< -f $(lastword $(subst ., ,$@)) $(V)$(N64GRAPHICS) -s raw -i $@ -g $< -f $(lastword $(subst ., ,$@))
$(BUILD_DIR)/%.inc.c: %.png $(BUILD_DIR)/%.inc.c: %.png
$(call print,Converting:,$<,$@) $(call print,Converting:,$<,$@)
$(V)$(N64GRAPHICS) -s $(TEXTURE_ENCODING) -i $@ -g $< -f $(lastword ,$(subst ., ,$(basename $<))) $(V)$(N64GRAPHICS) -s $(TEXTURE_ENCODING) -i $@ -g $< -f $(lastword ,$(subst ., ,$(basename $<)))
@ -1355,7 +1355,7 @@ $(BUILD_DIR)/%.mio0: $(BUILD_DIR)/%.bin
$(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0 $(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0
$(call print,Converting MIO0 to ELF:,$<,$@) $(call print,Converting MIO0 to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@ $(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@
endif endif
@ -1556,7 +1556,7 @@ endif
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
$(call print,Preprocessing linker script:,$<,$@) $(call print,Preprocessing linker script:,$<,$@)
$(V)$(CPP) $(PROF_FLAGS) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $< $(V)$(CPP) $(PROF_FLAGS) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
# Assemble assembly code # Assemble assembly code
$(BUILD_DIR)/%.o: %.s $(BUILD_DIR)/%.o: %.s
$(call print,Assembling:,$<,$@) $(call print,Assembling:,$<,$@)
@ -1567,7 +1567,7 @@ ifeq ($(TARGET_N64),1)
$(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s $(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
$(call print,Assembling:,$<,$@) $(call print,Assembling:,$<,$@)
$(V)$(RSPASM) -sym $@.sym $(RSPASMFLAGS) -strequ CODE_FILE $(BUILD_DIR)/rsp/$*.bin -strequ DATA_FILE $(BUILD_DIR)/rsp/$*_data.bin $< $(V)$(RSPASM) -sym $@.sym $(RSPASMFLAGS) -strequ CODE_FILE $(BUILD_DIR)/rsp/$*.bin -strequ DATA_FILE $(BUILD_DIR)/rsp/$*_data.bin $<
# Link libultra # Link libultra
$(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES) $(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES)
@$(PRINT) "$(GREEN)Linking libultra: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Linking libultra: $(BLUE)$@ $(NO_COL)\n"
@ -1578,7 +1578,7 @@ ifeq ($(TARGET_N64),1)
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES) $(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
@$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Linking libgoddard: $(BLUE)$@ $(NO_COL)\n"
$(V)$(AR) rcs -o $@ $(GODDARD_O_FILES) $(V)$(AR) rcs -o $@ $(GODDARD_O_FILES)
# Link SM64 ELF file # Link SM64 ELF file
$(ELF): $(O_FILES) $(MIO0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libultra.a $(BUILD_DIR)/libgoddard.a $(ELF): $(O_FILES) $(MIO0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) undefined_syms.txt $(BUILD_DIR)/libultra.a $(BUILD_DIR)/libgoddard.a
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
@ -1589,7 +1589,7 @@ ifeq ($(TARGET_N64),1)
$(call print,Building ROM:,$<,$@) $(call print,Building ROM:,$<,$@)
$(V)$(OBJCOPY) --pad-to=0x800000 --gap-fill=0xFF $< $(@:.z64=.bin) -O binary $(V)$(OBJCOPY) --pad-to=0x800000 --gap-fill=0xFF $< $(@:.z64=.bin) -O binary
$(V)$(N64CKSUM) $(@:.z64=.bin) $@ $(V)$(N64CKSUM) $(@:.z64=.bin) $@
$(BUILD_DIR)/$(TARGET).objdump: $(ELF) $(BUILD_DIR)/$(TARGET).objdump: $(ELF)
$(OBJDUMP) -D $< > $@ $(OBJDUMP) -D $< > $@
else else