2024-09-19 00:52:55 +03:00
|
|
|
const Builder = @import("std").Build;
|
2019-12-14 07:49:33 +03:00
|
|
|
|
|
|
|
pub fn build(b: *Builder) void {
|
|
|
|
|
2024-09-19 00:52:55 +03:00
|
|
|
// Two options select the built step.
|
|
|
|
|
|
|
|
const name = b.option([]const u8, "name", "step name (without .zig)")
|
|
|
|
orelse "stepA_mal";
|
|
|
|
|
|
|
|
const root_source_file = b.path(
|
|
|
|
b.option([]const u8, "root_source_file", "step name (with .zig)")
|
|
|
|
orelse "stepA_mal.zig");
|
|
|
|
|
|
|
|
const exe = b.addExecutable(.{
|
|
|
|
.name = name,
|
|
|
|
.root_source_file = root_source_file,
|
|
|
|
.target = b.standardTargetOptions(.{}),
|
|
|
|
.optimize = b.standardOptimizeOption(.{}),
|
|
|
|
});
|
2019-12-14 07:49:33 +03:00
|
|
|
|
2024-09-19 00:52:55 +03:00
|
|
|
exe.linkSystemLibrary("c");
|
|
|
|
exe.linkSystemLibrary("pcre");
|
|
|
|
exe.linkSystemLibrary("readline");
|
|
|
|
b.default_step.dependOn(&exe.step);
|
|
|
|
b.installArtifact(exe);
|
2019-12-14 07:49:33 +03:00
|
|
|
}
|