feat: integrate emulator interface

while I figure out the interface with zba, disable the exe example
since it doesn't have an emu to pass to gdbstub
This commit is contained in:
2022-12-15 04:12:26 -04:00
parent 26aad8d1ae
commit 400e155502
4 changed files with 35 additions and 31 deletions

View File

@@ -27,6 +27,7 @@ pub fn link(exe: *std.build.LibExeObjStep) void {
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
_ = target;
const mode = b.standardReleaseOptions();
// -- library --
@@ -42,18 +43,18 @@ pub fn build(b: *std.build.Builder) void {
const test_step = b.step("lib-test", "Run Library Tests");
test_step.dependOn(&lib_tests.step);
// -- Executable --
const exe = b.addExecutable("gdbserver", "src/main.zig");
link(exe);
// // -- Executable --
// const exe = b.addExecutable("gdbserver", "src/main.zig");
// link(exe);
exe.setTarget(target);
exe.setBuildMode(mode);
exe.install();
// exe.setTarget(target);
// exe.setBuildMode(mode);
// exe.install();
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| run_cmd.addArgs(args);
// const run_cmd = exe.run();
// 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);
// const run_step = b.step("run", "Run the app");
// run_step.dependOn(&run_cmd.step);
}