chore: add build run command
This commit is contained in:
parent
55c4933ad7
commit
ffddc43766
|
@ -3,3 +3,4 @@ zig-cache/
|
||||||
|
|
||||||
**/*.s
|
**/*.s
|
||||||
**/*.asm
|
**/*.asm
|
||||||
|
**/*.bin
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
[submodule "lib/ZigGBA"]
|
[submodule "lib/ZigGBA"]
|
||||||
path = lib/ZigGBA
|
path = lib/ZigGBA
|
||||||
url = https://github.com/wendigojaeger/ZigGBA
|
url = https://github.com/paoda/ZigGBA
|
||||||
|
|
|
@ -4,5 +4,10 @@ const GBABuilder = @import("lib/ZigGBA/GBA/builder.zig");
|
||||||
pub fn build(b: *std.build.Builder) void {
|
pub fn build(b: *std.build.Builder) void {
|
||||||
const exe = GBABuilder.addGBAExecutable(b, "first", "src/first.zig");
|
const exe = GBABuilder.addGBAExecutable(b, "first", "src/first.zig");
|
||||||
exe.emit_asm = if (b.option(bool, "asm", "emit assembly") orelse false) .emit else .default;
|
exe.emit_asm = if (b.option(bool, "asm", "emit assembly") orelse false) .emit else .default;
|
||||||
_ = exe;
|
|
||||||
|
const run_cmd = b.addSystemCommand(&.{"zba"});
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 713a22f6d0613052be932ec768f763d36830dcd9
|
Subproject commit 672aae039b2696f7ce6911b29820cb38efc3c759
|
Loading…
Reference in New Issue