You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
871 B
Zig

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.4.1\"",
"-D_XOPEN_SOURCE=600",
"-Wall",
"-Werror",
});
}