mach: Initial commit for gamemode
This commit is contained in:
parent
25b6288efe
commit
509ebd13ab
9 changed files with 2617 additions and 0 deletions
23
gamemode-zig/build.zig
Normal file
23
gamemode-zig/build.zig
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const pkg = std.build.Pkg{
|
||||
.name = "gamemode",
|
||||
.source = .{ .path = thisDir() ++ "/src/gamemode.zig" },
|
||||
};
|
||||
|
||||
/// Link system library gamemode
|
||||
pub fn link(exe: *std.build.LibExeObjStep) void {
|
||||
exe.linkSystemLibrary("gamemode");
|
||||
}
|
||||
|
||||
/// TODO:
|
||||
/// Build and link gamemode
|
||||
pub fn buildAndLink(b: *std.build.Builder, exe: *std.build.LibExeObjStep) void {
|
||||
const lib = b.addSharedLibrarySource("gamemode", std.build.FileSource{ .path = thisDir() ++ "/c/client_impl.c" }, .unversioned);
|
||||
lib.linkLibC();
|
||||
exe.linkLibrary(lib);
|
||||
}
|
||||
|
||||
fn thisDir() []const u8 {
|
||||
return std.fs.path.dirname(@src().file) orelse ".";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue