summaryrefslogtreecommitdiff
path: root/build.zig
blob: ea91df696de57abae2bb93d1cdee7ba3cc117b89 (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
const std = @import("std");

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",
        }
    });

    root.linkSystemLibrary("raylib", .{.needed = true});

    const exe = b.addExecutable(.{
        .name = "game",
        .root_module = root,
    });


    b.installArtifact(exe);
}