You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Replace debug libultra builds with their ido counterparts (#572)
* Replace debug libultra builds with their ido counterparts This is necessary because GameCube controllers apparently rely on the IDO build, also the release build is IDO anyway * Remove fallthrough warnings from usb/debug.c * remove need for debug libultra with unf and use lib define in ld Co-authored-by: thecozies <collinpferguson@gmail.com>
This commit is contained in:
12
Makefile
12
Makefile
@@ -213,7 +213,6 @@ endif
|
||||
ifeq ($(UNF),1)
|
||||
DEFINES += UNF=1
|
||||
SRC_DIRS += src/usb
|
||||
USE_DEBUG := 1
|
||||
endif
|
||||
|
||||
# ISVPRINT - whether to fake IS-Viewer presence,
|
||||
@@ -229,10 +228,13 @@ endif
|
||||
|
||||
ifeq ($(USE_DEBUG),1)
|
||||
ULTRALIB := ultra_d
|
||||
DEFINES += DEBUG=1
|
||||
DEFINES += DEBUG=1 OVERWRITE_OSPRINT=1
|
||||
else ifeq ($(UNF),1)
|
||||
ULTRALIB := ultra
|
||||
DEFINES += _FINALROM=1 NDEBUG=1 OVERWRITE_OSPRINT=1
|
||||
else
|
||||
ULTRALIB := ultra_rom
|
||||
DEFINES += _FINALROM=1 NDEBUG=1
|
||||
DEFINES += _FINALROM=1 NDEBUG=1 OVERWRITE_OSPRINT=0
|
||||
endif
|
||||
|
||||
# HVQM - whether to use HVQM fmv library
|
||||
@@ -841,7 +843,7 @@ $(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
|
||||
# Run linker script through the C preprocessor
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(BUILD_DIR)/goddard.txt
|
||||
$(call print,Preprocessing linker script:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) $(DEBUG_MAP_STACKTRACE_FLAG) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
$(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -DULTRALIB=lib$(ULTRALIB) $(DEBUG_MAP_STACKTRACE_FLAG) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
|
||||
# Link libgoddard
|
||||
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)
|
||||
@@ -856,7 +858,7 @@ $(BUILD_DIR)/libz.a: $(LIBZ_O_FILES)
|
||||
# SS2: Goddard rules to get size
|
||||
$(BUILD_DIR)/sm64_prelim.ld: sm64.ld $(O_FILES) $(YAY0_OBJ_FILES) $(SEG_FILES) $(BUILD_DIR)/libgoddard.a $(BUILD_DIR)/libz.a
|
||||
$(call print,Preprocessing preliminary linker script:,$<,$@)
|
||||
$(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
$(V)$(CPP) $(CPPFLAGS) -DPRELIMINARY=1 -DBUILD_DIR=$(BUILD_DIR) -DULTRALIB=lib$(ULTRALIB) -MMD -MP -MT $@ -MF $@.d -o $@ $<
|
||||
|
||||
$(BUILD_DIR)/sm64_prelim.elf: $(BUILD_DIR)/sm64_prelim.ld
|
||||
@$(PRINT) "$(GREEN)Linking Preliminary ELF file: $(BLUE)$@ $(NO_COL)\n"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
30
sm64.ld
30
sm64.ld
@@ -168,11 +168,7 @@ SECTIONS
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.text*);
|
||||
#endif
|
||||
#if defined(ISVPRINT) || defined(UNF)
|
||||
*/libultra_d.a:*.o(.text*);
|
||||
#else
|
||||
*/libultra_rom.a:*.o(.text*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.text*);
|
||||
*/libnustd.a:*.o(.text*);
|
||||
*/libgcc.a:*.o(.text*);
|
||||
*/librtc.a:*.o(.text*);
|
||||
@@ -194,11 +190,7 @@ SECTIONS
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.*data*);
|
||||
#endif
|
||||
#if defined(ISVPRINT) || defined(UNF)
|
||||
*/libultra_d.a:*.o(.data*);
|
||||
#else
|
||||
*/libultra_rom.a:*.o(.data*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.data*);
|
||||
*/libhvqm2.a:*.o(.data*);
|
||||
*/librtc.a:*.o(.data*);
|
||||
*/libz.a:*.o(.data*);
|
||||
@@ -214,11 +206,7 @@ SECTIONS
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.rodata*);
|
||||
#endif
|
||||
#if defined(ISVPRINT) || defined(UNF)
|
||||
*/libultra_d.a:*.o(.rodata*);
|
||||
#else
|
||||
*/libultra_rom.a:*.o(.rodata*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(.rodata*);
|
||||
*/libgcc.a:*.o(.rodata*);
|
||||
*/librtc.a:*.o(.rodata*);
|
||||
*/libz.a:*.o(.rodata*);
|
||||
@@ -235,15 +223,9 @@ SECTIONS
|
||||
#ifdef S2DEX_TEXT_ENGINE
|
||||
lib/libs2d_engine.a:*(.*bss*);
|
||||
#endif
|
||||
#if defined(ISVPRINT) || defined(UNF)
|
||||
*/libultra_d.a:*.o(COMMON);
|
||||
*/libultra_d.a:*.o(.scommon);
|
||||
*/libultra_d.a:*.o(.*bss*);
|
||||
#else
|
||||
*/libultra_rom.a:*.o(COMMON);
|
||||
*/libultra_rom.a:*.o(.scommon);
|
||||
*/libultra_rom.a:*.o(.*bss*);
|
||||
#endif
|
||||
*/ULTRALIB.a:*.o(COMMON);
|
||||
*/ULTRALIB.a:*.o(.scommon);
|
||||
*/ULTRALIB.a:*.o(.*bss*);
|
||||
*/libhvqm2.a:*.o(.bss*);
|
||||
*/librtc.a:*.o(.bss*);
|
||||
*/libz.a:*.o(.bss*);
|
||||
|
||||
@@ -660,10 +660,12 @@ https://github.com/buu342/N64-UNFLoader
|
||||
dataleft = 0;
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
case '@':
|
||||
filestep++;
|
||||
if (filestep < 3)
|
||||
break;
|
||||
// fallthrough
|
||||
default:
|
||||
// Decide what to do based on the file handle
|
||||
if (filestep == 0 && debug_command_incoming_start[tok] == -1)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define DEBUG_MODE 1 // Enable/Disable debug mode
|
||||
#define DEBUG_INIT_MSG 1 // Print a message when debug mode has initialized
|
||||
#define USE_FAULTTHREAD 1 // Create a fault detection thread (libultra only)
|
||||
#define OVERWRITE_OSPRINT 1 // Replaces osSyncPrintf calls with debug_printf (libultra only)
|
||||
// #define OVERWRITE_OSPRINT 1 // Replaces osSyncPrintf calls with debug_printf (defined in makefile - libultra_rom does not have osSyncPrintf)
|
||||
#define MAX_COMMANDS 25 // The max amount of user defined commands possible
|
||||
|
||||
// Fault thread definitions (libultra only)
|
||||
@@ -46,7 +46,9 @@
|
||||
==============================*/
|
||||
|
||||
extern void debug_printf(const char* message, ...);
|
||||
|
||||
#if OVERWRITE_OSPRINT == 0
|
||||
#define osSyncPrintf debug_printf
|
||||
#endif
|
||||
|
||||
/*==============================
|
||||
debug_dumpbinary
|
||||
@@ -153,4 +155,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user