2023-06-19 21:47:51 +02:00
|
|
|
use std::{process::Command, env};
|
|
|
|
|
2021-12-09 00:18:30 +01:00
|
|
|
fn main() {
|
2021-12-09 14:25:28 +01:00
|
|
|
println!("cargo:rerun-if-changed=src/syscalls.S");
|
2023-06-19 21:47:51 +02:00
|
|
|
|
|
|
|
let out_dir = env::var("OUT_DIR").unwrap();
|
|
|
|
|
|
|
|
Command::new("fasm")
|
|
|
|
.arg("src/syscalls.S")
|
|
|
|
.arg(&format!("{}/libsyscalls.a", out_dir))
|
|
|
|
.status().unwrap();
|
|
|
|
Command::new("ar")
|
|
|
|
.arg("crus")
|
|
|
|
.arg(&format!("{}/libsyscalls.a", out_dir))
|
|
|
|
.arg(&format!("{}/libsyscalls.o", out_dir))
|
|
|
|
.status().unwrap();
|
|
|
|
|
|
|
|
println!("cargo:rustc-link-search={}", out_dir)
|
2021-12-09 00:18:30 +01:00
|
|
|
}
|