diff options
| author | patrick-scho | 2024-11-09 11:22:25 +0100 |
|---|---|---|
| committer | patrick-scho | 2024-11-09 11:22:25 +0100 |
| commit | 8ce4f0b76cab1963cd0a8ad55bf5b30b9eae917f (patch) | |
| tree | dbdf0c340f7656521ffd7199210a1c0a77e7387d /build.zig | |
| parent | c1543f56be31c2d071db75dd7f146e1b5e0de4fe (diff) | |
| download | chirp-8ce4f0b76cab1963cd0a8ad55bf5b30b9eae917f.tar.gz chirp-8ce4f0b76cab1963cd0a8ad55bf5b30b9eae917f.zip | |
dunno
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -14,6 +14,15 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); + const epoll = b.addExecutable(.{ + .name = "epoll", + // In this case the main source file is merely a path, however, in more + // complicated build scripts, this could be a generated file. + .root_source_file = .{ .cwd_relative = "src/epoll.zig" }, + .target = target, + .optimize = optimize, + }); + const lmdb_mod = b.createModule(.{ .root_source_file = .{ .cwd_relative = "../ziglmdb/src/lmdb.zig" }, }); @@ -22,10 +31,13 @@ pub fn build(b: *std.Build) void { "./lmdb/libraries/liblmdb/midl.c", "./lmdb/libraries/liblmdb/mdb.c", } }); - exe.root_module.addImport("lmdb", lmdb_mod); + exe.root_module.addImport("lmdb", lmdb_mod); exe.linkLibC(); + epoll.root_module.addImport("lmdb", lmdb_mod); + epoll.linkLibC(); + b.installArtifact(exe); const run_cmd = b.addRunArtifact(exe); @@ -38,4 +50,8 @@ pub fn build(b: *std.Build) void { const run_step = b.step("run", "Run the app"); run_step.dependOn(&run_cmd.step); + + const run_epoll_cmd = b.addRunArtifact(epoll); + const run_epoll_step = b.step("runepoll", "run epoll"); + run_epoll_step.dependOn(&run_epoll_cmd.step); } |
