mirror of
https://github.com/zeldaret/oot
synced 2026-09-07 11:11:41 -04:00
Use incremental link for z_message/z_game_over data shenanigans (#2051)
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
@@ -361,7 +361,8 @@ O_FILES := $(foreach f,$(S_FILES:.s=.o),$(BUILD_DIR)/$f) \
|
||||
$(foreach f,$(SRC_C_FILES:.c=.o),$(BUILD_DIR)/$f) \
|
||||
$(foreach f,$(ASSET_C_FILES_EXTRACTED:.c=.o),$(f:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%)) \
|
||||
$(foreach f,$(ASSET_C_FILES_COMMITTED:.c=.o),$(BUILD_DIR)/$f) \
|
||||
$(foreach f,$(BASEROM_BIN_FILES),$(BUILD_DIR)/baserom/$(notdir $f).o)
|
||||
$(foreach f,$(BASEROM_BIN_FILES),$(BUILD_DIR)/baserom/$(notdir $f).o) \
|
||||
$(BUILD_DIR)/src/code/z_message_z_game_over.o
|
||||
|
||||
OVL_RELOC_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | $(BUILD_DIR_REPLACE) | grep -o '[^"]*_reloc.o' )
|
||||
|
||||
@@ -634,6 +635,10 @@ $(BUILD_DIR)/assets/%.o: $(EXTRACTED_DIR)/assets/%.c
|
||||
$(BUILD_DIR)/src/%.o: src/%.s
|
||||
$(CPP) $(CPPFLAGS) -Iinclude $< | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
# 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 $@ $^
|
||||
|
||||
$(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
|
||||
|
||||
@@ -758,7 +763,7 @@ ifneq ($(RUN_CC_CHECK),0)
|
||||
$(CC_CHECK) $<
|
||||
endif
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
|
||||
$(LD) -r -T linker_scripts/audio_table_rodata.ld $(@:.o=.tmp) -o $@
|
||||
$(LD) -r -T linker_scripts/data_with_rodata.ld $(@:.o=.tmp) -o $@
|
||||
@$(RM) $(@:.o=.tmp)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
Reference in New Issue
Block a user