Initial commit

This commit is contained in:
duck
2025-03-27 22:28:14 +05:00
commit c95a5e7d1c
6 changed files with 137 additions and 0 deletions

25
build.zig Normal file
View File

@@ -0,0 +1,25 @@
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "spacefarer",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
b.installArtifact(exe);
exe.linkLibC();
exe.linkSystemLibrary("SDL3");
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}