2024-03-22 12:36:34 +01:00
|
|
|
extern crate cc;
|
|
|
|
|
|
|
|
fn main() {
|
2024-03-22 13:09:09 +01:00
|
|
|
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()
|
2024-03-22 13:09:09 +01:00
|
|
|
.file(module)
|
2024-03-22 12:36:34 +01:00
|
|
|
.shared_flag(true)
|
|
|
|
.compile("mod.a");
|
|
|
|
}
|