mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-24 07:51:48 +00:00
Merge branch 'main' into meta_new_assets_2025
This commit is contained in:
commit
f70a07f8cf
71 changed files with 6590 additions and 14549 deletions
42
Makefile
42
Makefile
|
@ -1,7 +1,7 @@
|
|||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
# Ensure the build fails if a piped command fails
|
||||
SHELL = /bin/bash
|
||||
SHELL = /usr/bin/env bash
|
||||
.SHELLFLAGS = -o pipefail -c
|
||||
|
||||
#### Build options ####
|
||||
|
@ -36,6 +36,7 @@ COMPILER ?= ido
|
|||
# gc-eu GameCube Europe/PAL
|
||||
# gc-eu-mq GameCube Europe/PAL Master Quest
|
||||
# gc-jp-ce GameCube Japan (Collector's Edition disc)
|
||||
# ique-cn iQue Player (Simplified Chinese)
|
||||
VERSION ?= gc-eu-mq-dbg
|
||||
# Number of threads to extract and compress with.
|
||||
N_THREADS ?= $(shell nproc)
|
||||
|
@ -167,7 +168,6 @@ else ifeq ($(VERSION),gc-jp-ce)
|
|||
BUILD_TIME := 21:53:00
|
||||
REVISION := 15
|
||||
else ifeq ($(VERSION),ique-cn)
|
||||
COMPARE := 0
|
||||
REGION ?= US
|
||||
PLATFORM := IQUE
|
||||
DEBUG_FEATURES ?= 0
|
||||
|
@ -410,8 +410,8 @@ MAP := $(ROM:.z64=.map)
|
|||
LDSCRIPT := $(ROM:.z64=.ld)
|
||||
|
||||
# description of ROM segments
|
||||
SPEC := spec
|
||||
SPEC_INCLUDES := $(wildcard spec_includes/*.inc)
|
||||
SPEC := spec/spec
|
||||
SPEC_INCLUDES := $(wildcard spec/*.inc)
|
||||
|
||||
SRC_DIRS := $(shell find src -type d)
|
||||
UNDECOMPILED_DATA_DIRS := $(shell find data -type d)
|
||||
|
@ -493,7 +493,7 @@ ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN_EXTRACTED:.bin=.inc.c),$(f:$(EX
|
|||
$(foreach f,$(ASSET_FILES_BIN_COMMITTED:.bin=.inc.c),$(BUILD_DIR)/$f)
|
||||
|
||||
# Find all .o files included in the spec
|
||||
SPEC_O_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | $(BUILD_DIR_REPLACE) | sed -n -E 's/^[ \t]*include[ \t]*"([a-zA-Z0-9/_.-]+\.o)"/\1/p')
|
||||
SPEC_O_FILES := $(shell $(CPP) $(CPPFLAGS) -I. $(SPEC) | $(BUILD_DIR_REPLACE) | sed -n -E 's/^[ \t]*include[ \t]*"([a-zA-Z0-9/_.-]+\.o)"/\1/p')
|
||||
|
||||
# Split out reloc files
|
||||
O_FILES := $(filter-out %_reloc.o,$(SPEC_O_FILES))
|
||||
|
@ -585,7 +585,7 @@ EGCS_O_FILES += $(BUILD_DIR)/src/code/z_sram.o
|
|||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o
|
||||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/actors/ovl_End_Title/z_end_title.o
|
||||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/actors/ovl_Fishing/z_fishing.o
|
||||
# EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o
|
||||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o
|
||||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_opening/z_opening.o
|
||||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_title/z_title.o
|
||||
EGCS_O_FILES += $(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.o
|
||||
|
@ -603,6 +603,7 @@ $(BUILD_DIR)/src/libc/%.o: CFLAGS := $(EGCS_CFLAGS) -mno-abicalls
|
|||
$(BUILD_DIR)/src/libc/%.o: CCASFLAGS := $(EGCS_CCASFLAGS)
|
||||
$(BUILD_DIR)/src/libc/%.o: OPTFLAGS := -O1
|
||||
$(BUILD_DIR)/src/libc/%.o: MIPS_VERSION :=
|
||||
$(BUILD_DIR)/src/libc/memmove.o: MIPS_VERSION := -mips2
|
||||
else ifeq ($(DEBUG_FEATURES),1)
|
||||
$(BUILD_DIR)/src/libc/%.o: OPTFLAGS := -g
|
||||
$(BUILD_DIR)/src/libc/%.o: ASOPTFLAGS := -g
|
||||
|
@ -825,10 +826,18 @@ $(ROMC): $(ROM) $(ELF) $(BUILD_DIR)/compress_ranges.txt
|
|||
$(PYTHON) tools/compress.py --in $(ROM) --out $@ --dmadata-start `./tools/dmadata_start.sh $(NM) $(ELF)` --compress `cat $(BUILD_DIR)/compress_ranges.txt` --threads $(N_THREADS) $(COMPRESS_ARGS)
|
||||
$(PYTHON) -m ipl3checksum sum --cic $(CIC) --update $@
|
||||
|
||||
COM_PLUGIN := tools/com-plugin/common-plugin.so
|
||||
|
||||
LDFLAGS := -T $(LDSCRIPT) -T $(BUILD_DIR)/linker_scripts/makerom.ld -T $(BUILD_DIR)/undefined_syms.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map $(MAP)
|
||||
ifeq ($(PLATFORM),IQUE)
|
||||
LDFLAGS += -plugin $(COM_PLUGIN) -plugin-opt order=$(BASEROM_DIR)/bss-order.txt
|
||||
$(ELF): $(BASEROM_DIR)/bss-order.txt
|
||||
endif
|
||||
|
||||
$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) $(LDSCRIPT) $(BUILD_DIR)/linker_scripts/makerom.ld $(BUILD_DIR)/undefined_syms.txt \
|
||||
$(SAMPLEBANK_O_FILES) $(SOUNDFONT_O_FILES) $(SEQUENCE_O_FILES) \
|
||||
$(BUILD_DIR)/assets/audio/sequence_font_table.o $(BUILD_DIR)/assets/audio/audiobank_padding.o
|
||||
$(LD) -T $(LDSCRIPT) -T $(BUILD_DIR)/linker_scripts/makerom.ld -T $(BUILD_DIR)/undefined_syms.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map $(MAP) -o $@
|
||||
$(LD) $(LDFLAGS) -o $@
|
||||
|
||||
$(BUILD_DIR)/linker_scripts/makerom.ld: linker_scripts/makerom.ld
|
||||
$(CPP) -I include $(CPPFLAGS) $< > $@
|
||||
|
@ -845,10 +854,10 @@ $(O_FILES): | asset_files
|
|||
|
||||
.PHONY: o_files asset_files
|
||||
|
||||
$(BUILD_DIR)/$(SPEC): $(SPEC) $(SPEC_INCLUDES)
|
||||
$(CPP) $(CPPFLAGS) $< | $(BUILD_DIR_REPLACE) > $@
|
||||
$(BUILD_DIR)/spec: $(SPEC) $(SPEC_INCLUDES)
|
||||
$(CPP) $(CPPFLAGS) -I. $< | $(BUILD_DIR_REPLACE) > $@
|
||||
|
||||
$(LDSCRIPT): $(BUILD_DIR)/$(SPEC)
|
||||
$(LDSCRIPT): $(BUILD_DIR)/spec
|
||||
$(MKLDSCRIPT) $< $@
|
||||
|
||||
$(BUILD_DIR)/undefined_syms.txt: undefined_syms.txt
|
||||
|
@ -927,9 +936,9 @@ endif
|
|||
|
||||
# Incremental link to move z_message and z_game_over data into rodata
|
||||
$(BUILD_DIR)/src/code/z_message_z_game_over.o: $(BUILD_DIR)/src/code/z_message.o $(BUILD_DIR)/src/code/z_game_over.o
|
||||
$(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $^
|
||||
$(LD) -r -G 0 -T linker_scripts/data_with_rodata.ld -o $@ $^
|
||||
|
||||
$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/$(SPEC)
|
||||
$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/spec
|
||||
$(MKDMADATA) $< $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt
|
||||
|
||||
# Dependencies for files that may include the dmadata header automatically generated from the spec file
|
||||
|
@ -964,8 +973,15 @@ endif
|
|||
$(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $(@:.o=.tmp)
|
||||
@$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s)
|
||||
|
||||
$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/$(SPEC)
|
||||
ifeq ($(PLATFORM),IQUE)
|
||||
ifneq ($(NON_MATCHING),1)
|
||||
$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/ovl_kaleido_scope_reloc.o: POSTPROCESS_OBJ := $(PYTHON) tools/patch_ique_kaleido_reloc.py
|
||||
endif
|
||||
endif
|
||||
|
||||
$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/spec
|
||||
$(FADO) $$(tools/reloc_prereq $< $(notdir $*)) -n $(notdir $*) -o $(@:.o=.s) -M $(@:.o=.d)
|
||||
$(POSTPROCESS_OBJ) $(@:.o=.s)
|
||||
$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
|
||||
|
||||
$(BUILD_DIR)/assets/%.inc.c: assets/%.png
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue