|
|
@ -3,6 +3,10 @@ const std = @import("std");
|
|
|
|
pub fn build(b: *std.build.Builder) void {
|
|
|
|
pub fn build(b: *std.build.Builder) void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const mode = b.standardReleaseOptions();
|
|
|
|
const mode = b.standardReleaseOptions();
|
|
|
|
|
|
|
|
const do_strip = b.option(bool, "strip", "Strip final output; on for release-small") orelse switch (mode) {
|
|
|
|
|
|
|
|
.ReleaseSmall => true,
|
|
|
|
|
|
|
|
else => false,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const libsegfault = b.addStaticLibrary("segfault", "src/segfault.zig");
|
|
|
|
const libsegfault = b.addStaticLibrary("segfault", "src/segfault.zig");
|
|
|
|
libsegfault.setTarget(target);
|
|
|
|
libsegfault.setTarget(target);
|
|
|
@ -12,6 +16,7 @@ pub fn build(b: *std.build.Builder) void {
|
|
|
|
const exe = b.addExecutable("st", null);
|
|
|
|
const exe = b.addExecutable("st", null);
|
|
|
|
exe.setTarget(target);
|
|
|
|
exe.setTarget(target);
|
|
|
|
exe.setBuildMode(mode);
|
|
|
|
exe.setBuildMode(mode);
|
|
|
|
|
|
|
|
exe.strip = do_strip;
|
|
|
|
exe.install();
|
|
|
|
exe.install();
|
|
|
|
exe.linkLibrary(libsegfault);
|
|
|
|
exe.linkLibrary(libsegfault);
|
|
|
|
exe.linkSystemLibrary("fontconfig");
|
|
|
|
exe.linkSystemLibrary("fontconfig");
|
|
|
|