Schism:Building on OS X
From SDWiki
NOTE: This page is outdated. Proceed at your own risk.
Building on Macintosh OS X is fairly straightforward, and if you install the Apple Developer's kit, the SDL Developers Library, then follow the Building on Linux instructions, you'll get a unix-style binary that you can run from Terminal.app
If you want an application bundle that you could drop into /Applications, just copy the schismtracker binary into sys/macosx/Schism Tracker.app/Contents/MacOS/ and you can move it around your system, double-click on .IT files, and have the Finder load Schism Tracker automatically.
However, if you want to build an application bundle for distribution; that you can copy onto someone else's machine, you'll need to do a little bit more work.
The first problem is that while different versions of OS X are mostly forward-compatible, they're not backwards-compatible at all. That means that if you use the Panther SDK, you will be limited to running your binary on Panther and Tiger only. The binary simply won't run under Jaguar at all.
The second problem is that Macintosh systems now use Intel, which means that you need the Universal SDK in order to build for them. It is only available for Tiger which means that you can't build a universal binary that will also run on Jaguar without some trickery.
Finally, the third problem is that SDL isn't normally distributed on Macintosh systems, so you'll need to distribute libSDL as well.
If instead of using the framework-distributed version of SDL, you installed Fink, you could install two copies, one into /sw/ and one into /sw-i386/.
The scripts/mac-cc.sh script is a wrapper for gcc that can solve the first two problems. It compiles every source file twice, writing the object files to ppc/ and to x86/. If you have Fink installed into /sw/ and an Intel-build of Fink installed into /sw-i386/, this scripts/mac-cc.sh script will translate /sw/ to /sw-i386/ for libraries. It'll also handle the final linking using the lipo tool.
The last part is solved with the install_name_tool which renames the library inside the schismtracker binary so that it can be relative to @executable_path/sdl.dylib which lets you copy the sdl.dylib file into the Contents/MacOS/ directory inside the application bundle.
The scripts/fink-macosx.sh script handles all of these details, and even builds a dmg-file for distribution, so to build a Mac binary for distribution, your best bet is to simply:
sh scripts/fink-macosx.sh
which will create a Schism Tracker.dmg file.
