forked from bartvdbraak/blender
45c1f23f19
* This addresses the long command-line problem when building with SCons/MingW on windows through a dosbox (cmd.exe). My test buildpath was: C:\Documents and Settings\nathan\My Documents\blender\build\win32-mingw Should be rather long enough, don't you think? /Nathan
41 lines
1.7 KiB
Python
41 lines
1.7 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'
|
|
|
|
if env['OURPLATFORM'] == 'win32-mingw':
|
|
s1 = sources[:len(sources)/2]
|
|
s2 = sources[len(sources)/2:len(sources)]
|
|
env.BlenderLib ( libname = 'extern_bullet1', sources=s1, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[21, 170], compileflags=cflags )
|
|
env.BlenderLib ( libname = 'extern_bullet2', sources=s2, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
|
|
else:
|
|
env.BlenderLib ( libname = 'extern_bullet', sources=sources, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags )
|