You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
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:
7
Makefile
7
Makefile
@@ -269,7 +269,7 @@ BUILD_DIR_BASE := build
|
|||||||
# BUILD_DIR is the location where all build artifacts are placed
|
# BUILD_DIR is the location where all build artifacts are placed
|
||||||
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
|
BUILD_DIR := $(BUILD_DIR_BASE)/$(VERSION)_$(CONSOLE)
|
||||||
|
|
||||||
COMPRESS ?= rnc1
|
COMPRESS ?= yay0
|
||||||
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
$(eval $(call validate-option,COMPRESS,mio0 yay0 gzip rnc1 rnc2 uncomp))
|
||||||
ifeq ($(COMPRESS),gzip)
|
ifeq ($(COMPRESS),gzip)
|
||||||
DEFINES += GZIP=1
|
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))
|
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
|
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 files
|
||||||
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
|
SOUND_BANK_FILES := $(wildcard sound/sound_banks/*.json)
|
||||||
SOUND_SAMPLE_DIRS := $(wildcard sound/samples/*)
|
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
|
# 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
|
$(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"
|
@$(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
|
# Build ROM
|
||||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||||
|
|||||||
BIN
lib/librtc.a
BIN
lib/librtc.a
Binary file not shown.
4
sm64.ld
4
sm64.ld
@@ -178,7 +178,6 @@ SECTIONS
|
|||||||
*/ULTRALIB.a:*.o(.text*);
|
*/ULTRALIB.a:*.o(.text*);
|
||||||
*/libnustd.a:*.o(.text*);
|
*/libnustd.a:*.o(.text*);
|
||||||
*/libgcc.a:*.o(.text*);
|
*/libgcc.a:*.o(.text*);
|
||||||
*/librtc.a:*.o(.text*);
|
|
||||||
*/libz.a:*.o(.text*);
|
*/libz.a:*.o(.text*);
|
||||||
*/libhvqm2.a:*.o(.text*);
|
*/libhvqm2.a:*.o(.text*);
|
||||||
lib/rspboot.o(.text*);
|
lib/rspboot.o(.text*);
|
||||||
@@ -200,7 +199,6 @@ SECTIONS
|
|||||||
#endif
|
#endif
|
||||||
*/ULTRALIB.a:*.o(.data*);
|
*/ULTRALIB.a:*.o(.data*);
|
||||||
*/libhvqm2.a:*.o(.data*);
|
*/libhvqm2.a:*.o(.data*);
|
||||||
*/librtc.a:*.o(.data*);
|
|
||||||
*/libz.a:*.o(.data*);
|
*/libz.a:*.o(.data*);
|
||||||
#include "rspdata.inc.ld"
|
#include "rspdata.inc.ld"
|
||||||
BUILD_DIR/lib/aspMain.o(.data*);
|
BUILD_DIR/lib/aspMain.o(.data*);
|
||||||
@@ -219,7 +217,6 @@ SECTIONS
|
|||||||
#endif
|
#endif
|
||||||
*/ULTRALIB.a:*.o(.rodata*);
|
*/ULTRALIB.a:*.o(.rodata*);
|
||||||
*/libgcc.a:*.o(.rodata*);
|
*/libgcc.a:*.o(.rodata*);
|
||||||
*/librtc.a:*.o(.rodata*);
|
|
||||||
*/libz.a:*.o(.rodata*);
|
*/libz.a:*.o(.rodata*);
|
||||||
|
|
||||||
lib/PR/hvqm/hvqm2sp1.o(.rodata*);
|
lib/PR/hvqm/hvqm2sp1.o(.rodata*);
|
||||||
@@ -241,7 +238,6 @@ SECTIONS
|
|||||||
*/ULTRALIB.a:*.o(.scommon);
|
*/ULTRALIB.a:*.o(.scommon);
|
||||||
*/ULTRALIB.a:*.o(.*bss*);
|
*/ULTRALIB.a:*.o(.*bss*);
|
||||||
*/libhvqm2.a:*.o(.bss*);
|
*/libhvqm2.a:*.o(.bss*);
|
||||||
*/librtc.a:*.o(.bss*);
|
|
||||||
*/libz.a:*.o(.bss*);
|
*/libz.a:*.o(.bss*);
|
||||||
. = ALIGN(0x8);
|
. = ALIGN(0x8);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user