Skip to content

Commit

Permalink
Split objects from configure file, improve Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
CelestialAmber committed Aug 4, 2024
1 parent cc97a3f commit 828b162
Show file tree
Hide file tree
Showing 12 changed files with 1,703 additions and 1,500 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ TRANSFORM_DEP := tools/transform-win.py
endif

# Options
INCLUDES := -I- -i include/ -i libs/RVL_SDK/include/ -i libs/PowerPC_EABI_Support/include/stl
INCLUDES := -i include/ -i libs/RVL_SDK/include/ -i libs/PowerPC_EABI_Support/include/stl
ASM_INCLUDES := -I include/

# TODO: fix the makefile to make objdiff work without this
Expand All @@ -108,7 +108,8 @@ ifeq ($(VERBOSE),0)
LDFLAGS := $(MAPGEN) -fp hard -nodefaults -w off
endif
LIBRARY_LDFLAGS := -nodefaults -fp hard -proc gekko
CFLAGS = -enum int -use_lmw_stmw on -proc gekko -fp hard -O4,p -nodefaults -func_align 4 -MMD $(INCLUDES)
CFLAGS = -nodefaults -proc gekko -align powerpc -enum int -fp hard -Cpp_exceptions off -O4,p -inline auto \
-nosyspath -RTTI off -fp_contract on -enc SJIS -MMD $(INCLUDES)

ifeq ($(VERBOSE),0)
# this set of ASFLAGS generates no warnings.
Expand Down
1,493 changes: 4 additions & 1,489 deletions configure.py

Large diffs are not rendered by default.

1,687 changes: 1,687 additions & 0 deletions libs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/CriWare/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CRIWARE_FILES :=\
$(BUILD_DIR)/libs/CriWare/src/sofdec/libmwsfdwii.a\

#CriWare doesn't use the sdata sections
$(CRIWARE_FILES): CFLAGS += -sdata 0 -sdata2 0 -Cpp_exceptions off
$(CRIWARE_FILES): CFLAGS += -sdata 0 -sdata2 0 -use_lmw_stmw on -func_align 4

$(CRIWARE_FILES): INCLUDES += -i libs/CriWare/src/

Expand Down
2 changes: 1 addition & 1 deletion libs/NdevExi2A/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NDEV_FILES:=\
$(BUILD_DIR)/libs/NdevExi2A/src/exi2.o\

$(NDEV_FILES): INCLUDES += -i libs/NdevExi2A/include/
$(NDEV_FILES): CFLAGS = -Cpp_exceptions off -enum int -inline auto -ipa file -proc gekko -fp hard -O4,p -nodefaults -func_align 4 $(INCLUDES)
$(NDEV_FILES): CFLAGS += -inline auto -ipa file -func_align 4 $(INCLUDES)
#Ndev uses GC 3.0
$(NDEV_FILES): MWCC_VERSION := 3.0a5.2
$(NDEV_FILES): CONSOLE := GC
Expand Down
2 changes: 1 addition & 1 deletion libs/PowerPC_EABI_Support/src/MSL_C/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MSLC_FILES:=\

DEPENDS += $(MSLC_FILES:.o=.d)

$(MSLC_FILES): CFLAGS += -Cpp_exceptions off -inline on -str pool,readonly,reuse -ipa file
$(MSLC_FILES): CFLAGS += -use_lmw_stmw on -str reuse,pool,readonly -fp_contract off -inline on -ipa file -func_align 4

$(BUILD_DIR)/libs/PowerPC_EABI_Support/src/MSL_C/MSL_C.PPCEABI.bare.H.a: $(MSLC_FILES)
@echo Linking... $@
Expand Down
2 changes: 1 addition & 1 deletion libs/PowerPC_EABI_Support/src/MetroTRK/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TRK_FILES:=\
DEPENDS += $(TRK_FILES:.o=.d)

#$(TRK_FILES): INCLUDES += -i libs/NdevExi2A/include/
$(TRK_FILES): CFLAGS += -Cpp_exceptions off -inline on
$(TRK_FILES): CFLAGS += -use_lmw_stmw on -inline on -func_align 4
$(TRK_FILES): MWCC_VERSION = 1.0a

$(BUILD_DIR)/libs/PowerPC_EABI_Support/src/MetroTRK/dolphin_trk_glue.o: CFLAGS += -str pool
Expand Down
2 changes: 1 addition & 1 deletion libs/PowerPC_EABI_Support/src/Runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUNTIME_FILES:=\
$(BUILD_DIR)/libs/PowerPC_EABI_Support/src/Runtime/Gecko_ExceptionPPC.o\
$(BUILD_DIR)/libs/PowerPC_EABI_Support/src/Runtime/GCN_mem_alloc.o\

$(RUNTIME_FILES): CFLAGS = -Cpp_exceptions off -use_lmw_stmw on -inline on -proc gekko -fp hard -O4,p -str pool,readonly,reuse -func_align 4 $(INCLUDES)
$(RUNTIME_FILES): CFLAGS += -use_lmw_stmw on -str reuse,pool,readonly -gccinc -common off -inline on -func_align 4 $(INCLUDES)

#Runtime has exceptions turned on for 4 specific files
$(BUILD_DIR)/libs/PowerPC_EABI_Support/src/Runtime/New.o: CFLAGS += -Cpp_exceptions on
Expand Down
2 changes: 1 addition & 1 deletion libs/RVL_SDK/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RVL_SDK_FILES:=\
#Wii SDK uses 4.3 build 145, but the 1.1 version (4.3 build 151) seems close enough so far.

#All the functions in the Wii SDK except for bte are aligned to 16 bytes, so this is necessary.
$(RVL_SDK_FILES): CFLAGS = -Cpp_exceptions off -enum int -inline auto -ipa file -proc gekko -fp hard -O4,p -nodefaults -func_align 16 $(INCLUDES)
$(RVL_SDK_FILES): CFLAGS += -inline auto -ipa file -fp_contract off -func_align 16 $(INCLUDES)

#USB uses pooling?

Expand Down
2 changes: 1 addition & 1 deletion libs/monolib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ MONOLIB_FILES:=\
$(BUILD_DIR)/libs/monolib/asm/nand/CNBanner.o\

#$(MONOLIB_FILES): INCLUDES += -i libs/monolib/include/ -i libs/nw4r/include/
$(MONOLIB_FILES): CFLAGS += -ipa file -inline auto -str pool,readonly,reuse -RTTI on -enc SJIS
$(MONOLIB_FILES): CFLAGS += -ipa file -inline auto -use_lmw_stmw on -str reuse,pool,readonly -RTTI on -Cpp_exceptions on -func_align 4

DEPENDS += $(MONOLIB_FILES:.o=.d)

Expand Down
2 changes: 1 addition & 1 deletion libs/nw4r/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NW4R_FILES:=\
#$(NW4R_FILES): CONSOLE := GC

#$(NW4R_FILES): INCLUDES += -i libs/nw4r/include/
$(NW4R_FILES): CFLAGS += -inline auto -Cpp_exceptions off -RTTI off
$(NW4R_FILES): CFLAGS += -inline auto -use_lmw_stmw on -fp_contract off -func_align 4


$(BUILD_DIR)/libs/nw4r/nw4r.a: $(NW4R_FILES)
Expand Down
2 changes: 1 addition & 1 deletion src/kyoshin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ GAME_FILES :=\
$(BUILD_DIR)/src/kyoshin/appgame/CBattery.o\

#$(GAME_FILES): INCLUDES += -i src/ -i libs/monolib/include/ -i libs/mm/include/ -i libs/nw4r/include/
$(GAME_FILES): CFLAGS += -ipa file -inline deferred -str pool,readonly,reuse -RTTI on -enc SJIS
$(GAME_FILES): CFLAGS += -ipa file -inline auto -use_lmw_stmw on -str reuse,pool,readonly -RTTI on -Cpp_exceptions on -func_align 4
$(BUILD_DIR)/src/kyoshin/appgame/CBattery.o: CFLAGS += -O4,s -func_align 4 #wont match otherwise
$(BUILD_DIR)/src/kyoshin/appgame/ErrMesData.o: CFLAGS += -enc UTF8 #encoding bs

Expand Down

0 comments on commit 828b162

Please sign in to comment.