SCons
* ensure all SConscripts are ready for win64-vc (where necessary). * ensure we have proper _DEBUG flag for Python when we're doing a debug build. * some cleaning up of linking etc. * ensure /EHsc is there for game engine modules.
This commit is contained in:
@@ -149,7 +149,7 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT', '/wd4244', '/wd4305', '/wd4800']
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
|
||||
@@ -165,7 +165,7 @@ CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/ENTRY:mainCRTStartup','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/LARGEADDRESSAWARE']
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"', '/LARGEADDRESSAWARE']
|
||||
|
||||
# # Todo
|
||||
# BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
|
@@ -152,7 +152,8 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT', '/wd4244', '/wd4305', '/wd4800']
|
||||
CFLAGS = []
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
|
||||
@@ -172,16 +173,13 @@ WITH_BF_DOCS=False
|
||||
|
||||
BF_DEBUG=False
|
||||
BF_BSC=False
|
||||
CFLAGS = []
|
||||
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
|
||||
if BF_DEBUG:
|
||||
BF_NUMJOBS=1
|
||||
else:
|
||||
BF_NUMJOBS=6
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/ENTRY:mainCRTStartup','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"']
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"']
|
||||
|
||||
BF_BUILDDIR = '..\\build\\blender25-win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\blender25-win64-vc'
|
||||
|
2
extern/bullet2/src/SConscript
vendored
2
extern/bullet2/src/SConscript
vendored
@@ -10,7 +10,7 @@ cflags = []
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
defs += ' WIN32 NDEBUG _WINDOWS _LIB'
|
||||
#cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
|
||||
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3']
|
||||
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
|
||||
elif env['OURPLATFORM']=='win32-mingw':
|
||||
defs += ' NDEBUG'
|
||||
cflags += ['-O2']
|
||||
|
4
extern/libopenjpeg/SConscript
vendored
4
extern/libopenjpeg/SConscript
vendored
@@ -10,14 +10,14 @@ incs = '.'
|
||||
flags = []
|
||||
defs = []
|
||||
|
||||
if env['OURPLATFORM'] == 'win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
flags = []
|
||||
defs.append('OPJ_STATIC')
|
||||
else:
|
||||
flags = ['-Wall', '-O3', '-ffast-math', '-std=c99']
|
||||
|
||||
oj_env = env.Clone()
|
||||
if not env['OURPLATFORM'] == 'win32-vc':
|
||||
if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
oj_env.Replace(CCFLAGS = '')
|
||||
oj_env.Replace(BF_DEBUG_FLAGS = '')
|
||||
|
||||
|
@@ -10,7 +10,7 @@ defs = 'NOGUI ELBEEM_BLENDER=1'
|
||||
if env['WITH_BF_OPENMP']:
|
||||
defs += ' PARALLEL'
|
||||
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
defs += ' USE_MSVC6FIXES'
|
||||
incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC']
|
||||
incs += ' extern '
|
||||
|
@@ -8,7 +8,7 @@ incs += ' ../../nodes ../../render/extern/include'
|
||||
incs += ' ../../windowmanager #intern/guardedalloc #extern/glew/include'
|
||||
defs = []
|
||||
cf = []
|
||||
if env['OURPLATFORM'] == 'win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
#cf.append('/WX')
|
||||
pass
|
||||
if env['CC'] == 'gcc':
|
||||
|
@@ -86,7 +86,7 @@ if env['BF_PROFILE']:
|
||||
if env['BF_DEBUG']:
|
||||
makesrna_tool.Append(CFLAGS = env['BF_DEBUG_CFLAGS'])
|
||||
makesrna_tool.Append(CCFLAGS = env['BF_DEBUG_CCFLAGS'])
|
||||
if env['OURPLATFORM'] == 'win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc','win64-vc'):
|
||||
makesrna_tool.Append(LINKFLAGS = ['/DEBUG','/PDB:makesrna.pdb'])
|
||||
|
||||
targetpath = root_build_dir+'/makesrna'
|
||||
|
@@ -10,8 +10,8 @@ incs += ' ' + env['BF_PYTHON_INC']
|
||||
|
||||
defs = []
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc') and env['BF_DEBUG']:
|
||||
defs.append('Py_TRACE_REFS')
|
||||
if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc','win64-vc') and env['BF_DEBUG']:
|
||||
defs.append('_DEBUG')
|
||||
|
||||
env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [140])
|
||||
|
||||
|
@@ -29,8 +29,9 @@ incs += ' ' + env['BF_BULLET_INC']
|
||||
incs += ' ' + env['BF_OPENGL_INC']
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc','win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_bloutines', sources, Split(incs), defs, libtype=['core', 'player'], priority=[300, 45] , cxx_compileflags=cxxflags)
|
||||
|
@@ -7,8 +7,9 @@ incs ='. #source/kernel/gen_system #intern/string #intern/moto/include #source/g
|
||||
incs += ' ' + env['BF_PYTHON_INC']
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['core','player'], priority = [360,120], cxx_compileflags=cxxflags)
|
||||
|
@@ -10,16 +10,19 @@ incs += ' #/source/gameengine/Rasterizer #/source/gameengine/SceneGraph'
|
||||
incs += ' ' + env['BF_PYTHON_INC']
|
||||
|
||||
|
||||
defs = ''
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
incs += ' ' + env['BF_SDL_INC']
|
||||
else:
|
||||
defs += ' DISABLE_SDL'
|
||||
defs.append('DISABLE_SDL')
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
if env['BF_DEBUG']:
|
||||
defs.append('_DEBUG')
|
||||
|
||||
env.BlenderLib ( 'bf_logic', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[330, 100], cxx_compileflags=cxxflags )
|
||||
env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330, 100], cxx_compileflags=cxxflags )
|
||||
|
@@ -64,8 +64,9 @@ incs += Split(env['BF_PNG_INC'])
|
||||
incs += Split(env['BF_ZLIB_INC'])
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, cxx_compileflags=cxxflags)
|
||||
|
@@ -44,9 +44,10 @@ incs = ['.',
|
||||
incs += Split(env['BF_PYTHON_INC'])
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
defs = ''
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
|
@@ -10,9 +10,10 @@ incs += ' #source/gameengine/Network #source/gameengine/SceneGraph'
|
||||
incs += ' ' + env['BF_PYTHON_INC']
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
|
||||
env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['core', 'player'], priority=[400, 145], cxx_compileflags=cxxflags )
|
||||
|
@@ -4,7 +4,7 @@ import sys
|
||||
Import ('env')
|
||||
|
||||
sources = env.Glob('*.cpp')
|
||||
defs = ''
|
||||
defs = []
|
||||
|
||||
incs = '. #source/blender/python/generic' # Only for Mathutils! and bpy_internal_import.h, be very careful
|
||||
|
||||
@@ -28,11 +28,14 @@ incs += ' ' + env['BF_OPENGL_INC']
|
||||
if env['WITH_BF_SDL']:
|
||||
incs += ' ' + env['BF_SDL_INC']
|
||||
else:
|
||||
defs += ' DISABLE_SDL'
|
||||
defs.append('DISABLE_SDL')
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
if env['BF_DEBUG']:
|
||||
defs.append('_DEBUG') # for Python
|
||||
|
||||
env.BlenderLib ( 'bf_ketsji', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[320, 60], cxx_compileflags = cxxflags )
|
||||
env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320, 60], cxx_compileflags = cxxflags )
|
||||
|
@@ -23,8 +23,9 @@ incs += ' ' + env['BF_BULLET_INC']
|
||||
incs += ' ' + env['BF_PYTHON_INC']
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,80], cxx_compileflags=cxxflags )
|
||||
|
@@ -6,8 +6,9 @@ sources = 'PHY_IMotionState.cpp PHY_IController.cpp PHY_IPhysicsController.cpp P
|
||||
incs = '. ../Dummy #intern/moto/include'
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['core','player'], priority=[360, 90], cxx_compileflags = cxxflags )
|
||||
|
@@ -9,8 +9,9 @@ incs += ' #source/blender/gameengine/Ketsji #source/gameengine/SceneGraph #sourc
|
||||
incs += ' #intern/guardedalloc #source/blender/blenlib'
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350, 115], cxx_compileflags = cxxflags )
|
||||
|
@@ -8,8 +8,9 @@ incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/
|
||||
incs += ' ' + env['BF_PYTHON_INC']
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['core','player'], priority=[350,115], cxx_compileflags = cxxflags )
|
||||
|
@@ -7,8 +7,9 @@ sources = env.Glob('*.cpp')
|
||||
incs = '. #intern/moto/include'
|
||||
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
|
||||
env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['core','player'], priority=[325,125], cxx_compileflags = cxxflags )
|
||||
|
@@ -15,19 +15,22 @@ incs += ' #source/blender/gpu #source/kernel/gen_system #intern/string #intern/m
|
||||
incs += ' #intern/guardedalloc #intern/SoundSystem'
|
||||
incs += ' #extern/glew/include'
|
||||
|
||||
defs = ''
|
||||
defs = []
|
||||
cxxflags = []
|
||||
if env['OURPLATFORM']=='win32-vc':
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
cxxflags.append ('/GR')
|
||||
cxxflags.append ('/O2')
|
||||
cxxflags.append ('/EHsc')
|
||||
if env['BF_DEBUG']:
|
||||
defs.append('_DEBUG')
|
||||
|
||||
|
||||
incs += ' ' + env['BF_PYTHON_INC']
|
||||
#incs += ' ' + env['BF_OPENGL_INC']
|
||||
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
defs += ' WITH_FFMPEG'
|
||||
defs.append('WITH_FFMPEG')
|
||||
incs += ' ' + env['BF_FFMPEG_INC'] + ' ' + env['BF_PTHREADS_INC']
|
||||
defs += ' __STDC_CONSTANT_MACROS'
|
||||
defs.append('__STDC_CONSTANT_MACROS')
|
||||
|
||||
env.BlenderLib ( 'bf_videotex', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[300, 72], cxx_compileflags = cxxflags )
|
||||
env.BlenderLib ( 'bf_videotex', sources, Split(incs), defs, libtype=['core','player'], priority=[300, 72], cxx_compileflags = cxxflags )
|
||||
|
@@ -449,6 +449,12 @@ class BlenderEnvironment(SConsEnvironment):
|
||||
lenv.Append(CCFLAGS = lenv['CC_WARN'])
|
||||
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
|
||||
|
||||
if lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
if lenv['BF_DEBUG']:
|
||||
lenv.Append(CCFLAGS = ['/MTd'])
|
||||
else:
|
||||
lenv.Append(CCFLAGS = ['/MT'])
|
||||
|
||||
targetdir = root_build_dir+'lib/' + libname
|
||||
if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
|
||||
targetdir = '#'+targetdir
|
||||
@@ -476,6 +482,7 @@ class BlenderEnvironment(SConsEnvironment):
|
||||
lenv = self.Clone()
|
||||
if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'):
|
||||
lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
|
||||
lenv.Append(LINKFLAGS = ['/FORCE:MULTIPLE'])
|
||||
if lenv['BF_DEBUG']:
|
||||
lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb'])
|
||||
if lenv['OURPLATFORM']=='linux2':
|
||||
|
Reference in New Issue
Block a user