updated SConstruct and Makefile so that if you compile the gameengine, is always...
authorErwin Coumans <blender@erwincoumans.com>
Sun, 23 Oct 2005 17:55:19 +0000 (17:55 +0000)
committerErwin Coumans <blender@erwincoumans.com>
Sun, 23 Oct 2005 17:55:19 +0000 (17:55 +0000)
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!

SConstruct
extern/Makefile
source/Makefile
source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
source/gameengine/Ketsji/SConscript
source/gameengine/Physics/Makefile
source/gameengine/SConscript
tools/scons/bs/bs_libs.py

index 929856d1de9c976f4260d07fae22809f6edf7e62..e4bee7c6f873da11c8a44cd9efb229b8e61a3a66 100644 (file)
@@ -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:
index 0a85b9b522072e7ded8849ef8f27db4d2fb74808..53abb0b1b3c3f8fea7fead7e03f83afe6e8de225 100644 (file)
@@ -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
 
index 67ec1c8296133f33393c9d9758cd2bf8bb6acd73..078eb867abe48fe67ec2d60b51f1354368fd2222 100644 (file)
@@ -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
index e38ff77f76e88ac8e66634ced82d96bc357a662a..b1922e247d149d6c19443e7c76c37559ee2c8348 100644 (file)
 #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 
index aa74e4e29c7e6eecc90ecbc71720da8dd70136b4..7051f7e55411dc92054ccbd199c98d788bf2a8ca 100644 (file)
@@ -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)
index b88cedee8f2ee9deebe3a2642558d54e3bf91aa5..62e433cb72c8f3c80f4f7ca6fc32162946702078 100644 (file)
@@ -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
index 496d9dc8f3cae5ffee700786c48c8241bcc5672c..ca4283944b59259e06074483eab2bdbde0c3eec2 100644 (file)
@@ -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'])
index b62879478eff3ba779cdcc044d702ffd905bb852..4faebf17260119b486ad743a983f070771c8570a 100644 (file)
@@ -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'])