diff options
author | makefunstuff <[email protected]> | 2024-07-13 22:04:48 +0200 |
---|---|---|
committer | makefunstuff <[email protected]> | 2024-07-13 22:04:48 +0200 |
commit | 714036825c38be947eb88a82c02425d7932d2919 (patch) | |
tree | c6723bd239fa5cc93b78ef9e9b7ba5576f708db1 /build.zig | |
parent | 9b9e63476616a123eb4d00f87f677ef2d9478897 (diff) | |
download | tinkerbunk-714036825c38be947eb88a82c02425d7932d2919.tar.gz |
upd
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build.zig b/build.zig index 9b16a14..62a971b 100644 --- a/build.zig +++ b/build.zig @@ -81,4 +81,14 @@ pub fn build(b: *std.Build) !void { try define_subproj("monkey_brain", b, target, optimize); try define_subproj("monkey_learns", b, target, optimize); + + const cprog = b.addExecutable(.{ .name = "cprog", .target = target, .optimize = optimize }); + cprog.linkLibC(); + cprog.addCSourceFiles(.{ .files = &.{ "csrc/cp.c", "csrc/main.c", "csrc/wc.c", "csrc/sh.c", "csrc/stat.c", "csrc/http.c" }, .flags = &.{} }); + b.installArtifact(cprog); + + const run_c_cmd = b.addRunArtifact(cprog); + run_c_cmd.step.dependOn(b.getInstallStep()); + const runc_step = b.step("runc", "Run c prog"); + runc_step.dependOn(&run_c_cmd.step); } |