diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -4,14 +4,20 @@ pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{.preferred_optimize_mode = .ReleaseSmall }); + const dep_opts = .{ .target = target, .optimize = optimize }; + _=dep_opts; + + const rootmod =b.addModule("funcz", .{ + .root_source_file = b.path("src/root.zig"), + .optimize = optimize, + .target = target, + }); + const lib = b.addLibrary(.{ .name = "funcz", - .root_module = b.createModule(.{ - .root_source_file = b.path("src/root.zig"), - .target = target, - .optimize = optimize, - }), + .root_module = rootmod, }); + b.installArtifact(lib); const exe = b.addExecutable(.{ @@ -23,6 +29,7 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }) }); + b.installArtifact(exe); const run_cmd = b.addRunArtifact(exe); |
