2022-12-18 18:15:39 +00:00
|
|
|
fn main() {
|
2022-12-18 22:43:40 +00:00
|
|
|
let c_paths: Vec<std::path::PathBuf> = glob::glob("src/**/*.c").unwrap().filter_map(|g| g.ok()).collect();
|
|
|
|
let h_paths: Vec<std::path::PathBuf> = glob::glob("include/**/*.h").unwrap().filter_map(|g| g.ok()).collect();
|
2022-12-18 20:12:59 +00:00
|
|
|
|
|
|
|
for path in c_paths.iter().chain(&h_paths) {
|
|
|
|
println!("cargo:rerun-if-changed={}", path.to_string_lossy());
|
|
|
|
}
|
|
|
|
|
|
|
|
assert!(c_paths.len() > 0);
|
|
|
|
|
|
|
|
cc::Build::new()
|
|
|
|
.files(c_paths)
|
2022-12-18 22:43:40 +00:00
|
|
|
.include("include")
|
2023-05-02 23:09:47 +00:00
|
|
|
.include("tables")
|
2022-12-18 20:12:59 +00:00
|
|
|
.warnings(false)
|
|
|
|
.compile("rabbitizer");
|
2022-12-18 18:15:39 +00:00
|
|
|
}
|