diff options
Diffstat (limited to 'o3d/main.scons')
-rw-r--r-- | o3d/main.scons | 144 |
1 files changed, 121 insertions, 23 deletions
diff --git a/o3d/main.scons b/o3d/main.scons index 41b9dd8..0c25ea0 100644 --- a/o3d/main.scons +++ b/o3d/main.scons @@ -77,7 +77,6 @@ base_env = Environment( COVERAGE_TARGETS = ['unit_tests', 'system_tests'], MSVS_USE_MFC_DIRS=1, ) - base_env.ApplySConscript(['svn_paths.scons']) base_env.Append( @@ -87,8 +86,8 @@ base_env.Append( DOCS_DIR = '$DESTINATION_ROOT/docs', CPPPATH = [ - # The internal dir is first so that headers in internal can replace - # those in external. + # The internal dir is first so that headers in internal can replace
+ # those in external.
'$INTERNAL_DIR', '$SCONSTRUCT_DIR/..', '$SCONSTRUCT_DIR', @@ -211,7 +210,7 @@ def AddPathToWindowsEnv(env_dict, var, path): env_dict[var] = '%s;%s' % (src, path) # This function builds the native client IMC or HTP libraries by -# calling hammer to do a NaCl build. It should handle dependencies +# calling scons to do a NaCl build. It should handle dependencies # correctly and will not rebuild unless necessary. def AddNaclBuildCommand(env, variant, platforms): if sys.platform not in platforms: return @@ -371,8 +370,6 @@ windows_d3d_env.Append( RENDERER_LIBS = ['d3d9', 'dxerr9'], ) - - windows_gl_env = windows_env.Clone() windows_gl_env.Append( RENDERER_INCLUDE_PATH = [ @@ -475,7 +472,6 @@ windows_gl_debug_env.Append(BUILD_GROUPS = ['most']) AddWindowsDebugSettings(windows_gl_debug_env) environment_list.append(windows_gl_debug_env) - windows_gl_optimized_env = windows_gl_env.Clone( BUILD_TYPE = 'opt-gl', BUILD_TYPE_DESCRIPTION = 'Windows OpenGL optimized build', @@ -484,10 +480,9 @@ windows_gl_optimized_env.Append(BUILD_GROUPS = ['most']) AddWindowsOptimizedSettings(windows_gl_optimized_env) environment_list.append(windows_gl_optimized_env) - windows_cb_env = windows_env.Clone() windows_cb_env.Append( - CPPDEFINES = ['RENDERER_CB'], + CPPDEFINES = ['RENDERER_CB', 'CB_SERVICE_D3D9'], BUILD_COMPONENTS = [ 'command_buffer/common', 'command_buffer/service', @@ -517,6 +512,7 @@ windows_cb_debug_env = windows_cb_env.Clone( AddWindowsDebugSettings(windows_cb_debug_env) environment_list.append(windows_cb_debug_env) + windows_cb_optimized_env = windows_cb_env.Clone( BUILD_TYPE = 'opt-cb', BUILD_TYPE_DESCRIPTION = 'Windows Command Buffer optimized build', @@ -525,6 +521,56 @@ windows_cb_optimized_env = windows_cb_env.Clone( AddWindowsOptimizedSettings(windows_cb_optimized_env) environment_list.append(windows_cb_optimized_env) + +windows_cb_gl_env = windows_env.Clone() +windows_cb_gl_env.Append( + CPPDEFINES = ['RENDERER_CB', 'CB_SERVICE_GL'], + BUILD_COMPONENTS = [ + 'command_buffer/common', + 'command_buffer/service', + 'command_buffer/client' + ], + RENDERER_INCLUDE_PATH = [ + '$GLEW_DIR/include', + '$CG_DIR/include', + ], + RENDERER_LIB_PATH = [ + 'command_buffer/common', + 'command_buffer/service', + 'command_buffer/client', + '$CG_DIR/lib', + '$GLEW_DIR/lib', + ], + RENDERER_LIBS = [ + 'o3dCmdBuf_service', + 'o3dCmdBuf_client', + 'o3dCmdBuf_common', + 'OpenGL32', + 'glew32', + 'cg', + 'cgGL', + ] + nacl_htp_all_libs, +) + +windows_cb_gl_debug_env = windows_cb_gl_env.Clone( + BUILD_TYPE = 'dbg-cb-gl', + BUILD_TYPE_DESCRIPTION = + 'Windows Command Buffer using OpenGL debug build' +) + +AddWindowsDebugSettings(windows_cb_gl_debug_env) +environment_list.append(windows_cb_gl_debug_env) + +windows_cb_gl_optimized_env = windows_cb_gl_env.Clone( + BUILD_TYPE = 'opt-cb-gl', + BUILD_TYPE_DESCRIPTION = + 'Windows Command Buffer using OpenGL optimized build', +) + +AddWindowsOptimizedSettings(windows_cb_gl_optimized_env) +environment_list.append(windows_cb_gl_optimized_env) + + # These configs are highly very experimental, and just including them # necessitate downloading the nacl sdk even if they are not active. So include # them only when a specific flag is passed on the command line. @@ -592,7 +638,8 @@ mac_env.FilterOut(CPPDEFINES = ['OS_MACOSX=OS_MACOSX']) mac_env.Append(CPPDEFINES = ['RENDERER_GL', 'GTEST_NOT_MAC_FRAMEWORK_MODE', ['NACL_OSX', '1'], - ['MAC_OS_X_VERSION_MIN_REQUIRED', 'MAC_OS_X_VERSION_10_4'], + ['MAC_OS_X_VERSION_MIN_REQUIRED', + 'MAC_OS_X_VERSION_10_4'], 'SK_BUILD_FOR_MAC' ], RENDERER_INCLUDE_PATH = [ @@ -616,9 +663,30 @@ mac_env.Append(CPPDEFINES = ['RENDERER_GL', 'statsreport', 'statsreport/common', ], - ) +def AddMacDebugSettings(env): + env.Append( + BUILD_GROUPS = ['default', 'most'], + CCFLAGS = ['-g'], + CPPDEFINES = ['_DEBUG'] + ) + env.Replace( + DEBUG = True, + NACL_VARIANT = 'dbg-mac', + ) + +def AddMacOptimizedSettings(env): + env.Append( + BUILD_GROUPS = ['most'], + CCFLAGS = ['-O3'], + CPPDEFINES = ['NDEBUG', 'ANTLR3_NO_DEBUGGER'] + ) + env.Replace( + DEBUG = False, + NACL_VARIANT = 'opt-mac', + ) + mac_debug_env = mac_env.Clone( BUILD_TYPE = 'dbg-mac', @@ -627,27 +695,57 @@ mac_debug_env = mac_env.Clone( NACL_VARIANT = 'dbg-mac', ) -mac_debug_env.Append(CCFLAGS = ['-g'], CPPDEFINES = ['_DEBUG']) - -mac_debug_env.Append(BUILD_GROUPS = ['default', 'most']) - +AddMacDebugSettings(mac_debug_env) environment_list.append(mac_debug_env) - mac_optimized_env = mac_env.Clone( BUILD_TYPE = 'opt-mac', BUILD_TYPE_DESCRIPTION = 'MacOS optimized build', - DEBUG = False, - NACL_VARIANT = 'opt-mac', ) -mac_optimized_env.Append( - BUILD_GROUPS = ['most'], - CCFLAGS = ['-O3'], - CPPDEFINES = ['-DNDEBUG', '-DANTLR3_NO_DEBUGGER'], +AddMacOptimizedSettings(mac_optimized_env) +environment_list.append(mac_optimized_env) + +mac_cb_env = mac_env.Clone() + +mac_cb_env.Append( + CPPDEFINES = ['RENDERER_CB'], + BUILD_COMPONENTS = [ + 'command_buffer/common', + 'command_buffer/service', + 'command_buffer/client' + ], + RENDERER_INCLUDE_PATH = [], + RENDERER_LIB_PATH = [ + 'command_buffer/common', + 'command_buffer/service', + 'command_buffer/client', + ], + RENDERER_LIBS = [ + 'o3dCmdBuf_service', + 'o3dCmdBuf_client', + 'o3dCmdBuf_common', + 'MacStaticGLEW' + ] + nacl_htp_all_libs ) -environment_list.append(mac_optimized_env) +mac_cb_debug_env = mac_cb_env.Clone( + BUILD_TYPE = 'dbg-mac-cb', + BUILD_TYPE_DESCRIPTION = 'Mac command buffer debug build', + DEBUG = True, + NACL_VARIANT = 'dbg-mac' +) + +AddMacDebugSettings(mac_cb_debug_env) +environment_list.append(mac_cb_debug_env) + +mac_cb_optimized_env = mac_cb_env.Clone( + BUILD_TYPE = 'opt-mac-cb', + BUILD_TYPE_DESCRIPTION = 'Mac Command Buffer optimized build', +) + +AddMacOptimizedSettings(mac_cb_optimized_env) +environment_list.append(mac_cb_optimized_env) mac_test_optimized_env = mac_optimized_env.Clone( BUILD_TYPE = 'test-opt-mac', |