forked from TyOverby/chipmunk-sys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
53 lines (47 loc) · 1.49 KB
/
build.rs
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
extern crate gcc;
fn compile_chipmunk() {
let input = [
"chipmunk/src/chipmunk.c",
"chipmunk/src/cpArbiter.c",
"chipmunk/src/cpArray.c",
"chipmunk/src/cpBBTree.c",
"chipmunk/src/cpBody.c",
"chipmunk/src/cpCollision.c",
"chipmunk/src/cpConstraint.c",
"chipmunk/src/cpDampedRotarySpring.c",
"chipmunk/src/cpDampedSpring.c",
"chipmunk/src/cpGearJoint.c",
"chipmunk/src/cpGrooveJoint.c",
"chipmunk/src/cpHashSet.c",
"chipmunk/src/cpHastySpace.c",
"chipmunk/src/cpMarch.c",
"chipmunk/src/cpPinJoint.c",
"chipmunk/src/cpPivotJoint.c",
"chipmunk/src/cpPolyShape.c",
"chipmunk/src/cpPolyline.c",
"chipmunk/src/cpRatchetJoint.c",
"chipmunk/src/cpRotaryLimitJoint.c",
"chipmunk/src/cpShape.c",
"chipmunk/src/cpSimpleMotor.c",
"chipmunk/src/cpSlideJoint.c",
"chipmunk/src/cpSpace.c",
"chipmunk/src/cpSpaceComponent.c",
"chipmunk/src/cpSpaceDebug.c",
"chipmunk/src/cpSpaceHash.c",
"chipmunk/src/cpSpaceQuery.c",
"chipmunk/src/cpSpaceStep.c",
"chipmunk/src/cpSpatialIndex.c",
"chipmunk/src/cpSweep1D.c",
];
let mut conf = gcc::Config::new();
conf.include("chipmunk/include/");
conf.flag("-g");
conf.flag("-std=c99");
for src in &input {
conf.file(src);
}
conf.compile("libchipmunk.a");
}
fn main() {
compile_chipmunk();
}