const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const cpu_mod = b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/cpu/root.zig"), }); const system_mod = b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/system/root.zig"), }); const platform_mod = b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/platform/root.zig"), }); const frontend_mod = b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/frontend/root.zig"), }); const exe_mod = b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/main.zig"), }); const test_step = b.step("test", "Run 6soz tests"); inline for (&.{ cpu_mod, system_mod, platform_mod, frontend_mod, exe_mod }) |mod| { const mod_test = b.addTest(.{ .root_module = mod }); const mod_cmd = b.addRunArtifact(mod_test); test_step.dependOn(&mod_cmd.step); } }