From 888331271765f4acb0a6eae4e9535fcad29e6a11 Mon Sep 17 00:00:00 2001 From: Patrick Schönberger Date: Mon, 8 Jun 2026 10:52:34 +0200 Subject: initial --- build.zig | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 build.zig (limited to 'build.zig') diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..e6065a1 --- /dev/null +++ b/build.zig @@ -0,0 +1,26 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const exe = b.addExecutable(.{ + .name = "nmap", + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }), + }); + b.installArtifact(exe); + + const exe_run = b.addRunArtifact(exe); + const exe_run_step = b.step("run", "Run"); + exe_run_step.dependOn(&exe_run.step); + exe_run.step.dependOn(b.getInstallStep()); + if (b.args) |args| exe_run.addArgs(args); + + const exe_test = b.addTest(.{ .root_module = exe.root_module }); + const exe_test_step = b.step("test", "Run tests"); + exe_test_step.dependOn(&b.addRunArtifact(exe_test).step); +} -- cgit v1.2.3