Change compression type to yay0 and ignore .inc.c files in most directories (#784)

rnc1 has noticeably slower load times in vanilla than yay0 does. gzip and mio0 are pretty useless and can be yeeted from the repo, but that's not part of this PR's scope.
This commit is contained in:
Gregory Heskett
2024-04-21 17:13:47 -04:00
committed by GitHub
parent ca937d23ee
commit 2ae3426957
3 changed files with 5 additions and 6 deletions

View File

@@ -269,7 +269,7 @@ BUILD_DIR_BASE := build
# BUILD_DIR is the location where all build artifacts are placed
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
COMPRESS ?= rnc1
COMPRESS ?= yay0
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
ifeq ($(COMPRESS),gzip)
DEFINES += GZIP=1
@@ -399,6 +399,9 @@ GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c))
S_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.s))
GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c
# Ignore all .inc.c files
C_FILES := $(filter-out %.inc.c,$(C_FILES))
# Sound files
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
@@ -913,7 +916,7 @@ $(BUILD_DIR)/asm/debug/map.o: asm/debug/map.s $(BUILD_DIR)/sm64_prelim.elf
# Link SM64 ELF file
$(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/libz.a $(BUILD_DIR)/libgoddard.a
@$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n"
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc -lrtc
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc
# Build ROM
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))

Binary file not shown.

View File

@@ -178,7 +178,6 @@ SECTIONS
*/ULTRALIB.a:*.o(.text*);
*/libnustd.a:*.o(.text*);
*/libgcc.a:*.o(.text*);
*/librtc.a:*.o(.text*);
*/libz.a:*.o(.text*);
*/libhvqm2.a:*.o(.text*);
lib/rspboot.o(.text*);
@@ -200,7 +199,6 @@ SECTIONS
#endif
*/ULTRALIB.a:*.o(.data*);
*/libhvqm2.a:*.o(.data*);
*/librtc.a:*.o(.data*);
*/libz.a:*.o(.data*);
#include "rspdata.inc.ld"
BUILD_DIR/lib/aspMain.o(.data*);
@@ -219,7 +217,6 @@ SECTIONS
#endif
*/ULTRALIB.a:*.o(.rodata*);
*/libgcc.a:*.o(.rodata*);
*/librtc.a:*.o(.rodata*);
*/libz.a:*.o(.rodata*);
lib/PR/hvqm/hvqm2sp1.o(.rodata*);
@@ -241,7 +238,6 @@ SECTIONS
*/ULTRALIB.a:*.o(.scommon);
*/ULTRALIB.a:*.o(.*bss*);
*/libhvqm2.a:*.o(.bss*);
*/librtc.a:*.o(.bss*);
*/libz.a:*.o(.bss*);
. = ALIGN(0x8);
}