mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
MacOS test
This commit is contained in:
parent
4087ac73a5
commit
41898d2c0b
2
.gitignore
vendored
2
.gitignore
vendored
@ -26,3 +26,5 @@ settings.mk
|
||||
/img
|
||||
/msg
|
||||
/sprite
|
||||
|
||||
tools/Yay0compress
|
||||
|
19
Makefile
19
Makefile
@ -54,10 +54,23 @@ CROSS := mips-linux-gnu-
|
||||
AS := $(CROSS)as
|
||||
OLD_AS := tools/mips-nintendo-nu64-as
|
||||
CC := tools/cc1
|
||||
CPP := cpp
|
||||
CPP := cpp-10
|
||||
LD := $(CROSS)ld
|
||||
OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
OS=linux
|
||||
ICONV := iconv --from UTF-8 --to SHIFT-JIS
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
OS=mac
|
||||
ICONV := tools/iconv.py UTF-8 SHIFT-JIS
|
||||
endif
|
||||
|
||||
OLD_AS=tools/$(OS)/mips-nintendo-nu64-as
|
||||
CC=tools/$(OS)/cc1
|
||||
|
||||
CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -Wundef -Wcomment
|
||||
ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300
|
||||
OLDASFLAGS := -EB -Iinclude -G 0
|
||||
@ -138,12 +151,12 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0
|
||||
# Compile C files
|
||||
$(BUILD_DIR)/%.c.o: %.c $(MDEPS) | $(GENERATED_HEADERS)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(CPP) $(CPPFLAGS) -o - $(CPPMFLAGS) $< | iconv --from UTF-8 --to SHIFT-JIS | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ -
|
||||
$(CPP) $(CPPFLAGS) -o - $(CPPMFLAGS) $< | $(ICONV) | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ -
|
||||
|
||||
# Compile C files (with DSL macros)
|
||||
$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) tools/compile_dsl_macros.py | $(GENERATED_HEADERS)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(PYTHON) tools/compile_dsl_macros.py | iconv --from UTF-8 --to SHIFT-JIS | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ -
|
||||
$(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(PYTHON) tools/compile_dsl_macros.py | $(ICONV) | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ -
|
||||
|
||||
# Assemble handwritten ASM
|
||||
$(BUILD_DIR)/%.s.o: %.s
|
||||
|
Binary file not shown.
23
tools/iconv.py
Executable file
23
tools/iconv.py
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
parser = argparse.ArgumentParser(description='Convert a file from one encoding to another')
|
||||
parser.add_argument("f")
|
||||
parser.add_argument("t")
|
||||
parser.add_argument('infile', nargs='?', type=argparse.FileType('r'), default=sys.stdin)
|
||||
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
def main(args):
|
||||
sys.stdin.reconfigure(encoding=args.f)
|
||||
in_data = args.infile.read()
|
||||
sys.stdout.reconfigure(encoding=args.t)
|
||||
args.outfile.write(in_data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(parser.parse_args())
|
BIN
tools/mac/cc1
Executable file
BIN
tools/mac/cc1
Executable file
Binary file not shown.
BIN
tools/mac/mips-nintendo-nu64-as
Executable file
BIN
tools/mac/mips-nintendo-nu64-as
Executable file
Binary file not shown.
@ -1 +1 @@
|
||||
Subproject commit 25ef3afa263dc83bf1c6f9534a5da28b86c46a99
|
||||
Subproject commit e0262202ef931e0a0d09a144fcded281d0dc1656
|
@ -26,6 +26,7 @@ segments:
|
||||
- type: code
|
||||
start: 0x1000
|
||||
vram: 0x80025C00
|
||||
subalign: 8
|
||||
files:
|
||||
- [0x1000, c, code_1000_len_60]
|
||||
- [0x1060, c, code_1060_len_310]
|
||||
|
Loading…
Reference in New Issue
Block a user