brainfuck/build.zig
2024-07-14 13:32:05 +03:00

27 lines
665 B
Zig

const std = @import("std");
const Build = std.Build;
pub fn build(b: *Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "brainfuck",
.optimize = optimize,
.target = target
});
exe.addIncludePath(.{ .path = "src" });
exe.addCSourceFile(.{ .file = b.path("src/main.c") });
exe.linkLibC();
b.installArtifact(exe);
const run_exe = b.addRunArtifact(exe);
if (b.args) |args| {
run_exe.addArgs(args);
}
const run_step = b.step("run", "Run program");
run_step.dependOn(&run_exe.step);
}