http.c/build.zig
2024-10-01 23:33:56 +03:00

30 lines
680 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "http.c",
.target = target,
.optimize = optimize,
});
exe.addCSourceFile(.{
.file = b.path("src/main.c"),
.flags = &.{}
});
exe.linkLibC();
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}