diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2005-10-23 21:55:19 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2005-10-23 21:55:19 +0400 |
commit | 745fc2f9d045508c4c822266dbe3a90274b3ec73 (patch) | |
tree | 7578e1fb20d3fcab16594ca1c519997ee5c21b67 | |
parent | 6ce7d18371f8d2d1319082ed3cef553de339a65c (diff) |
updated SConstruct and Makefile so that if you compile the gameengine, is always enables bullet, independent of sumo/ode.
So for the 2.4 release, both bullet AND sumo will be enabled. You can choose in the world buttons which physics engine is active for a scene.
sorry if this breaks your builds!
-rw-r--r-- | SConstruct | 9 | ||||
-rw-r--r-- | extern/Makefile | 2 | ||||
-rw-r--r-- | source/Makefile | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObject.h | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/SConscript | 8 | ||||
-rw-r--r-- | source/gameengine/Physics/Makefile | 5 | ||||
-rw-r--r-- | source/gameengine/SConscript | 5 | ||||
-rw-r--r-- | tools/scons/bs/bs_libs.py | 4 |
8 files changed, 20 insertions, 27 deletions
diff --git a/SConstruct b/SConstruct index 929856d1de9..e4bee7c6f87 100644 --- a/SConstruct +++ b/SConstruct @@ -69,7 +69,7 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386': use_quicktime = 'false' use_sumo = 'true' use_ode = 'false' - use_bullet = 'false' + use_bullet = 'true' use_buildinfo = 'true' use_fluidsim = 'true' build_blender_dynamic = 'true' @@ -156,7 +156,7 @@ elif sys.platform == 'darwin': use_precomp = 'true' use_sumo = 'true' use_ode = 'false' - use_bullet = 'false' + use_bullet = 'true' use_buildinfo = 'true' use_fluidsim = 'true' build_blender_dynamic = 'true' @@ -359,7 +359,7 @@ elif sys.platform == 'win32': use_quicktime = 'true' use_sumo = 'true' use_ode = 'false' - use_bullet = 'false' + use_bullet = 'true' use_buildinfo = 'true' use_fluidsim = 'true' build_blender_dynamic = 'true' @@ -1046,10 +1046,9 @@ bs_globals.config_guess = config_guess if user_options_dict['BUILD_GAMEENGINE'] == 1: defines += ['GAMEBLENDER=1'] + defines += ['USE_BULLET'] if user_options_dict['USE_PHYSICS'] == 'ode': defines += ['USE_ODE'] - elif user_options_dict['USE_PHYSICS'] == 'bullet': - defines += ['USE_BULLET'] else: defines += ['USE_SUMO_SOLID'] else: diff --git a/extern/Makefile b/extern/Makefile index 0a85b9b5220..53abb0b1b3c 100644 --- a/extern/Makefile +++ b/extern/Makefile @@ -40,7 +40,7 @@ ifeq ($(WITH_FREETYPE2), true) DIRS += bFTGL/src endif -ifeq ($(NAN_USE_BULLET), true) +ifneq ($(NAN_NO_KETSJI), true) DIRS += bullet endif diff --git a/source/Makefile b/source/Makefile index 67ec1c82961..078eb867abe 100644 --- a/source/Makefile +++ b/source/Makefile @@ -125,9 +125,7 @@ ifneq ($(NAN_NO_KETSJI),true) # COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a - ifeq ($(NAN_USE_BULLET), true) - COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a - endif + COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a @@ -147,10 +145,8 @@ ifneq ($(NAN_NO_KETSJI),true) COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a - ifeq ($(NAN_USE_BULLET), true) - COMLIB += $(NAN_BULLET)/lib/libbulletdyn.a - COMLIB += $(NAN_BULLET)/lib/libbullet.a - endif + COMLIB += $(NAN_BULLET)/lib/libbulletdyn.a + COMLIB += $(NAN_BULLET)/lib/libbullet.a endif COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h index e38ff77f76e..b1922e247d1 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h @@ -33,7 +33,11 @@ #define KX_CONVERTPHYSICSOBJECTS /* These are defined by the build system... */ +//but the build system is broken, because it doesn't allow for 2 or more defines at once. +//Please leave Sumo _AND_ Bullet enabled #define USE_SUMO_SOLID +#define USE_BULLET + //#define USE_ODE //on visual studio 7/8, always enable BULLET for now diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index aa74e4e29c7..7051f7e5541 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -57,7 +57,8 @@ source_files = ['KX_WorldIpoController.cpp', 'KX_CDActuator.cpp', 'KX_CameraIpoSGController.cpp', 'KX_CameraActuator.cpp', - 'KX_Camera.cpp' + 'KX_Camera.cpp', + 'KX_BulletPhysicsController.cpp' ] if user_options_dict['USE_PHYSICS'] == 'solid': @@ -68,10 +69,6 @@ if user_options_dict['USE_PHYSICS'] == 'ode': source_files += ['KX_OdePhysicsController.cpp'] ketsji_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE']) -if user_options_dict['USE_PHYSICS'] == 'bullet': - source_files += ['KX_BulletPhysicsController.cpp'] - ketsji_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE']) - ketsji_env.Append (CPPPATH = user_options_dict['SOLID_INCLUDE']) ketsji_env.Append (CPPPATH = ['.', '#source/kernel/gen_system', @@ -118,5 +115,6 @@ if sys.platform == 'win32': ketsji_env.Append ( CCFLAGS =['/Ox']) ketsji_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE']) ketsji_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE']) +ketsji_env.Append (CPPPATH = user_options_dict['BULLET_INCLUDE']) ketsji_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/KX_ketsji', source=source_files) diff --git a/source/gameengine/Physics/Makefile b/source/gameengine/Physics/Makefile index b88cedee8f2..62e433cb72c 100644 --- a/source/gameengine/Physics/Makefile +++ b/source/gameengine/Physics/Makefile @@ -35,10 +35,7 @@ include nan_definitions.mk SOURCEDIR = source/gameengine/Physics DIR = $(OCGDIR)/gameengine/blphys -DIRS = common Sumo Dummy +DIRS = common Sumo Dummy Bullet #DIRS += BlOde -ifeq ($(NAN_USE_BULLET), true) - DIRS += Bullet -endif include nan_subdirs.mk diff --git a/source/gameengine/SConscript b/source/gameengine/SConscript index 496d9dc8f3c..ca4283944b5 100644 --- a/source/gameengine/SConscript +++ b/source/gameengine/SConscript @@ -13,7 +13,8 @@ SConscript(['BlenderRoutines/SConscript', 'Physics/Dummy/SConscript', 'Rasterizer/SConscript', 'Rasterizer/RAS_OpenGLRasterizer/SConscript', - 'SceneGraph/SConscript']) + 'SceneGraph/SConscript', + 'Physics/Bullet/SConscript']) if user_options_dict['BUILD_BLENDER_PLAYER']: SConscript(['GamePlayer/SConscript']) @@ -22,5 +23,3 @@ if user_options_dict['USE_PHYSICS'] == 'solid': SConscript(['Physics/Sumo/SConscript']) elif user_options_dict['USE_PHYSICS'] == 'ode': SConscript(['Physics/BlOde/SConscript']) -elif user_options_dict['USE_PHYSICS'] == 'bullet': - SConscript(['Physics/Bullet/SConscript']) diff --git a/tools/scons/bs/bs_libs.py b/tools/scons/bs/bs_libs.py index b62879478ef..4faebf17260 100644 --- a/tools/scons/bs/bs_libs.py +++ b/tools/scons/bs/bs_libs.py @@ -73,7 +73,9 @@ def ketsji_libs(env): env.Append (LIBS=['KX_blenderhook', 'KX_converter', 'PHY_Dummy', + 'PHY_Bullet', 'PHY_Physics', + 'extern_bullet', 'KX_ketsji', 'SCA_GameLogic', 'RAS_rasterizer', @@ -88,8 +90,6 @@ def ketsji_libs(env): 'NG_loopbacknetwork']) if bs_globals.user_options_dict['USE_PHYSICS'] == 'solid': env.Append (LIBS=['PHY_Sumo', 'PHY_Physics', 'blender_MT', 'extern_solid', 'extern_qhull']) - elif bs_globals.user_options_dict['USE_PHYSICS'] == 'bullet': - env.Append (LIBS=['PHY_Bullet', 'PHY_Physics', 'blender_MT','extern_bullet']) else: env.Append (LIBS=['PHY_Ode', 'PHY_Physics']) |