Compiling for older versions of Mac OS X
Redownload the entire Xcode Tools packages from http://developer.apple.com/mac/. Then, run the installer, and when you get to the screen that says "Standard Install", instead of pressing Continue, press Customize in the bottom left-hand corner. You should have the option to install MacOSX10.5.sdk as well as MacOSX10.4u.sdk.
This can be configured in the project or target settings (right-click -> Get Info):
Build -> Base SDK.