summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig22
1 files changed, 19 insertions, 3 deletions
diff --git a/build.zig b/build.zig
index 1b199d3..beacc7b 100644
--- a/build.zig
+++ b/build.zig
@@ -41,6 +41,12 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = optimize,
});
+ const gloves_module = b.createModule(.{
+ .root_source_file = b.path("src/gloves.zig"),
+ .target = target,
+ .optimize = optimize,
+ .link_libc = true,
+ });
const cs = capstone(b, .{
.target = target,
@@ -56,12 +62,22 @@ pub fn build(b: *std.Build) !void {
.root_module = elfo_module,
});
+ const gloves = b.addExecutable(.{
+ .name = "gloves",
+ .root_module = gloves_module,
+ });
+
elfo.linkLibrary(cs.artifact);
b.installArtifact(elfo);
+ b.installArtifact(gloves);
+
+ const run_elfo_cmd = b.addRunArtifact(elfo);
+ const run_elfo_step = b.step("elfo", "See the pretty elfo!");
+ run_elfo_step.dependOn(&run_elfo_cmd.step);
- const run_cmd = b.addRunArtifact(elfo);
- const run_step = b.step("elfo", "See the pretty elfo!");
- run_step.dependOn(&run_cmd.step);
+ const run_gloves_cmd = b.addRunArtifact(gloves);
+ const run_gloves_step = b.step("gloves", "See the pretty gloves!");
+ run_gloves_step.dependOn(&run_gloves_cmd.step);
// TODO: add flag to run on pwndbg
}