Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate cc;

use std::path;

fn main() {
    if !path::Path::new("odpi/include/dpi.h").exists() {
        println!("The odpi submodule isn't initialized. Run the following commands.");
        println!("  git submodule init");
        println!("  git submodule update");
        std::process::exit(1);
    }

    cc::Build::new()
        .file("odpi/embed/dpi.c")
        .include("odpi/include")
        .flag_if_supported("-Wno-unused-parameter")
        .compile("libodpic.a");
}