mirror of https://github.com/pmret/papermario.git
ninja img/*.png
This commit is contained in:
parent
c6d305b07c
commit
4bba67aed2
|
|
@ -141,6 +141,11 @@ async def main():
|
||||||
description="assemble $in")
|
description="assemble $in")
|
||||||
n.newline()
|
n.newline()
|
||||||
|
|
||||||
|
n.rule("img",
|
||||||
|
command="$python tools/convert_image.py $img_type $in $out $img_flags",
|
||||||
|
description="image $in")
|
||||||
|
n.newline()
|
||||||
|
|
||||||
objects = list_objects("tools/splat.yaml") # no .o extension!
|
objects = list_objects("tools/splat.yaml") # no .o extension!
|
||||||
c_files = (f for f in objects if f.endswith(".c")) # glob("src/**/*.c", recursive=True)
|
c_files = (f for f in objects if f.endswith(".c")) # glob("src/**/*.c", recursive=True)
|
||||||
|
|
||||||
|
|
@ -159,6 +164,13 @@ async def main():
|
||||||
n.build(obj(f), "as", "asm/" + f[2:] + ".s")
|
n.build(obj(f), "as", "asm/" + f[2:] + ".s")
|
||||||
elif f.endswith(".s"):
|
elif f.endswith(".s"):
|
||||||
n.build(obj(f), "as", f)
|
n.build(obj(f), "as", f)
|
||||||
|
elif f.endswith(".png"):
|
||||||
|
path, img_type, png = f.rsplit(".", 2)
|
||||||
|
|
||||||
|
n.build(obj(f), "img", path + ".png", variables={
|
||||||
|
"img_type": img_type,
|
||||||
|
"img_flags": "", # TODO ask splat? have some other config file for image flags?
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
print("warning: dont know what to do with object " + f)
|
print("warning: dont know what to do with object " + f)
|
||||||
n.newline()
|
n.newline()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue