forked from bartvdbraak/blender
9123507c2e
* This is a simplified SConscript for Bullet building. It should keep itself better up-to-date since it uses env.Glob(). Tested to work on Linux and Windows (both mingw and vc) /Nathan
35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
#!/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']
|
|
|
|
sources = env.Glob("Bullet/BroadphaseCollision/*.cpp")
|
|
sources += env.Glob("Bullet/CollisionShapes/*.cpp")
|
|
sources += env.Glob("Bullet/NarrowPhaseCollision/*.cpp")
|
|
sources += env.Glob("Bullet/CollisionDispatch/*.cpp")
|
|
sources += env.Glob("BulletDynamics/ConstraintSolver/*.cpp")
|
|
sources += env.Glob("BulletDynamics/Vehicle/*.cpp")
|
|
sources += env.Glob("BulletDynamics/Dynamics/*.cpp")
|
|
|
|
incs = '. Bullet BulletDynamics LinearMath'
|
|
|
|
env.BlenderLib ( libname = 'extern_bullet', sources=sources, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
|