SCons:
* giving compileflags, cc_compileflags and cxx_compileflags to BlenderLib() now actually overrides any other setting (so there's no unclarity when ie. conflicting options are being specified in REL_CFLAGS et al). These are set after either release or debug flags, but before any *_WARN flags (so those stay maintained). * add cxx_compileflags for GE parts on win32-vc to have better performance. * NOTE: if platform maintainers (OSX and Linux) could check and do the same for their systems. Not vital, but probably very, very much welcomed by GE users.
This commit is contained in:
2
extern/bullet2/src/SConscript
vendored
2
extern/bullet2/src/SConscript
vendored
@@ -10,7 +10,7 @@ cflags = []
|
|||||||
if env['OURPLATFORM']=='win32-vc':
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
defs += ' WIN32 NDEBUG _WINDOWS _LIB'
|
defs += ' WIN32 NDEBUG _WINDOWS _LIB'
|
||||||
#cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
|
#cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
|
||||||
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
|
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3']
|
||||||
elif env['OURPLATFORM']=='win32-mingw':
|
elif env['OURPLATFORM']=='win32-mingw':
|
||||||
defs += ' NDEBUG'
|
defs += ' NDEBUG'
|
||||||
cflags += ['-O2']
|
cflags += ['-O2']
|
||||||
|
@@ -25,5 +25,6 @@ incs += ' ' + env['BF_OPENGL_INC']
|
|||||||
cxxflags = []
|
cxxflags = []
|
||||||
if env['OURPLATFORM']=='win32-vc':
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
cxxflags.append ('/GR')
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_bloutines', sources, Split(incs), [], libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , compileflags=cxxflags)
|
env.BlenderLib ( 'bf_bloutines', sources, Split(incs), [], libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , cxx_compileflags=cxxflags)
|
||||||
|
@@ -6,4 +6,9 @@ sources = env.Glob('*.cpp')
|
|||||||
incs ='. #source/kernel/gen_system #intern/string #intern/moto/include'
|
incs ='. #source/kernel/gen_system #intern/string #intern/moto/include'
|
||||||
incs += ' ' + env['BF_PYTHON_INC']
|
incs += ' ' + env['BF_PYTHON_INC']
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['game','player'], priority = [45,125] )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['game','player'], priority = [45,125], cxx_compileflags=cxxflags)
|
||||||
|
@@ -17,4 +17,9 @@ if env['WITH_BF_SDL']:
|
|||||||
else:
|
else:
|
||||||
defs += ' DISABLE_SDL'
|
defs += ' DISABLE_SDL'
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_logic', sources, Split(incs), Split(defs), libtype=['game','player'], priority=[30, 110] )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
env.BlenderLib ( 'bf_logic', sources, Split(incs), Split(defs), libtype=['game','player'], priority=[30, 110], cxx_compileflags=cxxflags )
|
||||||
|
@@ -67,8 +67,9 @@ incs += Split(env['BF_SOLID_INC'])
|
|||||||
incs += Split(env['BF_PNG_INC'])
|
incs += Split(env['BF_PNG_INC'])
|
||||||
incs += Split(env['BF_ZLIB_INC'])
|
incs += Split(env['BF_ZLIB_INC'])
|
||||||
|
|
||||||
cflags=[]
|
cxxflags = []
|
||||||
if env['OURPLATFORM']=='win32-vc':
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
cflags = ['/GR']
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, compileflags=cflags)
|
env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, cxx_compileflags=cxxflags)
|
||||||
|
@@ -45,12 +45,14 @@ incs = ['.',
|
|||||||
|
|
||||||
incs += Split(env['BF_PYTHON_INC'])
|
incs += Split(env['BF_PYTHON_INC'])
|
||||||
incs += Split(env['BF_SOLID_INC'])
|
incs += Split(env['BF_SOLID_INC'])
|
||||||
cflags = []
|
|
||||||
|
cxxflags = []
|
||||||
if env['OURPLATFORM']=='win32-vc':
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
cflags = ['/GR']
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
defs = ''
|
defs = ''
|
||||||
if env['WITH_BF_FFMPEG']:
|
if env['WITH_BF_FFMPEG']:
|
||||||
defs += ' WITH_FFMPEG'
|
defs += ' WITH_FFMPEG'
|
||||||
|
|
||||||
env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = Split(defs), libtype='player',priority=0, compileflags=cflags)
|
env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = Split(defs), libtype='player',priority=0, cxx_compileflags=cxxflags)
|
||||||
|
@@ -9,4 +9,10 @@ incs += ' #source/gameengine/Network'
|
|||||||
|
|
||||||
incs += ' ' + env['BF_PYTHON_INC']
|
incs += ' ' + env['BF_PYTHON_INC']
|
||||||
|
|
||||||
env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['game2', 'player'], priority=[5, 155] )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
|
||||||
|
env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['game2', 'player'], priority=[5, 155], cxx_compileflags=cxxflags )
|
||||||
|
@@ -34,11 +34,6 @@ incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/includ
|
|||||||
incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
|
incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
|
||||||
incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
|
incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
|
||||||
|
|
||||||
cflags = []
|
|
||||||
if env['OURPLATFORM'] == 'win32-vc':
|
|
||||||
cflags.append('/GR')
|
|
||||||
cflags.append('/Ox')
|
|
||||||
|
|
||||||
incs += ' ' + env['BF_SOLID_INC']
|
incs += ' ' + env['BF_SOLID_INC']
|
||||||
incs += ' ' + env['BF_PYTHON_INC']
|
incs += ' ' + env['BF_PYTHON_INC']
|
||||||
incs += ' ' + env['BF_BULLET_INC']
|
incs += ' ' + env['BF_BULLET_INC']
|
||||||
@@ -47,4 +42,9 @@ incs += ' ' + env['BF_OPENGL_INC']
|
|||||||
if env['WITH_BF_SDL']:
|
if env['WITH_BF_SDL']:
|
||||||
incs += ' ' + env['BF_SDL_INC']
|
incs += ' ' + env['BF_SDL_INC']
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], cxx_compileflags = cxxflags )
|
||||||
|
@@ -7,9 +7,9 @@ incs = '. ../common #source/kernel/gen_system #intern/string #intern/moto/includ
|
|||||||
|
|
||||||
incs += ' ' + env['BF_BULLET_INC']
|
incs += ' ' + env['BF_BULLET_INC']
|
||||||
|
|
||||||
cflags = []
|
cxxflags = []
|
||||||
if env['OURPLATFORM']=='win32-vc':
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
cflags.append('/GR')
|
cxxflags.append ('/GR')
|
||||||
cflags.append('/O2')
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['game','player'], priority=[15,90] )
|
env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['game','player'], priority=[15,90], cxx_compileflags=cxxflags )
|
||||||
|
@@ -5,4 +5,9 @@ sources = 'PHY_IMotionState.cpp PHY_IPhysicsController.cpp PHY_IPhysicsEnvironme
|
|||||||
|
|
||||||
incs = '. ../Dummy #intern/moto/include'
|
incs = '. ../Dummy #intern/moto/include'
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['game', 'game2','player'], priority=[20, 35, 95] )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['game', 'game2','player'], priority=[20, 35, 95], cxx_compileflags = cxxflags )
|
||||||
|
@@ -6,4 +6,9 @@ sources = env.Glob('*.cpp')
|
|||||||
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines '
|
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/Rasterizer #source/gameengine/BlenderRoutines '
|
||||||
incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
|
incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['game','player'], priority=[40, 120] )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['game','player'], priority=[40, 120], cxx_compileflags = cxxflags )
|
||||||
|
@@ -7,9 +7,9 @@ sources = env.Glob('*.cpp')
|
|||||||
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/blender/blenkernel #source/blender/makesdna'
|
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/blender/blenkernel #source/blender/makesdna'
|
||||||
incs += ' ' + env['BF_PYTHON_INC']
|
incs += ' ' + env['BF_PYTHON_INC']
|
||||||
|
|
||||||
|
cxxflags = []
|
||||||
if env['OURPLATFORM']=='win32-vc':
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
cflags = []
|
cxxflags.append ('/GR')
|
||||||
cflags.append('/Ox')
|
cxxflags.append ('/O2')
|
||||||
env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['game','player'], priority=[35,115], compileflags = cflags )
|
|
||||||
else:
|
env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['game','player'], priority=[35,115], cxx_compileflags = cxxflags )
|
||||||
env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['game','player'], priority=[35,115] )
|
|
||||||
|
@@ -6,4 +6,9 @@ sources = env.Glob('*.cpp') #'SG_BBox.cpp SG_Controller.cpp SG_IObject.cpp SG_No
|
|||||||
|
|
||||||
incs = '. #intern/moto/include'
|
incs = '. #intern/moto/include'
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['game','player'], priority=[50,130] )
|
cxxflags = []
|
||||||
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['game','player'], priority=[50,130], cxx_compileflags = cxxflags )
|
||||||
|
@@ -15,11 +15,12 @@ incs += ' #source/blender/gpu #source/kernel/gen_system #intern/string #intern/m
|
|||||||
incs += ' #intern/guardedalloc #intern/SoundSystem'
|
incs += ' #intern/guardedalloc #intern/SoundSystem'
|
||||||
incs += ' #extern/glew/include'
|
incs += ' #extern/glew/include'
|
||||||
|
|
||||||
cflags = []
|
|
||||||
defs = ''
|
defs = ''
|
||||||
if env['OURPLATFORM'] == 'win32-vc':
|
cxxflags = []
|
||||||
cflags.append('/GR')
|
if env['OURPLATFORM']=='win32-vc':
|
||||||
cflags.append('/Ox')
|
cxxflags.append ('/GR')
|
||||||
|
cxxflags.append ('/O2')
|
||||||
|
|
||||||
|
|
||||||
incs += ' ' + env['BF_PYTHON_INC']
|
incs += ' ' + env['BF_PYTHON_INC']
|
||||||
#incs += ' ' + env['BF_OPENGL_INC']
|
#incs += ' ' + env['BF_OPENGL_INC']
|
||||||
@@ -29,4 +30,4 @@ if env['WITH_BF_FFMPEG']:
|
|||||||
incs += ' ' + env['BF_FFMPEG_INC']
|
incs += ' ' + env['BF_FFMPEG_INC']
|
||||||
defs += ' __STDC_CONSTANT_MACROS'
|
defs += ' __STDC_CONSTANT_MACROS'
|
||||||
|
|
||||||
env.BlenderLib ( 'bf_videotex', sources, Split(incs), Split(defs), libtype=['game','player'], priority=[25, 72], compileflags = cflags )
|
env.BlenderLib ( 'bf_videotex', sources, Split(incs), Split(defs), libtype=['game','player'], priority=[25, 72], cxx_compileflags = cxxflags )
|
||||||
|
@@ -434,11 +434,11 @@ class BlenderEnvironment(SConsEnvironment):
|
|||||||
lenv.Append(CCFLAGS = lenv['BF_PROFILE_CCFLAGS'])
|
lenv.Append(CCFLAGS = lenv['BF_PROFILE_CCFLAGS'])
|
||||||
lenv.Append(CXXFLAGS = lenv['BF_PROFILE_CXXFLAGS'])
|
lenv.Append(CXXFLAGS = lenv['BF_PROFILE_CXXFLAGS'])
|
||||||
if compileflags:
|
if compileflags:
|
||||||
lenv.Append(CFLAGS = compileflags)
|
lenv.Replace(CFLAGS = compileflags)
|
||||||
if cc_compileflags:
|
if cc_compileflags:
|
||||||
lenv.Append(CCFLAGS = cc_compileflags)
|
lenv.Replace(CCFLAGS = cc_compileflags)
|
||||||
if cxx_compileflags:
|
if cxx_compileflags:
|
||||||
lenv.Append(CXXFLAGS = cxx_compileflags)
|
lenv.Replace(CXXFLAGS = cxx_compileflags)
|
||||||
lenv.Append(CFLAGS = lenv['C_WARN'])
|
lenv.Append(CFLAGS = lenv['C_WARN'])
|
||||||
lenv.Append(CCFLAGS = lenv['CC_WARN'])
|
lenv.Append(CCFLAGS = lenv['CC_WARN'])
|
||||||
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
|
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
|
||||||
|
Reference in New Issue
Block a user