2015-11-23 04:55:38 +11:00
|
|
|
use std::env;
|
|
|
|
extern crate gcc;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let env = env::var("TARGET").unwrap();
|
|
|
|
if env.contains("darwin") {
|
|
|
|
gcc::compile_library("libminifb_native.a",
|
|
|
|
&["src/native/macosx/MacMiniFB.m",
|
|
|
|
"src/native/macosx/OSXWindow.m",
|
|
|
|
"src/native/macosx/OSXWindowFrameView.m"]); // MacOS
|
2015-11-25 07:46:52 +11:00
|
|
|
// } else if env.contains("windows") {
|
|
|
|
// gcc::compile_library("libminifb_native.a", &["src/native/windows/WinMiniFB.c"]); // Windows
|
|
|
|
} else if env.contains("linux") {
|
2015-11-23 04:55:38 +11:00
|
|
|
gcc::compile_library("libminifb_native.a", &["src/native/x11/X11MiniFB.c"]); // Unix
|
|
|
|
}
|
|
|
|
}
|