Compile ODE 0.11.0 on Mac OS X 10.6
The Official ODE instructions for compiling on Mac OS (even Linux) are pretty useless. Their wiki and instruction files included with the source code contains 'generic' instrcutions that list at what worked years ago. It frustrates me that their entire project becauses useless on one platform because it takes an inner knowledge of ODE's development process in order to get the damn thing to build.
Macports doesn't install ODE correctly either. Macports installs a PPC binary on your system (even if you have an Intel Mac). So here is the correct way to compile ODE on a Mac.
Download the ODE Source Code from Sourceforge.
Extract the source to a directory of your choosing (I use: /lib/ode-0.11.1)
Open a Terminal:
cd build
premake4 gmake --platform=universal32
cd gmake
make
At this point you need to add in some flags to the makefile in order to get this to build on Intel correctly. So open ode.make and change the following 2 lines:
cd ode-0.11.1/build/gmake
vim ode.make
You need to add -m32 to the CXXFLAGS, which you can do by adding it to the CPPFLAGS (which uses CXXFLAGS. Find the line starting with CPPFLAGS and change it to this:
CPPFLAGS += -MMD -m32 $(DEFINES) $(INCLUDES)
You also need to add -m32 to LDFLAGS:
LDFLAGS += -m32 -dynamiclib -flat_namespace -framework Carbon
Save and quit.
Build Release Libraries:
make config=releasesingledll
Build Debug Libraries:
make config=debugsingledll
This will build the libraries to here:
ode-0.11.1/lib/ReleaseSingleDLL/libode_single.dylib
ode-0.11.1/lib/DebugSingleDLL/libode_singled.dylib
So there you go. Enjoy using ODE!