mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
Merge pull request #166 from nanaian/various-configure-fixes
Various configure fixes
This commit is contained in:
commit
87a1aa24d9
25
configure.py
25
configure.py
@ -207,12 +207,12 @@ async def main():
|
||||
n.newline()
|
||||
|
||||
n.rule("cc",
|
||||
command=f"bash -o pipefail -c '{cpp} $cppflags $in -o - | $iconv | tools/$os/cc1 $cflags -o - | tools/$os/mips-nintendo-nu64-as -EB -G 0 - -o $out'",
|
||||
command=f"bash -o pipefail -c '{cpp} $cppflags -MD -MF $out.d $in -o - | $iconv | tools/$os/cc1 $cflags -o - | tools/$os/mips-nintendo-nu64-as -EB -G 0 - -o $out'",
|
||||
description="cc $in",
|
||||
depfile="$out.d",
|
||||
deps="gcc")
|
||||
n.rule("cc_dsl",
|
||||
command=f"bash -o pipefail -c '{cpp} $cppflags $in -o - | $python tools/compile_dsl_macros.py | $iconv | tools/$os/cc1 $cflags -o - | tools/$os/mips-nintendo-nu64-as -EB -G 0 - -o $out'",
|
||||
command=f"bash -o pipefail -c '{cpp} $cppflags -MD -MF $out.d $in -o - | $python tools/compile_dsl_macros.py | $iconv | tools/$os/cc1 $cflags -o - | tools/$os/mips-nintendo-nu64-as -EB -G 0 - -o $out'",
|
||||
description="cc (with dsl) $in",
|
||||
depfile="$out.d",
|
||||
deps="gcc")
|
||||
@ -287,25 +287,27 @@ async def main():
|
||||
description="rom $in")
|
||||
n.newline()
|
||||
|
||||
n.rule("sha1sum",
|
||||
command="sha1sum -c $in && touch $out",
|
||||
description="compare")
|
||||
objects, segments = read_splat("tools/splat.yaml") # no .o extensions!
|
||||
c_files = (f for f in objects if f.endswith(".c")) # glob("src/**/*.c", recursive=True)
|
||||
|
||||
n.rule("checksums",
|
||||
command=f"(sha1sum -c checksum.sha1 && bash $out.bash > $out) || sha1sum -c $out --quiet",
|
||||
description="compare",
|
||||
rspfile="$out.bash",
|
||||
rspfile_content=f"sha1sum {' '.join([obj(o) for o in objects])}")
|
||||
n.newline()
|
||||
|
||||
n.rule("cc_modern_exe", command="cc $in -O3 -o $out")
|
||||
n.newline()
|
||||
|
||||
objects, segments = read_splat("tools/splat.yaml") # no .o extensions!
|
||||
c_files = (f for f in objects if f.endswith(".c")) # glob("src/**/*.c", recursive=True)
|
||||
|
||||
n.comment("target")
|
||||
n.build("$builddir/$target.ld", "cpp", "$target.ld")
|
||||
n.build("$builddir/$target.elf", "link", "$builddir/$target.ld", implicit=[obj(o) for o in objects], implicit_outputs="$builddir/$target.map")
|
||||
n.build("$target.z64", "rom", "$builddir/$target.elf", implicit="tools/n64crc")
|
||||
n.build("$builddir/is_ok", "sha1sum", "checksum.sha1", implicit="$target.z64")
|
||||
n.build("$builddir/expected.sha1", "checksums", implicit="$target.z64")
|
||||
n.newline()
|
||||
|
||||
n.default("$builddir/is_ok")
|
||||
n.default("$builddir/expected.sha1")
|
||||
n.newline()
|
||||
|
||||
# generated headers
|
||||
@ -454,4 +456,5 @@ async def main():
|
||||
print(f"to compile '{TARGET}.z64'.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(main())
|
||||
|
Loading…
Reference in New Issue
Block a user