aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-03-19 16:29:22 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2020-03-19 16:29:22 +0100
commit6646826386a90e629340f10e677e4f2bd3200a8b (patch)
treee3613eba09b6cb0994ff7d8c6a8e9ad608da455a /build.zig
downloadriver-6646826386a90e629340f10e677e4f2bd3200a8b.tar.gz
river-6646826386a90e629340f10e677e4f2bd3200a8b.tar.xz
Initial commit
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig25
1 files changed, 25 insertions, 0 deletions
diff --git a/build.zig b/build.zig
new file mode 100644
index 0000000..df6dd28
--- /dev/null
+++ b/build.zig
@@ -0,0 +1,25 @@
+const Builder = @import("std").build.Builder;
+
+pub fn build(b: *Builder) void {
+ // Standard target options allows the person running `zig build` to choose
+ // what target to build for. Here we do not override the defaults, which
+ // means any target is allowed, and the default is native. Other options
+ // for restricting supported target set are available.
+ const target = b.standardTargetOptions(.{});
+
+ // Standard release options allow the person running `zig build` to select
+ // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
+ const mode = b.standardReleaseOptions();
+
+ const exe = b.addExecutable("dwc", "src/main.zig");
+ exe.setTarget(target);
+ exe.setBuildMode(mode);
+ exe.linkLibC();
+ exe.install();
+
+ const run_cmd = exe.run();
+ run_cmd.step.dependOn(b.getInstallStep());
+
+ const run_step = b.step("run", "Run the app");
+ run_step.dependOn(&run_cmd.step);
+}