2022-04-15 02:48:58 +00:00
|
|
|
const std = @import("std");
|
2022-04-15 02:50:02 +00:00
|
|
|
const GBABuilder = @import("lib/ZigGBA/GBA/builder.zig");
|
2022-04-15 02:48:58 +00:00
|
|
|
|
|
|
|
pub fn build(b: *std.build.Builder) void {
|
2022-06-22 11:15:14 +00:00
|
|
|
const exe = GBABuilder.addGBAExecutable(b, "sprite2d", "src/sprite2d/main.zig");
|
2022-04-15 04:58:45 +00:00
|
|
|
exe.emit_asm = if (b.option(bool, "asm", "emit assembly") orelse false) .emit else .default;
|
2022-04-22 15:12:55 +00:00
|
|
|
|
|
|
|
const run_cmd = b.addSystemCommand(&.{"zba"});
|
2022-05-07 08:02:13 +00:00
|
|
|
run_cmd.step.dependOn(b.getInstallStep());
|
2022-04-22 15:12:55 +00:00
|
|
|
if (b.args) |args| run_cmd.addArgs(args);
|
|
|
|
|
|
|
|
const run_step = b.step("run", "Run test ROM in ZBA");
|
|
|
|
run_step.dependOn(&run_cmd.step);
|
2022-04-15 02:48:58 +00:00
|
|
|
}
|