1
0
Fork 0
zig-mtd/build.zig

22 lines
644 B
Zig
Raw Normal View History

2020-01-13 13:30:48 -05:00
const Builder = @import("std").build.Builder;
const builtin = @import("builtin");
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("update-em-bootloader", "src/main.zig");
exe.setBuildMode(builtin.Mode.ReleaseSmall);
exe.strip = true;
exe.setTarget(builtin.Arch.mipsel, builtin.Os.linux, builtin.Abi.musl);
exe.addIncludeDir("/usr/include");
exe.linkSystemLibrary("c");
exe.install();
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}