diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..7446c7a --- /dev/null +++ b/build.zig @@ -0,0 +1,26 @@ +const std = @import("std"); + +pub fn build(b: *std.build.Builder) void { + const target = b.standardTargetOptions(.{}); + const mode = b.standardReleaseOptions(); + + const exe = b.addExecutable("st", null); + exe.setTarget(target); + exe.setBuildMode(mode); + exe.install(); + exe.linkSystemLibrary("fontconfig"); + exe.linkSystemLibrary("freetype2"); + exe.linkSystemLibrary("Xft"); + exe.linkSystemLibrary("X11"); + exe.linkLibC(); + exe.pie = true; + exe.addCSourceFiles(&.{ + "st.c", + "x.c", + }, &.{ + "-DVERSION=\"0.8.4.1\"", + "-D_XOPEN_SOURCE=600", + "-Wall", + "-Werror", + }); +}