2041f97b
Gregory Mullen
const std = @import("std");
2041f97b
Gregory Mullen
2041f97b
Gregory Mullen
pub fn build(b: *std.Build) void {
2041f97b
Gregory Mullen
const target = b.standardTargetOptions(.{});
2041f97b
Gregory Mullen
2041f97b
Gregory Mullen
const optimize = b.standardOptimizeOption(.{});
2041f97b
Gregory Mullen
2041f97b
Gregory Mullen
const lib = b.addStaticLibrary(.{
2041f97b
Gregory Mullen
.name = "zig-tls",
2041f97b
Gregory Mullen
.root_source_file = .{ .path = "src/root.zig" },
2041f97b
Gregory Mullen
.target = target,
2041f97b
Gregory Mullen
.optimize = optimize,
2041f97b
Gregory Mullen
});
2041f97b
Gregory Mullen
64eddc2a
Gregory Mullen
const nihssl = b.addModule("nihssl", .{
64eddc2a
Gregory Mullen
.root_source_file = .{ .path = "src/root.zig" },
64eddc2a
Gregory Mullen
.target = target,
64eddc2a
Gregory Mullen
.optimize = optimize,
64eddc2a
Gregory Mullen
});
64eddc2a
Gregory Mullen
2041f97b
Gregory Mullen
b.installArtifact(lib);
2041f97b
Gregory Mullen
2041f97b
Gregory Mullen
const lib_unit_tests = b.addTest(.{
2041f97b
Gregory Mullen
.root_source_file = .{ .path = "src/root.zig" },
2041f97b
Gregory Mullen
.target = target,
2041f97b
Gregory Mullen
.optimize = optimize,
2041f97b
Gregory Mullen
});
2041f97b
Gregory Mullen
2041f97b
Gregory Mullen
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
2041f97b
Gregory Mullen
2041f97b
Gregory Mullen
const test_step = b.step("test", "Run unit tests");
2041f97b
Gregory Mullen
test_step.dependOn(&run_lib_unit_tests.step);
64eddc2a
Gregory Mullen
64eddc2a
Gregory Mullen
const probe = b.addExecutable(.{
64eddc2a
Gregory Mullen
.name = "probe",
64eddc2a
Gregory Mullen
.root_source_file = .{ .path = "utils/probe.zig" },
64eddc2a
Gregory Mullen
.target = target,
64eddc2a
Gregory Mullen
.optimize = optimize,
64eddc2a
Gregory Mullen
});
64eddc2a
Gregory Mullen
probe.root_module.addImport("nihssl", nihssl);
64eddc2a
Gregory Mullen
const run_probe = b.addRunArtifact(probe);
64eddc2a
Gregory Mullen
const probe_step = b.step("probe", "Probe hosts for supported suites");
64eddc2a
Gregory Mullen
probe_step.dependOn(&run_probe.step);
2041f97b
Gregory Mullen
}