aboutsummaryrefslogtreecommitdiff
path: root/bunny/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bunny/build.rs')
-rw-r--r--bunny/build.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/bunny/build.rs b/bunny/build.rs
new file mode 100644
index 0000000..58b8695
--- /dev/null
+++ b/bunny/build.rs
@@ -0,0 +1,13 @@
+use std::process::Command;
+use std::env;
+
+fn main() {
+ let out_dir = env::var("OUT_DIR").unwrap();
+ let obj = format!("{}/ap_boot.bin", out_dir);
+
+ Command::new("nasm")
+ .args(&["-Wall", "-fbin", "src/ap_boot.s", "-o"])
+ .arg(&obj)
+ .status()
+ .unwrap();
+}