summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMax <mparisi@stevens.edu>2020-09-23 18:03:38 -0400
committerMax <mparisi@stevens.edu>2020-09-23 18:03:38 -0400
commite43f1d2e0d65ab4cb1feffcaab250060b769dbe0 (patch)
tree5f59360cae0957ea8f692ed10bf973471ce86646 /Makefile
parent187be77d50370746804276b5f7ed79e08ab73188 (diff)
replaced patch_strtab with postprocess.py
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 12b2261..aa3ced1 100644
--- a/Makefile
+++ b/Makefile
@@ -60,12 +60,11 @@ OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy
CPP := cpp -P
CC := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
LD := $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwldeppc.exe
-PATCHSTRTAB := tools/patch_strtab/patch_strtab$(EXE)
ELF2DOL := tools/elf2dol/elf2dol$(EXE)
SHA1SUM := sha1sum
PYTHON := python3
-#POSTPROC := tools/postprocess.py
+POSTPROC := tools/postprocess/postprocess.py
# Options
INCLUDES := -i . -I- -i include -i include/SDK -i include/libstdc++
@@ -75,7 +74,7 @@ LDFLAGS := -map $(MAP) -fp hard -nodefaults
CFLAGS := -Cpp_exceptions off -proc gekko -fp hard -O4,p -nodefaults -msgstyle gcc -ipa file $(INCLUDES) -W all
# for postprocess.py
-PROCFLAGS := -fprologue-fixup=old_stack
+PROCFLAGS := -fsymbol-fixup
# elf2dol needs to know these in order to calculate sbss correctly.
SDATA_PDHR := 9
@@ -84,7 +83,7 @@ SBSS_PDHR := 10
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
TOOLS_DIR = tools
-TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwcc_compiler,$(wildcard $(TOOLS_DIR)/*))
+TOOLDIRS = $(filter-out $(TOOLS_DIR)/mwcc_compiler $(TOOLS_DIR)/postprocess,$(wildcard $(TOOLS_DIR)/*))
TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%)
TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE))
@@ -134,7 +133,7 @@ $(ELF): $(O_FILES) $(LDSCRIPT)
$(BUILD_DIR)/%.o: %.s
$(AS) $(ASFLAGS) -o $@ $<
# resolve escape sequences for C++ mangled names in the .strtab section (assembler workaround).
- $(PATCHSTRTAB) $@
+ $(PYTHON) $(POSTPROC) $(PROCFLAGS) $@ -fsymbol-fixup
$(BUILD_DIR)/%.o: %.cpp
$(CC) $(CFLAGS) -lang c++ -c -o $@ $<