2024-01-13 11:51:44 +01:00
|
|
|
use std::{env, process::Command};
|
2023-06-19 21:47:51 +02:00
|
|
|
|
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();
|
2024-01-13 11:51:44 +01:00
|
|
|
|
2023-06-19 21:47:51 +02:00
|
|
|
Command::new("fasm")
|
|
|
|
.arg("src/syscalls.S")
|
|
|
|
.arg(&format!("{}/libsyscalls.a", out_dir))
|
2024-01-13 11:51:44 +01:00
|
|
|
.status()
|
|
|
|
.unwrap();
|
|
|
|
// Command::new("ar")
|
|
|
|
// .arg("crus")
|
|
|
|
// .arg(&format!("{}/libsyscalls.a", out_dir))
|
|
|
|
// .arg(&format!("{}/libsyscalls.o", out_dir))
|
|
|
|
// .status().unwrap();
|
2023-06-19 21:47:51 +02:00
|
|
|
|
|
|
|
println!("cargo:rustc-link-search={}", out_dir)
|
2021-12-09 00:18:30 +01:00
|
|
|
}
|