-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
26 lines (23 loc) · 987 Bytes
/
build.rs
File metadata and controls
26 lines (23 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::env;
fn main() {
cc::Build::new()
.include("storage/include")
.file("storage/entry.c")
.file("storage/buffer/buffer_pool.c")
.file("storage/pages/page_manager.c")
.file("storage/wal/wal.c")
.file("storage/memory/arena.c")
.warnings(false)
.flag_if_supported("-g")
.compile("minsql_storage");
println!("cargo:rerun-if-changed=storage/");
println!("cargo:rerun-if-changed=storage/entry.c");
println!("cargo:rerun-if-changed=storage/buffer/buffer_pool.c");
println!("cargo:rerun-if-changed=storage/pages/page_manager.c");
println!("cargo:rerun-if-changed=storage/wal/wal.c");
println!("cargo:rerun-if-changed=storage/memory/arena.c");
println!("cargo:rerun-if-changed=storage/include/minsql_storage.h");
let out_dir = env::var("OUT_DIR").unwrap();
println!("cargo:rustc-link-search=native={}", out_dir);
println!("cargo:rustc-link-lib=static=minsql_storage");
}