You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ndg/lib/nif/build.zig

34 lines
948 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
_ = b.addModule("nif", .{ .root_source_file = b.path("nif.zig") });
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const lib = b.addStaticLibrary(.{
.name = "nif",
.root_source_file = b.path("nif.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
});
lib.defineCMacro("CONFIG_CTRL_IFACE", null);
lib.defineCMacro("CONFIG_CTRL_IFACE_UNIX", null);
lib.addIncludePath(b.path("wpa_supplicant"));
lib.addCSourceFiles(.{
.files = &.{
"wpa_supplicant/wpa_ctrl.c",
"wpa_supplicant/os_unix.c",
},
.flags = &.{
"-Wall",
"-Wextra",
"-Wshadow",
"-Wundef",
"-Wunused-parameter",
"-Werror",
},
});
b.installArtifact(lib);
}