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.

36 lines
1.0 KiB
Zig

const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});
const lib = b.addStaticLibrary(.{
.name = "uf2",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
b.installArtifact(lib);
const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
});
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
const gen = b.addExecutable(.{
.name = "gen",
.root_source_file = .{ .path = "src/gen.zig" },
});
const gen_run_step = b.addRunArtifact(gen);
const gen_step = b.step("gen", "Generate family id enum");
gen_step.dependOn(&gen_run_step.step);
const exe = b.addExecutable(.{
.name = "example",
.root_source_file = .{ .path = "src/example.zig" },
});
b.installArtifact(exe);
}