[ODE] good old Makefile

Olivier Michel Olivier.Michel at cyberbotics.com
Mon Apr 3 05:37:18 MST 2006


Hi,

I fixed the good old Makefile / config/user-settings.example which was 
broken so that it works now with the current trunk (added files, removed 
collision_std.cpp). Also, I added support for USE_MALLOC_FOR_ALLOCA and 
CYLINDER_ENABLED.

Can anyone commit these patches (or allow me to commit them, my sf user 
name is omichel)?

-Olivier

svn diff Makefile
Index: Makefile
===================================================================
--- Makefile    (revision 891)
+++ Makefile    (working copy)
@@ -66,9 +66,13 @@
        ode/src/mat.cpp \
        ode/src/testing.cpp \
        ode/src/export-dif.cpp \
+       ode/src/sphere.cpp \
+       ode/src/box.cpp \
+       ode/src/capsule.cpp \
+       ode/src/ray.cpp \
+       ode/src/plane.cpp \
        ode/src/collision_kernel.cpp \
        ode/src/collision_util.cpp \
-       ode/src/collision_std.cpp \
        ode/src/collision_space.cpp \
        ode/src/collision_transform.cpp \
        ode/src/collision_quadtreespace.cpp
@@ -81,8 +85,18 @@
        ode/src/collision_trimesh_ray.cpp \
        ode/src/collision_trimesh_ccylinder.cpp \
        ode/src/collision_trimesh_distance.cpp
+ifdef CYLINDER_ENABLED
+ODE_SRC +=ode/src/collision_cylinder_trimesh.cpp
 endif
+endif

+ifdef CYLINDER_ENABLED
+ODE_SRC += ode/src/cylinder.cpp \
+       ode/src/collision_cylinder_box.cpp \
+       ode/src/collision_cylinder_plane.cpp \
+       ode/src/collision_cylinder_sphere.cpp
+endif
+
 ODE_PREGEN_SRC = \
        ode/src/fastldlt.c \
        ode/src/fastlsolve.c \
@@ -191,7 +205,7 @@
 ##############################################################################
 # derived things

-DEFINES=
+DEFINES=$(C_DEF)ODE_API=""

 # support TriMesh/OPCODE on the compiler command line
 ifdef OPCODE_DIRECTORY
@@ -199,6 +213,16 @@
 INC_OPCODE=$(C_INC)$(OPCODE_DIRECTORY)
 endif

+# support for Cylinders
+ifdef CYLINDER_ENABLED
+DEFINES+=$(C_DEF)dCYLINDER_ENABLED
+endif
+
+# use malloc for alloca
+ifdef USE_MALLOC_FOR_ALLOCA
+DEFINES+=$(C_DEF)dUSE_MALLOC_FOR_ALLOCA
+endif
+
 # add some defines depending on the build mode
 ifeq ($(BUILD),release)
 DEFINES+=$(C_DEF)dNODEBUG

svn diff config/user-settings.example
Index: config/user-settings.example
===================================================================
--- config/user-settings.example        (revision 891)
+++ config/user-settings.example        (working copy)
@@ -42,3 +42,14 @@
 #     under unix/gcc too. Your mileage may vary.

 #OPCODE_DIRECTORY=OPCODE
+
+# (6) if you want to use the Cylinder geometry class, define this flag.
+
+#CYLINDER_ENABLED=1
+
+# (7) if you want to use the error-checking memory allocation system.
+#     Because this system uses heap (malloc) instead of stack (alloca), 
it is
+#     slower. However, it allows you to simulate larger scenes, as well as
+#     handle out-of-memory errors in a somewhat graceful manner.
+
+#USE_MALLOC_FOR_ALLOCA=1




More information about the ODE mailing list