1 #[cfg(not(feature = "cmake"))]
3 let mut make = cc::Build::new();
4 make.include("include");
5 make.define("A_EXPORTS", None);
6 #[cfg(feature = "float")]
7 make.define("A_SIZE_FLOAT", "4");
8 #[cfg(feature = "static_crt")]
13 .file("src/complex.c")
19 .file("src/pid_fuzzy.c")
20 .file("src/pid_neuro.c")
24 .file("src/regress.c")
25 .file("src/regress_linear.c")
26 .file("src/regress_simple.c")
29 .file("src/trajbell.c")
30 .file("src/trajpoly3.c")
31 .file("src/trajpoly5.c")
32 .file("src/trajpoly7.c")
33 .file("src/trajtrap.c")
36 .file("src/version.c")
39 #[cfg(feature = "cmake")]
41 let mut cmake = cmake::Config::new("");
43 cmake.define("BUILD_TESTING", "0");
44 #[cfg(feature = "float")]
45 cmake.define("LIBA_FLOAT", "4");
46 #[cfg(feature = "static_crt")]
47 cmake.static_crt(true);
49 let out = cmake.build();
50 let lib = out.join("lib");
52 println!("cargo:rustc-link-search=native={}", lib.display());
53 println!("cargo:rustc-link-lib=static=a");