github.com/zyedidia/knit@v1.1.2-0.20230901152954-f7d4e39a0e24/test/sub_build/libfoo/build.knit (about) 1 local knit = require("knit") 2 3 local src = knit.glob("*.c") 4 local obj = knit.extrepl(src, ".c", ".o") 5 6 local bar = include("libbar/build.knit") 7 8 return b{ 9 $ all:V: libfoo.a libbar/libbar.a 10 11 $ %.o: %.c 12 cc -c $input -o $output 13 14 $ libfoo.a: $obj 15 ar -rcs $output $input 16 17 $ clean:VB: 18 rm -f *.o 19 rm -f *.a 20 21 bar 22 }