chore: add build run command

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-04-22 12:12:55 -03:00
parent 55c4933ad7
commit ffddc43766
4 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ zig-cache/
**/*.s
**/*.asm
**/*.bin

3
.gitmodules vendored
View File

@ -1,3 +1,4 @@
[submodule "lib/ZigGBA"]
path = lib/ZigGBA
url = https://github.com/wendigojaeger/ZigGBA
url = https://github.com/paoda/ZigGBA

View File

@ -4,5 +4,10 @@ const GBABuilder = @import("lib/ZigGBA/GBA/builder.zig");
pub fn build(b: *std.build.Builder) void {
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;
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