diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2022-04-24 04:02:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-24 13:02:50 +0200 |
| commit | 589cc12296ae7253c62655859a5eef92ee42dbaf (patch) | |
| tree | dd8556994b43ed23dff2aed6bb4c019e5c0d7ec9 /Makefile | |
| parent | a1099217d65362f16dd90284670a7dd37702a3ca (diff) | |
some MSL_C work (#192)
* wip
* bunch of MSL_C files
thanks to pikmin2 decomp for their work
* format / asm
* progress
* fix
* fix remove-asm to work with C files
* init / start
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -84,6 +84,14 @@ LDFLAGS := -unused -map $(MAP) -fp hard -nodefaults -w off # Compiler flags CFLAGS += -Cpp_exceptions off -proc gekko -fp hard -O3 -nodefaults -str pool,readonly,reuse -RTTI off -maxerrors 5 -enum int $(INCLUDES) +# O4,p for init.c +$(BUILD_DIR)/src/init.o: CFLAGS := -Cpp_exceptions off -proc gekko -fp hard -O4,p -nodefaults -str pool,readonly,reuse -RTTI off -maxerrors 5 -enum int $(INCLUDES) + +# __start.c needs mwcc 1.2.5 and O4,p +$(BUILD_DIR)/src/__start.o: CFLAGS := -Cpp_exceptions off -proc gekko -fp hard -O4,p -nodefaults -str pool,readonly,reuse -RTTI off -maxerrors 5 -enum int $(INCLUDES) +$(BUILD_DIR)/src/__start.o: MWCC_VERSION := 1.2.5 +$(BUILD_DIR)/src/__start.o: CC := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe + # elf2dol needs to know these in order to calculate sbss correctly. SDATA_PDHR := 9 SBSS_PDHR := 10 @@ -169,6 +177,12 @@ rungame: game dolphin-emu $(BUILD_DIR)/game/sys/main.dol # +$(BUILD_DIR)/%.o: %.c + @mkdir -p $(@D) + @echo building... $< + @$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).c + @$(CC) $(CFLAGS) -c -o $@ $(basename $@).c + $(BUILD_DIR)/%.o: %.cpp @mkdir -p $(@D) @echo building... $< |
