Allow for regz to be used as a module (#116)
This commit is contained in:
parent
d66ffd56f5
commit
0df603ec00
12
build.zig
12
build.zig
|
@ -19,6 +19,14 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const xml = b.addStaticLibrary(.{
|
||||
.name = "xml2",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
xml.linkLibrary(libxml2_dep.artifact("xml2"));
|
||||
b.installArtifact(xml);
|
||||
|
||||
const regz = b.addExecutable(.{
|
||||
.name = "regz",
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
|
@ -29,6 +37,10 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
regz.linkLibrary(libxml2_dep.artifact("xml2"));
|
||||
b.installArtifact(regz);
|
||||
|
||||
_ = b.addModule("regz", .{
|
||||
.source_file = .{ .path = "src/module.zig" },
|
||||
});
|
||||
|
||||
const run_cmd = b.addRunArtifact(regz);
|
||||
run_cmd.step.dependOn(b.getInstallStep());
|
||||
if (b.args) |args| {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
const std = @import("std");
|
||||
const clap = @import("clap");
|
||||
const xml = @import("xml.zig");
|
||||
const svd = @import("svd.zig");
|
||||
const Database = @import("Database.zig");
|
||||
|
||||
const ArenaAllocator = std.heap.ArenaAllocator;
|
||||
|
|
1
src/module.zig
Normal file
1
src/module.zig
Normal file
|
@ -0,0 +1 @@
|
|||
pub const Database = @import("Database.zig");
|
Loading…
Reference in New Issue
Block a user