This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2023-01-12 17:31:51 +01:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
pub fn build(b: *std.build.Builder) void {
|
|
|
|
// Standard release options allow the person running `zig build` to select
|
|
|
|
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
|
|
|
const mode = b.standardReleaseOptions();
|
|
|
|
|
|
|
|
const lib = b.addStaticLibrary("ipc", "src/main.zig");
|
|
|
|
lib.setOutputDir("build");
|
2023-01-13 02:05:17 +01:00
|
|
|
lib.linkLibC();
|
2023-01-12 17:31:51 +01:00
|
|
|
lib.setBuildMode(mode);
|
|
|
|
lib.install();
|
|
|
|
|
|
|
|
const solib = b.addSharedLibrary("ipc", "src/main.zig", b.version(0, 0, 1));
|
|
|
|
solib.setOutputDir("build");
|
2023-01-13 02:05:17 +01:00
|
|
|
solib.linkLibC();
|
2023-01-12 17:31:51 +01:00
|
|
|
solib.setBuildMode(mode);
|
|
|
|
solib.install();
|
|
|
|
|
|
|
|
const main_tests = b.addTest("src/main.zig");
|
|
|
|
main_tests.setBuildMode(mode);
|
|
|
|
|
|
|
|
const test_step = b.step("test", "Run library tests");
|
|
|
|
test_step.dependOn(&main_tests.step);
|
|
|
|
}
|