13 lines
429 B
Rust
13 lines
429 B
Rust
use std::{fs::File, io::Write, path::PathBuf};
|
|
|
|
fn main() {
|
|
let out = PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
|
println!("cargo:rustc-link-search={}", out.display());
|
|
|
|
let memory_x = include_bytes!("memory.x");
|
|
let mut f = File::create(out.join("memory.x")).unwrap();
|
|
f.write_all(memory_x).unwrap();
|
|
println!("cargo:rerun-if-changed=memory.x");
|
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
}
|