Makefile support for bullet2 ... please test
authorChris Want <cwant@ualberta.ca>
Wed, 22 Nov 2006 19:05:35 +0000 (19:05 +0000)
committerChris Want <cwant@ualberta.ca>
Wed, 22 Nov 2006 19:05:35 +0000 (19:05 +0000)
extern/Makefile
extern/bullet2/Makefile [new file with mode: 0644]
extern/bullet2/src/Makefile [new file with mode: 0644]
source/Makefile
source/gameengine/Converter/Makefile
source/gameengine/Ketsji/Makefile
source/gameengine/Physics/Bullet/Makefile
source/nan_definitions.mk

index fb5570eff4b1b5736d19c5d68e68d00f69a5a8d7..04b282a89263da331f61a50c289d172b7543b277 100644 (file)
@@ -53,7 +53,7 @@ ifeq ($(WITH_VERSE), true)
 endif
 
 ifneq ($(NAN_NO_KETSJI), true)
-    DIRS += bullet
+    DIRS += bullet2
 endif
 
 TARGET =
@@ -74,4 +74,3 @@ clean test debug::
            echo "====> $(MAKE) $@ in $(SOURCEDIR)/$$i" ;\
            $(MAKE) -C $$i $@ || exit 1; \
        done
-
diff --git a/extern/bullet2/Makefile b/extern/bullet2/Makefile
new file mode 100644 (file)
index 0000000..e835160
--- /dev/null
@@ -0,0 +1,63 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2002 by Hans Lambermont
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s):
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+LIBNAME = bullet2
+SOURCEDIR = extern/$(LIBNAME)
+DIR = $(OCGDIR)/extern/$(LIBNAME)
+DIRS = src
+DISTDIR = src
+
+BULLETDIRS = \
+LinearMath \
+BulletCollision/BroadphaseCollision \
+BulletCollision/CollisionShapes \
+BulletCollision/NarrowPhaseCollision \
+BulletCollision//CollisionDispatch \
+BulletDynamics/ConstraintSolver \
+BulletDynamics/Vehicle \
+BulletDynamics/Dynamics
+
+include nan_subdirs.mk
+
+CP = $(NANBLENDERHOME)/intern/tools/cpifdiff.sh
+
+install: all debug
+       @[ -d $(NAN_BULLET2) ] || mkdir -p $(NAN_BULLET2)
+       @[ -d $(NAN_BULLET2)/include ] || mkdir -p $(NAN_BULLET2)/include
+       @for i in $(BULLETDIRS); do \
+       [ -d $(NAN_BULLET2)/include/$$i ] || mkdir -p $(NAN_BULLET2)/include/$$i; \
+       $(CP) $(DISTDIR)/$$i/*.h $(NAN_BULLET2)/include/$$i; \
+       done
+       @[ -d $(NAN_BULLET2)/lib ] || mkdir -p $(NAN_BULLET2)/lib
+       @$(CP) $(DISTDIR)/*.h $(NAN_BULLET2)/include
+       @$(CP) $(DIR)/libbullet2.a $(NAN_BULLET2)/lib
+ifeq ($(OS),darwin)
+       ranlib $(NAN_BULLET2)/lib/libbullet2.a
+endif
diff --git a/extern/bullet2/src/Makefile b/extern/bullet2/src/Makefile
new file mode 100644 (file)
index 0000000..78e5c60
--- /dev/null
@@ -0,0 +1,66 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+
+LIBNAME = bullet2
+DIR = $(OCGDIR)/extern/$(LIBNAME)
+
+BULLETDIRS = \
+LinearMath \
+BulletCollision/BroadphaseCollision \
+BulletCollision/CollisionShapes \
+BulletCollision/NarrowPhaseCollision \
+BulletCollision/CollisionDispatch \
+BulletDynamics/ConstraintSolver \
+BulletDynamics/Vehicle \
+BulletDynamics/Dynamics
+
+CCSRCS = $(wildcard \
+LinearMath/*.cpp \
+BulletCollision/BroadphaseCollision/*.cpp \
+BulletCollision/CollisionShapes/*.cpp \
+BulletCollision/NarrowPhaseCollision/*.cpp \
+BulletCollision/CollisionDispatch/*.cpp \
+BulletDynamics/ConstraintSolver/*.cpp \
+BulletDynamics/Vehicle/*.cpp \
+BulletDynamics/Dynamics/*.cpp)
+
+CPPFLAGS += -D_LIB -I. -IBulletCollision -IBulletDynamics -ILinearMath
+
+all debug:: objdirs
+
+include nan_compile.mk
+
+.PHONY: objdirs clean
+objdirs:
+       @for i in $(BULLETDIRS); do \
+       [ -d $(DIR)/$(DEBUG_DIR)$$i ] || mkdir -p $(DIR)/$(DEBUG_DIR)$$i; \
+       done
index 3a15d251df0d75b2ce4f2a6f08f31e885dd771d9..5fc3186dd8640a5212bd1f9f1af5a06a9dc81aaa 100644 (file)
@@ -145,8 +145,7 @@ 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
-    COMLIB += $(NAN_BULLET)/lib/libbulletdyn.a
-    COMLIB += $(NAN_BULLET)/lib/libbullet.a
+    COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
 endif
     COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
     COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
index 9af6ae12bda2a83cf02c7cf9ba8fa16e6fb4d277..4ba34952d40f1299b2b433033dd5803fc7a8541d 100644 (file)
@@ -44,7 +44,7 @@ CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
 CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
 CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO) -I$(NAN_MOTO)/include
 CPPFLAGS += -I$(NAN_SOLID)/include
-CPPFLAGS += -I$(NAN_BULLET)/include
+CPPFLAGS += -I$(NAN_BULLET2)/include
 
 CPPFLAGS += -I../../blender
 # these two needed because of blenkernel
index ee0b1e42f225457ebf7a6dcb667d5bf3405043d9..f7813c80a59c23188b60b0060ed47df7f8ad6463 100644 (file)
@@ -45,7 +45,7 @@ CPPFLAGS += -I$(NAN_STRING)/include
 CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include    
 CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_SUMO) -I$(NAN_MOTO)/include
 CPPFLAGS += -I$(NAN_SOLID)/include
-CPPFLAGS += -I$(NAN_BULLET)/include
+CPPFLAGS += -I$(NAN_BULLET2)/include
 CPPFLAGS += -I../Rasterizer/RAS_OpenGLRasterizer
 CPPFLAGS += -I../Rasterizer -I../GameLogic -I../SceneGraph
 CPPFLAGS += -I../BlenderRoutines -I../Expressions
index 747e750242a9955d8deee26d5ae39602c29e0495..a5643b60c9430b63fbad6c305f23f26d93edf559 100644 (file)
@@ -38,7 +38,7 @@ include nan_compile.mk
 
 CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
 
-CPPFLAGS += -I$(NAN_BULLET)/include
+CPPFLAGS += -I$(NAN_BULLET2)/include
 CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
 CPPFLAGS += -I../../Physics/common
 CPPFLAGS += -I../../Physics/Dummy
index ac2bf7b6b762f6bb22fec6ba92c26bd604885450..f2e02fc4c16dff5d999c33c758a5db2e4b7e5ec7 100644 (file)
@@ -34,9 +34,6 @@
 
 sinclude ../user-def.mk
 
-#game engine temporarily disabled: need to upgrade to Bullet 2.x
-export NAN_NO_KETSJI=true
 ifndef CONFIG_GUESS
   ifeq (debug, $(findstring debug, $(MAKECMDGOALS)))
     ifeq (all, $(findstring all, $(MAKECMDGOALS)))
@@ -70,7 +67,7 @@ else
     export NAN_SOLID ?= $(LCGDIR)/solid
     export NAN_QHULL ?= $(LCGDIR)/qhull
 endif
-    export NAN_BULLET ?= $(LCGDIR)/bullet
+    export NAN_BULLET2 ?= $(LCGDIR)/bullet2
     export NAN_SUMO ?= $(SRCHOME)/gameengine/Physics/Sumo
     export NAN_FUZZICS ?= $(SRCHOME)/gameengine/Physics/Sumo/Fuzzics
     export NAN_BLENKEY ?= $(LCGDIR)/blenkey
@@ -229,7 +226,7 @@ endif
     ifeq ($(CPU), i386)
            export NAN_NO_OPENAL=true
     endif
-       
+
     # Uncomment the following line to use Mozilla inplace of netscape
     # CPPFLAGS +=-DMOZ_NOT_NET
     # Location of MOZILLA/Netscape header files...