* tweak linking priorities - should help for GCC users
[blender.git] / extern / bullet2 / src / SConscript
1 #!/usr/bin/python
2 import sys
3 import os
4
5 Import('env')
6
7 defs = 'USE_DOUBLES QHULL _LIB'
8 cflags = []
9
10 if env['OURPLATFORM']=='win32-vc':
11         defs += ' WIN32 NDEBUG _WINDOWS _LIB'
12         #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
13         cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
14 elif env['OURPLATFORM']=='win32-mingw':
15         defs += ' NDEBUG'
16         cflags += ['-O2']
17 elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5':
18         defs += ' NDEBUG'
19         cflags += ['-O2']
20 elif sys.platform=='darwin':
21         defs += ' NDEBUG'
22         cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math']
23
24 linearmath_src = env.Glob("LinearMath/*.cpp")
25 bulletdyn_src = ["BulletDynamics/ConstraintSolver/btContactConstraint.cpp",
26                                  "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp",
27                                  "BulletDynamics/ConstraintSolver/btHingeConstraint.cpp",
28                                  "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp",
29                                  "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp",
30                                  "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp",
31                                  "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp",
32                                  "BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp",
33                                  "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp",
34                                  "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp",
35                                  "BulletDynamics/Dynamics/btRigidBody.cpp",
36                                  "BulletDynamics/Vehicle/btRaycastVehicle.cpp",
37                                  "BulletDynamics/Vehicle/btWheelInfo.cpp"]
38 collision_src = ["BulletCollision/BroadphaseCollision/btAxisSweep3.cpp",
39                                  "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp",
40                                  "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp",
41                                  "BulletCollision/BroadphaseCollision/btDispatcher.cpp",
42                                  "BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp",
43                                  "BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp",
44                                  "BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp",
45                                  "BulletCollision/CollisionDispatch/btCollisionObject.cpp",
46                                  "BulletCollision/CollisionDispatch/btCollisionWorld.cpp",
47                                  "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp",
48                                  "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp",
49                                  "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp",
50                                  "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp",
51                                  "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp",
52                                  "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp",
53                                  "BulletCollision/CollisionDispatch/btManifoldResult.cpp",
54                                  "BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp",
55                                  "BulletCollision/CollisionDispatch/btUnionFind.cpp",
56                                  "BulletCollision/CollisionShapes/btBoxShape.cpp",
57                                  "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp",
58                                  "BulletCollision/CollisionShapes/btCollisionShape.cpp",
59                                  "BulletCollision/CollisionShapes/btCompoundShape.cpp",
60                                  "BulletCollision/CollisionShapes/btConcaveShape.cpp",
61                                  "BulletCollision/CollisionShapes/btConeShape.cpp",
62                                  "BulletCollision/CollisionShapes/btConvexHullShape.cpp",
63                                  "BulletCollision/CollisionShapes/btConvexShape.cpp",
64                                  "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp",
65                                  "BulletCollision/CollisionShapes/btCylinderShape.cpp",
66                                  "BulletCollision/CollisionShapes/btEmptyShape.cpp",
67                                  "BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp",
68                                  "BulletCollision/CollisionShapes/btMultiSphereShape.cpp",
69                                  "BulletCollision/CollisionShapes/btOptimizedBvh.cpp",
70                                  "BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp",
71                                  "BulletCollision/CollisionShapes/btTetrahedronShape.cpp",
72                                  "BulletCollision/CollisionShapes/btSphereShape.cpp",
73                                  "BulletCollision/CollisionShapes/btStaticPlaneShape.cpp",
74                                  "BulletCollision/CollisionShapes/btStridingMeshInterface.cpp",
75                                  "BulletCollision/CollisionShapes/btTriangleCallback.cpp",
76                                  "BulletCollision/CollisionShapes/btTriangleBuffer.cpp",
77                                  "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp",
78                                  "BulletCollision/CollisionShapes/btTriangleMesh.cpp",
79                                  "BulletCollision/CollisionShapes/btTriangleMeshShape.cpp",
80                                  "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp",
81                                  "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp",
82                                  "BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp",
83                                  "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp",
84                                  "BulletCollision/NarrowPhaseCollision/btConvexCast.cpp",
85                                  "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp",
86                                  "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp",
87                                  "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp",
88                                  "BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp",
89                                  "BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp",
90                                  "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp",
91                                  "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp"]
92
93 incs = '. BulletCollision BulletDynamics LinearMath'
94
95 env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[25, 165], compileflags=cflags )
96 env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 160], compileflags=cflags )
97 env.BlenderLib ( libname = 'extern_bullet2collision', sources=collision_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[30, 170], compileflags=cflags )