blob: 4265e8a18c6977312704c3f3efcbb5d2bb783017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
const std = @import("std");
const builtin = @import("builtin");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const root = b.addModule("game-mod", .{
.optimize = optimize,
.target = target,
.link_libc = true,
});
root.addCSourceFiles(.{
.files = &[_][]const u8 {
"src/main.c",
}
});
const exe = b.addExecutable(.{
.name = "clox",
.root_module = root,
});
b.installArtifact(exe);
const run_step = b.step("run", "Run the app");
const run_cmd = b.addRunArtifact(exe);
run_step.dependOn(&run_cmd.step);
if (b.args) |args| {
run_cmd.addArgs(args);
}
}
|