jpp/lab1/zad6/build.rs

17 lines
351 B
Rust
Raw Normal View History

2024-03-22 12:36:34 +01:00
extern crate cc;
fn main() {
let module =
if cfg!(feature = "iter") {
"src/mod_iter.c"
} else if cfg!(feature = "rec") {
"src/mod_rec.c"
} else {
panic!("unknown module type")
};
2024-03-22 12:36:34 +01:00
cc::Build::new()
.file(module)
2024-03-22 12:36:34 +01:00
.shared_flag(true)
.compile("mod.a");
}