mirror of https://github.com/PrimeDecomp/prime.git
Add all_source_host ninja target
This commit is contained in:
parent
83fe50ee1f
commit
80d36b0deb
16
configure.py
16
configure.py
|
@ -1134,6 +1134,10 @@ else:
|
|||
description="AR $out")
|
||||
n.newline()
|
||||
|
||||
n.rule(name="host_cc", command="clang -I include/ -o $out $in",
|
||||
description="host_cc $out")
|
||||
n.newline()
|
||||
|
||||
###
|
||||
# Build
|
||||
###
|
||||
|
@ -1172,6 +1176,11 @@ for lib in LIBS:
|
|||
"basedir": os.path.dirname(f"$builddir/src/{object}"),
|
||||
"basefile": f"$builddir/src/{object}"
|
||||
})
|
||||
n.build(f"$builddir/host/{object}.o", "host_cc", c_file,
|
||||
variables={
|
||||
"basedir": os.path.dirname(f"$builddir/src/{object}"),
|
||||
"basefile": f"$builddir/src/{object}"
|
||||
})
|
||||
if add_to_all:
|
||||
all_source_files.append(f"$builddir/src/{object}.o")
|
||||
if os.path.exists(os.path.join("asm", f"{object}.s")):
|
||||
|
@ -1217,6 +1226,13 @@ n.comment("Adds a command for building all source files")
|
|||
n.build("all_source", "phony", all_source_files)
|
||||
n.newline()
|
||||
|
||||
###
|
||||
# Helper rule for building all source files, with a host compiler
|
||||
###
|
||||
n.comment("Adds a command for building all source files with a host compiler")
|
||||
n.build("all_source_host", "phony", [s.replace("/src/", "/host/") for s in all_source_files])
|
||||
n.newline()
|
||||
|
||||
###
|
||||
# Generate DOL
|
||||
###
|
||||
|
|
Loading…
Reference in New Issue