github.com/zyedidia/knit@v1.1.2-0.20230901152954-f7d4e39a0e24/examples/c_sub_build/libfoo/libbar/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  return b{
     7      $ %.o: %.c
     8          cc -c $input -o $output
     9      $ libbar.a: $obj
    10          ar -rcs $output $input
    11  }