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
|
||||
###
|
||||
all_source_files = []
|
||||
for lib in LIBS:
|
||||
inputs = []
|
||||
if "lib" in lib:
|
||||
|
@ -1162,6 +1163,7 @@ for lib in LIBS:
|
|||
"basedir": os.path.dirname(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")):
|
||||
n.build(f"$builddir/asm/{object}.o", "as", f"asm/{object}.s")
|
||||
if completed:
|
||||
|
@ -1198,6 +1200,13 @@ else:
|
|||
n.build("$builddir/main.elf", "link", inputs)
|
||||
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
|
||||
###
|
||||
|
|
Loading…
Reference in New Issue