-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSCsub
56 lines (48 loc) · 1.42 KB
/
SCsub
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
54
55
56
#!/usr/bin/env python
Import('env')
Import('env_modules')
env_chipmunk = env_modules.Clone()
# Integration source files
sources = Glob("*.cpp")
sources += Glob("src/*.cpp")
# Chipmunk source files
sources += [
"lib/src/chipmunk.c",
"lib/src/cpArbiter.c",
"lib/src/cpArray.c",
"lib/src/cpBBTree.c",
"lib/src/cpBody.c",
"lib/src/cpCollision.c",
"lib/src/cpConstraint.c",
"lib/src/cpDampedRotarySpring.c",
"lib/src/cpDampedSpring.c",
"lib/src/cpGearJoint.c",
"lib/src/cpGrooveJoint.c",
"lib/src/cpHashSet.c",
"lib/src/cpPinJoint.c",
"lib/src/cpPivotJoint.c",
"lib/src/cpPolyShape.c",
"lib/src/cpRatchetJoint.c",
"lib/src/cpRobust.c",
"lib/src/cpRotaryLimitJoint.c",
"lib/src/cpShape.c",
"lib/src/cpSimpleMotor.c",
"lib/src/cpSlideJoint.c",
"lib/src/cpSpace.c",
"lib/src/cpSpaceComponent.c",
"lib/src/cpSpaceDebug.c",
"lib/src/cpSpaceHash.c",
"lib/src/cpSpaceQuery.c",
"lib/src/cpSpaceStep.c",
"lib/src/cpSpatialIndex.c",
"lib/src/cpSweep1D.c"
]
# Chipmunk include path
env_chipmunk.Append(CPPPATH=[".", "lib/include"])
# Compilation flags
env_chipmunk.Append(CPPFLAGS=["-DCP_USE_DOUBLES=0", "-DCP_SPACE_DISABLE_DEBUG_API"])
env_chipmunk.Append(CXXFLAGS=['-std=c++11'])
# Compile as a static library
lib = env_chipmunk.Library("chipmunk", sources)
# Add the library as a dependency of the final executable
env.Prepend(LIBS=[lib])