mirror of
https://github.com/n64decomp/mk64
synced 2026-08-25 23:26:40 -04:00
Revert "Add ymls for Torch code generator (#497)"
This reverts commit 3da5a4f343.
This commit is contained in:
@@ -212,8 +212,7 @@ DATA_DIR := data
|
||||
INCLUDE_DIRS := include
|
||||
|
||||
# Directories containing source files
|
||||
SRC_ASSETS_DIR := assets/code/ceremony_data assets/code/startup_logo assets/code/data_800E45C0 assets/code/data_segment2 assets/code/data_800E8700 assets/code/common_data
|
||||
SRC_DIRS := src src/data src/buffers src/racing src/ending src/audio src/debug src/os src/os/math courses assets/code/ceremony_data assets/code/startup_logo $(SRC_ASSETS_DIR)
|
||||
SRC_DIRS := src src/data src/buffers src/racing src/ending src/audio src/debug src/os src/os/math courses
|
||||
ASM_DIRS := asm asm/os asm/unused $(DATA_DIR) $(DATA_DIR)/sound_data $(DATA_DIR)/karts
|
||||
|
||||
|
||||
@@ -224,7 +223,7 @@ TEXTURE_DIRS := textures/common
|
||||
|
||||
ALL_DIRS = $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(COURSE_DIRS) include $(ASM_DIRS) $(TEXTURES_DIR)/raw \
|
||||
$(TEXTURES_DIR)/standalone $(TEXTURES_DIR)/startup_logo $(TEXTURES_DIR)/crash_screen $(TEXTURES_DIR)/trophy $(TEXTURES_DIR)/courses \
|
||||
$(TEXTURE_DIRS) $(TEXTURE_DIRS)/tlut $(BIN_DIR)) assets/course_metadata
|
||||
$(TEXTURE_DIRS) $(TEXTURE_DIRS)/tlut $(BIN_DIR))
|
||||
|
||||
# file dependencies generated by splitter
|
||||
MAKEFILE_SPLIT = Makefile.split
|
||||
@@ -234,7 +233,7 @@ include $(MAKEFILE_SPLIT)
|
||||
# We filter them out from the regular C_FILES since we don't need nor want the
|
||||
# UTF-8 versions getting compiled
|
||||
EUC_JP_FILES := src/ending/credits.c src/code_80005FD0.c src/code_80091750.c
|
||||
C_FILES := $(filter-out %.inc.c,$(filter-out $(EUC_JP_FILES),$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))))
|
||||
C_FILES := $(filter-out $(EUC_JP_FILES),$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)))
|
||||
S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s))
|
||||
# Include source files in courses/course_name/files.c but exclude .inc.c files.
|
||||
COURSE_FILES := $(foreach dir,$(COURSE_DIRS),$(filter-out %.inc.c,$(wildcard $(dir)/*.c)))
|
||||
@@ -356,7 +355,6 @@ BIN2C := $(PYTHON) $(TOOLS_DIR)/bin2c.py
|
||||
EXTRACT_DATA_FOR_MIO := $(TOOLS_DIR)/extract_data_for_mio
|
||||
ASSET_EXTRACT := $(PYTHON) $(TOOLS_DIR)/new_extract_assets.py
|
||||
LINKONLY_GENERATOR := $(PYTHON) $(TOOLS_DIR)/linkonly_generator.py
|
||||
TORCH := tools/torch/torch
|
||||
EMULATOR = mupen64plus
|
||||
EMU_FLAGS = --noosd
|
||||
LOADER = loader64
|
||||
@@ -397,12 +395,6 @@ ifeq ($(COMPARE),1)
|
||||
@$(SHA1SUM) -c $(TARGET).sha1 > $(NULL_OUT) && $(PRINT) "$(TARGET): $(GREEN)OK$(NO_COL)\n" || ($(PRINT) "$(YELLOW)Building the ROM file has succeeded, but does not match the original ROM.\nThis is expected, and not an error, if you are making modifications.\nTo silence this message, use 'make COMPARE=0.' $(NO_COL)\n" && $(FALSE))
|
||||
endif
|
||||
|
||||
assets:
|
||||
@echo "Extracting torch assets..."
|
||||
@$(TORCH) code $(BASEROM) -v
|
||||
@$(TORCH) header $(BASEROM)
|
||||
@$(TORCH) modding export $(BASEROM)
|
||||
|
||||
doc:
|
||||
$(PYTHON) $(TOOLS_DIR)/doxygen_symbol_gen.py
|
||||
doxygen
|
||||
@@ -485,7 +477,7 @@ $(TEXTURE_FILES_TLUT):
|
||||
$(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(TEXTURE_FILES_TLUT))), ,$(TEXTURE_FILES_TLUT)))) -p $(BUILD_DIR)/$@.tlut.inc.c
|
||||
|
||||
# common textures
|
||||
$(BUILD_DIR)/assets/code/common_data/common_data.o: assets/code/common_data/common_data.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT)
|
||||
$(BUILD_DIR)/src/data/common_textures.o: src/data/common_textures.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT)
|
||||
@$(PRINT) "$(GREEN)Compiling Common Textures: $(BLUE)$@ $(NO_COL)\n"
|
||||
@$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $<
|
||||
$(V)$(CC) -c $(CFLAGS) -o $@ $<
|
||||
@@ -630,7 +622,7 @@ endif
|
||||
# Compile Trophy and Podium Models #
|
||||
#==============================================================================#
|
||||
|
||||
LDFLAGS += -R $(BUILD_DIR)/assets/code/ceremony_data/ceremony_data.elf
|
||||
LDFLAGS += -R $(BUILD_DIR)/src/ending/ceremony_data.elf
|
||||
|
||||
%/ceremony_data.elf: %/ceremony_data.o
|
||||
$(V)$(LD) -t -e 0 -Ttext=0B000000 -Map $@.map -o $@ $< --no-check-sections
|
||||
@@ -650,7 +642,7 @@ LDFLAGS += -R $(BUILD_DIR)/assets/code/ceremony_data/ceremony_data.elf
|
||||
# Compile Startup Logo #
|
||||
#==============================================================================#
|
||||
|
||||
LDFLAGS += -R $(BUILD_DIR)/assets/code/startup_logo/startup_logo.elf
|
||||
LDFLAGS += -R $(BUILD_DIR)/src/data/startup_logo.elf
|
||||
|
||||
%/startup_logo.elf: %/startup_logo.o
|
||||
$(V)$(LD) -t -e 0 -Ttext=06000000 -Map $@.map -o $@ $< --no-check-sections
|
||||
@@ -669,19 +661,19 @@ LDFLAGS += -R $(BUILD_DIR)/assets/code/startup_logo/startup_logo.elf
|
||||
# Compile Common Textures #
|
||||
#==============================================================================#
|
||||
|
||||
LDFLAGS += -R $(BUILD_DIR)/assets/code/common_data/common_data.elf
|
||||
LDFLAGS += -R $(BUILD_DIR)/src/data/common_textures.elf
|
||||
|
||||
%/common_data.elf: %/common_data.o
|
||||
%/common_textures.elf: %/common_textures.o
|
||||
$(V)$(LD) -t -e 0 -Ttext=0D000000 -Map $@.map -o $@ $< --no-check-sections
|
||||
|
||||
%/common_data.bin: %/common_data.elf
|
||||
%/common_textures.bin: %/common_textures.elf
|
||||
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@
|
||||
|
||||
%/common_data.mio0: %/common_data.bin
|
||||
%/common_textures.mio0: %/common_textures.bin
|
||||
@$(PRINT) "$(GREEN)Compressing Common Textures: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(MIO0TOOL) -c $< $@
|
||||
|
||||
%/common_data.mio0.s: %/common_data.mio0
|
||||
%/common_textures.mio0.s: %/common_textures.mio0
|
||||
$(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@
|
||||
|
||||
|
||||
@@ -696,7 +688,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
||||
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
|
||||
# Link MK64 ELF file
|
||||
$(ELF): $(O_FILES) $(COURSE_DATA_TARGETS) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/assets/code/startup_logo/startup_logo.mio0.o $(BUILD_DIR)/assets/code/ceremony_data/ceremony_data.mio0.o $(BUILD_DIR)/assets/code/common_data/common_data.mio0.o $(COURSE_GEOGRAPHY_TARGETS) undefined_syms.txt
|
||||
$(ELF): $(O_FILES) $(COURSE_DATA_TARGETS) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/src/data/startup_logo.mio0.o $(BUILD_DIR)/src/ending/ceremony_data.mio0.o $(BUILD_DIR)/src/data/common_textures.mio0.o $(COURSE_GEOGRAPHY_TARGETS) undefined_syms.txt
|
||||
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
$(V)$(LD) $(LDFLAGS) -o $@
|
||||
|
||||
@@ -714,7 +706,7 @@ $(BUILD_DIR)/$(TARGET).objdump: $(ELF)
|
||||
$(OBJDUMP) -D $< > $@
|
||||
|
||||
|
||||
.PHONY: all clean distclean distclean_assets default diff test load assets
|
||||
.PHONY: all clean distclean distclean_assets default diff test load
|
||||
# with no prerequisites, .SECONDARY causes no intermediate target to be removed
|
||||
.SECONDARY:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user