chore: add build run command
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,5 @@ zig-out/
|
||||
zig-cache/
|
||||
|
||||
**/*.s
|
||||
**/*.asm
|
||||
**/*.asm
|
||||
**/*.bin
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,4 @@
|
||||
|
||||
[submodule "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 {
|
||||
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);
|
||||
}
|
||||
|
||||
Submodule lib/ZigGBA updated: 713a22f6d0...672aae039b
Reference in New Issue
Block a user