==SCons==
authorNathan Letwory <nathan@letworyinteractive.com>
Tue, 21 Nov 2006 06:11:41 +0000 (06:11 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Tue, 21 Nov 2006 06:11:41 +0000 (06:11 +0000)
Enable Bullet2 for Scons. This should work for all platforms, but please, test, test,
 test, test, test (ad infinitum)

config/darwin-config.py
config/linux2-config.py
config/linuxcross-config.py
config/openbsd3-config.py
config/sunos5-config.py
config/win32-mingw-config.py
config/win32-vc-config.py
extern/SConscript
extern/bullet2/src/SConscript [new file with mode: 0644]

index c2b68b12f838401d94ea3634328619450cbda80a..ef64de1f6ecb4c8b5db221c9f7c73dc7982f2da5 100644 (file)
@@ -74,8 +74,8 @@ BF_ODE_INC = '${BF_ODE}/include'
 BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 4d2b9e9ca3a23026fcdee5107a522f291d0c050a..6e9106f9ea3937a3a06c98a9adade11deacaa058 100644 (file)
@@ -67,8 +67,8 @@ BF_ODE_INC = BF_ODE + '/include'
 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 468f4cfcc502385a9ea6b5b19dedc608a9ad3f35..2f5789b441e0288c8de0a97a0eafb546b4abf849 100644 (file)
@@ -80,8 +80,8 @@ BF_ODE_INC = BF_ODE + '/include'
 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 50a77dccc4d59b99b675e2dcfd01bf902ae3f2e3..8e4dc3e5312ee54dee27e6cb471853f8720efc8e 100644 (file)
@@ -68,8 +68,8 @@ BF_ODE_INC = '${BF_ODE}/include'
 BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 4441d3c9a510ac4d80e58c0b661e67e551d17919..d4b99600b0e75fb10cf571faddf4c58bac84bada 100644 (file)
@@ -70,8 +70,8 @@ BF_ODE_INC = BF_ODE + '/include'
 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 62425c745cde1af0691bc54fd55b7604de27be3f..3682f1750bcd2f7149d8f8d8ddd80e441ac5e8d7 100644 (file)
@@ -83,8 +83,8 @@ BF_ODE_INC = BF_ODE + '/include'
 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 63964a3c5ed68b0b87d449f59934e1af6a915451..d7ca9e05b5b2deee21821a6f05a5c58462a8788e 100644 (file)
@@ -91,8 +91,8 @@ BF_ODE_INC = BF_ODE + '/include'
 BF_ODE_LIB = BF_ODE + '/lib/libode.a'
 
 WITH_BF_BULLET = 'true'
-BF_BULLET = '#extern/bullet'
-BF_BULLET_INC = '${BF_BULLET}/LinearMath ${BF_BULLET}/BulletDynamics ${BF_BULLET}/Bullet'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
 BF_SOLID = '#extern/solid'
index 8dc03c2e2604a6ac834a5aca7daaa2755b5fc3dc..0cdf96768626021ed43c1b1c68056f27a415ad6b 100644 (file)
@@ -6,7 +6,7 @@ if env['WITH_BF_GAMEENGINE']:
     SConscript(['qhull/SConscript',
             'solid/SConscript'])
     if env['WITH_BF_BULLET']:
-        SConscript(['bullet/SConscript'])
+        SConscript(['bullet2/src/SConscript'])
 
 if env['WITH_BF_INTERNATIONAL']:
     SConscript(['bFTGL/SConscript'])
diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript
new file mode 100644 (file)
index 0000000..0d31386
--- /dev/null
@@ -0,0 +1,95 @@
+#!/usr/bin/python
+import sys
+import os
+
+Import('env')
+
+defs = 'USE_DOUBLES QHULL _LIB'
+cflags = []
+
+if env['OURPLATFORM']=='win32-vc':
+    defs += ' WIN32 NDEBUG _WINDOWS _LIB'
+    #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
+    cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
+elif env['OURPLATFORM']=='win32-mingw':
+    defs += ' NDEBUG'
+    cflags += ['-O2']
+elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5':
+    defs += ' NDEBUG'
+    cflags += ['-O2']
+elif sys.platform=='darwin':
+    defs += ' NDEBUG'
+    cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mpowerpc' , '-mtune=G4']
+
+linearmath_src = env.Glob("LinearMath/*.cpp")
+bulletdyn_src = ["BulletDynamics/ConstraintSolver/btContactConstraint.cpp",
+                 "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp",
+                 "BulletDynamics/ConstraintSolver/btHingeConstraint.cpp",
+                 "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp",
+                 "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp",
+                 "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp",
+                 "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp",
+                 "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp",
+                 "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp",
+                 "BulletDynamics/Dynamics/btRigidBody.cpp",
+                 "BulletDynamics/Vehicle/btRaycastVehicle.cpp",
+                 "BulletDynamics/Vehicle/btWheelInfo.cpp"]
+collision_src = ["BulletCollision/BroadphaseCollision/btAxisSweep3.cpp",
+                 "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp",
+                 "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp",
+                 "BulletCollision/BroadphaseCollision/btDispatcher.cpp",
+                 "BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp",
+                 "BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp",
+                 "BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp",
+                 "BulletCollision/CollisionDispatch/btCollisionObject.cpp",
+                 "BulletCollision/CollisionDispatch/btCollisionWorld.cpp",
+                 "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp",
+                 "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp",
+                 "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp",
+                 "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp",
+                 "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp",
+                 "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp",
+                 "BulletCollision/CollisionDispatch/btManifoldResult.cpp",
+                 "BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp",
+                 "BulletCollision/CollisionDispatch/btUnionFind.cpp",
+                 "BulletCollision/CollisionShapes/btBoxShape.cpp",
+                 "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp",
+                 "BulletCollision/CollisionShapes/btCollisionShape.cpp",
+                 "BulletCollision/CollisionShapes/btCompoundShape.cpp",
+                 "BulletCollision/CollisionShapes/btConcaveShape.cpp",
+                 "BulletCollision/CollisionShapes/btConeShape.cpp",
+                 "BulletCollision/CollisionShapes/btConvexHullShape.cpp",
+                 "BulletCollision/CollisionShapes/btConvexShape.cpp",
+                 "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp",
+                 "BulletCollision/CollisionShapes/btCylinderShape.cpp",
+                 "BulletCollision/CollisionShapes/btEmptyShape.cpp",
+                 "BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp",
+                 "BulletCollision/CollisionShapes/btMultiSphereShape.cpp",
+                 "BulletCollision/CollisionShapes/btOptimizedBvh.cpp",
+                 "BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp",
+                 "BulletCollision/CollisionShapes/btTetrahedronShape.cpp",
+                 "BulletCollision/CollisionShapes/btSphereShape.cpp",
+                 "BulletCollision/CollisionShapes/btStaticPlaneShape.cpp",
+                 "BulletCollision/CollisionShapes/btStridingMeshInterface.cpp",
+                 "BulletCollision/CollisionShapes/btTriangleCallback.cpp",
+                 "BulletCollision/CollisionShapes/btTriangleBuffer.cpp",
+                 "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp",
+                 "BulletCollision/CollisionShapes/btTriangleMesh.cpp",
+                 "BulletCollision/CollisionShapes/btTriangleMeshShape.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btConvexCast.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp",
+                 "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp"]
+
+incs = '. BulletCollision BulletDynamics LinearMath'
+
+env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision', sources=collision_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
\ No newline at end of file