Compiling PAL with Bullet Physics 2.75 (Mac OS X)

1. Install Bullet (Download link):
You need to do a little bit of hackery on Mac OS X in order to get Bullet to build properly. (I'm running Snow Leopard 10.6). I have installed Bullet into /lib/bullet-2.75/
First, you need to get the CMakeLists.txt file here:
nano bullet-2.75/src/CMakeLists.txt
I originally got an error "ld: library not found for -lBulletMultiThreaded".
The solution (I found here) is to comment out the following lines using a pound symbol # like so:
#if (CMAKE_SIZEOF_VOID_P MATCHES "8")
#SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
#else (CMAKE_SIZEOF_VOID_P MATCHES "8")
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
#endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
Download and Install CMake.
You can now run CMake on the /lib/bullet-2.75 directory. CMake, configure, generate. CMake will generate an Xcode Project for you to run:
/lib/bullet-2.75/BULLET_PHYSICS.xcodeproj
Build the release and debug libraries and demos using AppAllBulletDemos, Debug/Release, i386, ALL_BUILD
Xcode builds the libraries here:
/lib/bullet-2.75/src
The Bullet Demo applications get built to here:
/lib/bullet-2.75/Demos
So you should have something like:
/lib/bullet-2.75/src/BulletCollision/Debug/libBulletCollision.a
/lib/bullet-2.75/Demos/AllBulletDemos/Debug/AppAllBulletDemos // <--Run this in the terminal
Now that Bullet is compiled, we can install and run PAL.
2. ODE (Open Dynamics Engine):
It no longer runs on Snow Leopard due to the DrawStuff API being removed in Snow Leopard.
UPDATE: I figure out how to compile ODE on OS X 10.6.
3. Install PAL:
When you run CMake on the PAL directory, you will find that it won't detect most of the Bullet library paths by itself. This requires some manual entries by yourself in order to get this to work. I will list my paths below, but note that I installed Bullet in a couple of places so these paths may not be right for you. Use this as a guideline only.
BULLET_LIBRARY_BulletDynamics_Debug
/lib/bullet-2.75/src/BulletDynamics/Debug/libBulletDynamics.a
One thing to note is that you will see BULLET_LIBRARY_BulletMath-NOTFOUND and BULLET_LIBRARY_BulletMath_DEBUG-NOTFOUND. I'm not sure why this happens but it didn't cause a problem for me, you can just ignore this.
Once you have setup all your paths, you can press Configure > Choose Xcode > then press Generate.
This will Generate the Xcode project file for you in /lib/PAL/PAL.xcodeproj

If you run the Xcode project, you can then build the libraries for PALBeginner binary I belive is Windows only as I get an error when I run it. Also, when you build you will need to change the build architecture to i386 as it doesn't seem that 64Bit is supported yet.
