mirror of https://github.com/PrimeDecomp/prime.git
Add `ninja all_source` command
This commit is contained in:
parent
b9e88d3206
commit
27a6cfe95f
|
@ -1131,6 +1131,7 @@ from pprint import pprint
|
||||||
###
|
###
|
||||||
# Build
|
# Build
|
||||||
###
|
###
|
||||||
|
all_source_files = []
|
||||||
for lib in LIBS:
|
for lib in LIBS:
|
||||||
inputs = []
|
inputs = []
|
||||||
if "lib" in lib:
|
if "lib" in lib:
|
||||||
|
@ -1162,6 +1163,7 @@ for lib in LIBS:
|
||||||
"basedir": os.path.dirname(f"$builddir/src/{object}"),
|
"basedir": os.path.dirname(f"$builddir/src/{object}"),
|
||||||
"basefile": f"$builddir/src/{object}"
|
"basefile": f"$builddir/src/{object}"
|
||||||
})
|
})
|
||||||
|
all_source_files.append(f"$builddir/src/{object}.o")
|
||||||
if os.path.exists(os.path.join("asm", f"{object}.s")):
|
if os.path.exists(os.path.join("asm", f"{object}.s")):
|
||||||
n.build(f"$builddir/asm/{object}.o", "as", f"asm/{object}.s")
|
n.build(f"$builddir/asm/{object}.o", "as", f"asm/{object}.s")
|
||||||
if completed:
|
if completed:
|
||||||
|
@ -1198,6 +1200,13 @@ else:
|
||||||
n.build("$builddir/main.elf", "link", inputs)
|
n.build("$builddir/main.elf", "link", inputs)
|
||||||
n.newline()
|
n.newline()
|
||||||
|
|
||||||
|
###
|
||||||
|
# Helper rule for building all source files
|
||||||
|
###
|
||||||
|
n.comment("Adds a command for building all source files")
|
||||||
|
n.build("all_source", "phony", all_source_files)
|
||||||
|
n.newline()
|
||||||
|
|
||||||
###
|
###
|
||||||
# Generate DOL
|
# Generate DOL
|
||||||
###
|
###
|
||||||
|
|
Loading…
Reference in New Issue