const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const lib = b.addStaticLibrary(.{ .name = "tinyalsa", .target = target, .optimize = optimize, }); lib.addCSourceFiles(&.{ "src/limits.c", "src/mixer_hw.c", "src/mixer_plugin.c", "src/mixer.c", "src/pcm_plugin.c", "src/snd_card_plugin.c", "src/pcm_hw.c", "src/pcm.c", }, &.{}); lib.addIncludePath(.{ .path = "include" }); lib.linkLibC(); lib.installHeadersDirectory("include", "."); lib.strip = optimize != std.builtin.OptimizeMode.Debug; lib.want_lto = optimize != std.builtin.OptimizeMode.Debug; lib.single_threaded = true; b.installArtifact(lib); }