use std::env;

fn build_fp_context_obj() {
    const FP_CONTEXT_S: &str = "src/fp_context.S";

    let out_dir = env::var("OUT_DIR").unwrap();

    println!("cargo:rerun-if-changed={FP_CONTEXT_S}");

    cc::Build::new()
        .out_dir(&out_dir)
        .compiler("clang")
        .target("aarch64-unknown-none")
        .flag("-march=armv8-a+fp")
        .file(FP_CONTEXT_S)
        .compile("fp_context");
}

fn main() {
    build_fp_context_obj();
}
