forked from M-Labs/artiq
02b8426f60
By analogy with libbuild_misoc. Hopefully one day it actually gets moved to misoc...
19 lines
427 B
Rust
19 lines
427 B
Rust
extern crate build_misoc;
|
|
extern crate cc;
|
|
|
|
use std::env;
|
|
use std::path::Path;
|
|
|
|
fn main() {
|
|
build_misoc::cfg();
|
|
|
|
let triple = env::var("TARGET").unwrap();
|
|
let arch = triple.split("-").next().unwrap();
|
|
let vectors_path = Path::new(arch).join("vectors.S");
|
|
|
|
println!("cargo:rerun-if-changed={}", vectors_path.to_str().unwrap());
|
|
cc::Build::new()
|
|
.file(vectors_path)
|
|
.compile("vectors");
|
|
}
|