diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 27 |
1 files changed, 22 insertions, 5 deletions
| @@ -43,6 +43,15 @@ pub fn build(b: *std.Build) void { | |||
| 43 | const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe); | 43 | const run_canon_gen_exe = b.addRunArtifact(canon_gen_exe); |
| 44 | const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z"); | 44 | const canon_gen_out = run_canon_gen_exe.addOutputFileArg("canon.bin.z"); |
| 45 | 45 | ||
| 46 | const compat_gen_exe = b.addExecutable(.{ | ||
| 47 | .name = "compat", | ||
| 48 | .root_source_file = .{ .path = "codegen/compat.zig" }, | ||
| 49 | .target = b.host, | ||
| 50 | .optimize = .Debug, | ||
| 51 | }); | ||
| 52 | const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe); | ||
| 53 | const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z"); | ||
| 54 | |||
| 46 | const ccc_gen_exe = b.addExecutable(.{ | 55 | const ccc_gen_exe = b.addExecutable(.{ |
| 47 | .name = "ccc", | 56 | .name = "ccc", |
| 48 | .root_source_file = .{ .path = "codegen/ccc.zig" }, | 57 | .root_source_file = .{ .path = "codegen/ccc.zig" }, |
| @@ -85,7 +94,7 @@ pub fn build(b: *std.Build) void { | |||
| 85 | 94 | ||
| 86 | // Fixed pitch font display width | 95 | // Fixed pitch font display width |
| 87 | const dw_data = b.createModule(.{ | 96 | const dw_data = b.createModule(.{ |
| 88 | .root_source_file = .{ .path = "src/DisplayWidthData.zig" }, | 97 | .root_source_file = .{ .path = "src/WidthData.zig" }, |
| 89 | .target = target, | 98 | .target = target, |
| 90 | .optimize = optimize, | 99 | .optimize = optimize, |
| 91 | }); | 100 | }); |
| @@ -104,26 +113,34 @@ pub fn build(b: *std.Build) void { | |||
| 104 | 113 | ||
| 105 | // Normalization | 114 | // Normalization |
| 106 | const ccc_data = b.createModule(.{ | 115 | const ccc_data = b.createModule(.{ |
| 107 | .root_source_file = .{ .path = "src/CombiningClassData.zig" }, | 116 | .root_source_file = .{ .path = "src/CombiningData.zig" }, |
| 108 | .target = target, | 117 | .target = target, |
| 109 | .optimize = optimize, | 118 | .optimize = optimize, |
| 110 | }); | 119 | }); |
| 111 | ccc_data.addAnonymousImport("ccc", .{ .root_source_file = ccc_gen_out }); | 120 | ccc_data.addAnonymousImport("ccc", .{ .root_source_file = ccc_gen_out }); |
| 112 | 121 | ||
| 113 | const canon_data = b.createModule(.{ | 122 | const canon_data = b.createModule(.{ |
| 114 | .root_source_file = .{ .path = "src/Canonical.zig" }, | 123 | .root_source_file = .{ .path = "src/CanonData.zig" }, |
| 115 | .target = target, | 124 | .target = target, |
| 116 | .optimize = optimize, | 125 | .optimize = optimize, |
| 117 | }); | 126 | }); |
| 118 | canon_data.addAnonymousImport("canon", .{ .root_source_file = canon_gen_out }); | 127 | canon_data.addAnonymousImport("canon", .{ .root_source_file = canon_gen_out }); |
| 119 | 128 | ||
| 129 | const compat_data = b.createModule(.{ | ||
| 130 | .root_source_file = .{ .path = "src/CompatData.zig" }, | ||
| 131 | .target = target, | ||
| 132 | .optimize = optimize, | ||
| 133 | }); | ||
| 134 | compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out }); | ||
| 135 | |||
| 120 | const norm_data = b.createModule(.{ | 136 | const norm_data = b.createModule(.{ |
| 121 | .root_source_file = .{ .path = "src/NormData.zig" }, | 137 | .root_source_file = .{ .path = "src/NormData.zig" }, |
| 122 | .target = target, | 138 | .target = target, |
| 123 | .optimize = optimize, | 139 | .optimize = optimize, |
| 124 | }); | 140 | }); |
| 125 | norm_data.addImport("CanonicalData", canon_data); | 141 | norm_data.addImport("CanonData", canon_data); |
| 126 | norm_data.addImport("CombiningClassData", ccc_data); | 142 | norm_data.addImport("CompatData", compat_data); |
| 143 | norm_data.addImport("CombiningData", ccc_data); | ||
| 127 | 144 | ||
| 128 | const norm = b.addModule("Normalizer", .{ | 145 | const norm = b.addModule("Normalizer", .{ |
| 129 | .root_source_file = .{ .path = "src/Normalizer.zig" }, | 146 | .root_source_file = .{ .path = "src/Normalizer.zig" }, |