From 4485888ed9f1b7cb7d7a91f64044f3821931efac Mon Sep 17 00:00:00 2001 From: physick Date: Wed, 22 Jul 2026 14:25:41 +0500 Subject: c impl init --- clox/build.zig | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 clox/build.zig (limited to 'clox/build.zig') diff --git a/clox/build.zig b/clox/build.zig new file mode 100644 index 0000000..4265e8a --- /dev/null +++ b/clox/build.zig @@ -0,0 +1,34 @@ +const std = @import("std"); +const builtin = @import("builtin"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const root = b.addModule("game-mod", .{ + .optimize = optimize, + .target = target, + .link_libc = true, + }); + + root.addCSourceFiles(.{ + .files = &[_][]const u8 { + "src/main.c", + } + }); + + const exe = b.addExecutable(.{ + .name = "clox", + .root_module = root, + }); + + + b.installArtifact(exe); + + const run_step = b.step("run", "Run the app"); + const run_cmd = b.addRunArtifact(exe); + run_step.dependOn(&run_cmd.step); + if (b.args) |args| { + run_cmd.addArgs(args); + } +} -- cgit v1.3