From e1ab3cf48074f9ba8740dbd5714f9f2c41e3919f Mon Sep 17 00:00:00 2001 From: Michel Selten Date: Sun, 22 Feb 2004 19:01:12 +0000 Subject: SCons updates * Game engine can now be build on Linux. By default this feature is disabled. The reason is that you need to have a precompiled version of the ode library for your gcc version. To enable ode support you need to do the following: - compile ode. - set BUILD_GAMEENGINE = 'true' in the config.opts file. - set USE_PHYSICS='ode' in the config.opts file. - set the ODE_INCLUDE and ODE_LIBPATH to valid locations. * Linking order has changed for the game engine There are cyclic dependencies between libraries. On linux we have to do some duplicate linking. I looked at the order of linking in source/Makefile, and did some clean up. --- SConstruct | 28 ++++++++++++++++------------ source/gameengine/Physics/BlOde/SConscript | 2 +- source/gameengine/SConscript | 3 +-- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/SConstruct b/SConstruct index 3ab080dd2b2..8efa28e3b32 100644 --- a/SConstruct +++ b/SConstruct @@ -64,9 +64,9 @@ if sys.platform == 'linux2': qhull_libpath = [] # TODO qhull_include = ['#extern/qhull/include'] # ODE library information - ode_lib = [] # TODO - ode_libpath = [] # TODO - ode_include = ['#extern/ode/dist/include/ode'] + ode_lib = ['ode'] + ode_libpath = ['#../lib/linux-glibc2.2.5-i386/ode/lib'] + ode_include = ['#../lib/linux-glibc2.2.5-i386/ode/include'] # Python library information python_lib = ['python%d.%d' % sys.version_info[0:2]] python_libpath = [sysconfig.get_python_lib (0, 1) + '/config'] @@ -693,19 +693,22 @@ if user_options_dict['USE_INTERNATIONAL'] == 1: if user_options_dict['USE_QUICKTIME'] == 1: link_env.Append (LIBS=['blender_quicktime']) if user_options_dict['BUILD_GAMEENGINE'] == 1: - link_env.Append (LIBS=['blender_expressions', - 'KX_blenderhook', + link_env.Append (LIBS=['KX_blenderhook', 'KX_converter', - 'KX_ketsji', - 'KX_network', - 'NG_loopbacknetwork', - 'NG_network', - 'PHY_Physics', 'PHY_Dummy', + 'PHY_Physics', + 'KX_ketsji', 'SCA_GameLogic', 'RAS_rasterizer', 'RAS_OpenGLRasterizer', - 'SG_SceneGraph']) + 'blender_expressions', + 'SG_SceneGraph', + 'blender_MT', + 'KX_blenderhook', + 'KX_network', + 'blender_kernel', + 'NG_network', + 'NG_loopbacknetwork']) if user_options_dict['USE_PHYSICS'] == 'solid': link_env.Append (LIBS=['PHY_Sumo']) link_env.Append (LIBS=user_options_dict['SOLID_LIBRARY']) @@ -713,7 +716,8 @@ if user_options_dict['BUILD_GAMEENGINE'] == 1: link_env.Append (LIBS=user_options_dict['QHULL_LIBRARY']) link_env.Append (LIBPATH=user_options_dict['QHULL_LIBPATH']) else: - link_env.Append (LIBS=['PHY_Ode']) + link_env.Append (LIBS=['PHY_Ode', + 'PHY_Physics']) link_env.Append (LIBS=user_options_dict['ODE_LIBRARY']) link_env.Append (LIBPATH=user_options_dict['ODE_LIBPATH']) diff --git a/source/gameengine/Physics/BlOde/SConscript b/source/gameengine/Physics/BlOde/SConscript index 5048d163731..03be5c12b46 100755 --- a/source/gameengine/Physics/BlOde/SConscript +++ b/source/gameengine/Physics/BlOde/SConscript @@ -15,6 +15,6 @@ source_files = ['OdePhysicsController.cpp', phy_ode_env.Append (CPPPATH=['.', '../common', ]) -phy_ode_env.Append (CPPPATH=['ODE_INCLUDE']) +phy_ode_env.Append (CPPPATH=user_options_dict['ODE_INCLUDE']) phy_ode_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/PHY_Ode', source=source_files) diff --git a/source/gameengine/SConscript b/source/gameengine/SConscript index 1984c121b00..ebe66a15312 100644 --- a/source/gameengine/SConscript +++ b/source/gameengine/SConscript @@ -16,6 +16,5 @@ SConscript(['BlenderRoutines/SConscript', if user_options_dict['USE_PHYSICS'] == 'solid': SConscript(['Physics/Sumo/SConscript']) - -if user_options_dict['USE_PHYSICS'] == 'ode': +elif user_options_dict['USE_PHYSICS'] == 'ode': SConscript(['Physics/BlOde/SConscript']) -- cgit v1.2.3