Split util into own package

This commit is contained in:
jaina heartles 2022-06-08 22:54:41 -07:00
parent 407923eacd
commit 0f7754802d
10 changed files with 240 additions and 469 deletions

View file

@ -1,5 +1,9 @@
const std = @import("std");
const static_libs = [_][]const u8{
"util",
};
pub fn build(b: *std.build.Builder) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
@ -11,9 +15,15 @@ pub fn build(b: *std.build.Builder) void {
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("apub", "src/main.zig");
const exe = b.addExecutable("apub", "src/main/main.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
inline for (static_libs) |name| {
const lib = b.addStaticLibrary(name, "src/" ++ name ++ "/lib.zig");
exe.linkLibrary(lib);
}
exe.install();
const run_cmd = exe.run();