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")
26 .file("src/trajbell.c")
27 .file("src/trajpoly3.c")
28 .file("src/trajpoly5.c")
29 .file("src/trajpoly7.c")
30 .file("src/trajtrap.c")
33 .file("src/version.c")
36 #[cfg(feature = "cmake")]
38 let mut cmake = cmake::Config::new("");
40 cmake.define("BUILD_TESTING", "0");
41 #[cfg(feature = "float")]
42 cmake.define("LIBA_FLOAT", "4");
43 #[cfg(feature = "static_crt")]
44 cmake.static_crt(true);
46 let out = cmake.build();
47 let lib = out.join("lib");
49 println!("cargo:rustc-link-search=native={}", lib.display());
50 println!("cargo:rustc-link-lib=static=a");