const std = @import("std"); pub fn build(b: *std.build.Builder) void { const target = b.standardTargetOptions(.{}); const mode = b.standardReleaseOptions(); const libsegfault = b.addStaticLibrary("segfault", "src/segfault.zig"); libsegfault.setTarget(target); libsegfault.setBuildMode(mode); libsegfault.force_pic = true; const exe = b.addExecutable("st", null); exe.setTarget(target); exe.setBuildMode(mode); exe.install(); exe.linkLibrary(libsegfault); 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.5.1\"", "-D_XOPEN_SOURCE=600", "-Wall", "-Werror", }); }