28 lines
688 B
Zig
28 lines
688 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 = "zig-with-c",
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
.use_llvm = false,
|
|
.use_lld = false,
|
|
});
|
|
|
|
exe.addCSourceFile(.{
|
|
.file = b.path("src/lib.c"),
|
|
});
|
|
|
|
exe.addIncludePath(b.path("include"));
|
|
b.installArtifact(exe);
|
|
|
|
const run_exe = b.addRunArtifact(exe);
|
|
const run_step = b.step("run", "Run the application");
|
|
|
|
run_step.dependOn(&run_exe.step);
|
|
}
|