Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[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'] in ('win32-vc', 'win64-vc'):
11     defs += ' WIN32 NDEBUG _WINDOWS _LIB'
12     #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
13     cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
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
26 bulletdyn_src = env.Glob("BulletDynamics/Vehicle/*.cpp") + env.Glob("BulletDynamics/ConstraintSolver/*.cpp") + env.Glob("BulletDynamics/Dynamics/*.cpp")
27
28 collision_broadphase_src = env.Glob("BulletCollision/BroadphaseCollision/*.cpp")
29 collision_dispatch_src = env.Glob("BulletCollision/CollisionDispatch/*.cpp")
30 collision_gimpact_src = env.Glob("BulletCollision/Gimpact/*.cpp")
31 collision_shapes_src =  env.Glob("BulletCollision/CollisionShapes/*.cpp")
32 collision_narrowphase_src =  env.Glob("BulletCollision/NarrowPhaseCollision/*.cpp")
33
34 softbody_src = env.Glob("BulletSoftBody/*.cpp")
35
36 incs = '. BulletCollision BulletDynamics LinearMath BulletSoftBody'
37
38 env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
39 env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[19], compileflags=cflags )
40 env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[25], compileflags=cflags )
41 env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
42 env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
43 env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
44 env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
45 env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[18], compileflags=cflags )