Compiling liblscp for Mac OS X with XCode ======================================== Requirements ------------ The XCode project uses autotools build files. On Mac OS 10.4, you need to install pkg-config (available at http://pkgconfig.freedesktop.org/wiki/). If you are to build the CVS snapshot, then you need to do the following steps to make autotools work correctly: $ sudo ln -sf /usr/bin/glibtoolize /usr/local/bin/libtoolize $ sudo cat >/usr/local/bin/aclocal <<'EOF' #!/bin/sh /usr/bin/aclocal -I /usr/local/share/aclocal $@ EOF $ sudo chmod +x /usr/local/bin/aclocal Layout of the Directories ------------------------- The XCode project for liblscp creates a temporary build directory as "$LIBGIG/../temp_build/$BUILD_STYLE" (where $LIBGIG is the libgig directory, and $BUILD_STYLE is the build style defined in the XCode project). In this directory, the following subdirectories are created and used: $BASE.build: Intermediate build directory. Symbolic links to the original source files are placed and "configure && make" is performed in this directory. ($BASE is the basename of the liblscp directory.) local: The product, liblscp.a, is "installed" in local/lib. Such a layout allows you to build binaries of different architectures (and build options) independently. On the other hand, you will need to link liblscp.a statically because you cannot expect other users to place liblscp.a at the same path. The XCode project takes care of this by giving "--disable-shared" to configure. Also note that this temporary directory is outside the liblscp directory and will be shared with the Xcode projects for other linuxsampler subproducts. So it is best to create a common directory for all linuxsampler subproducts and place the liblscp directory (and the directories of other linuxsampler subproducts) in it. Universal Binaries ------------------ You can create the Universal Binaries by selecting "Deployment_UB" build style and build. The binaries for i386 and ppc architectures are built separately and then automatically combined. The products are found in $LIBLSCP/../temp_build/Deployment_UB/local/{bin,lib}. You can also create the binaries for i386 and ppc architectures separately by selecting "Deployment_i386" and "Deployment_ppc" built styles respectively. This may be more convenient when you make your binary exclusively for your own use. Note that the current XCode project does _not_ take care of liblscp.la and pkgconfig/lscp.pc when creating the Universal Binary. Additional Information ---------------------- The XCode project just invokes autoconf_builder.sh after setting relevant environmental variables. If you are interested (or feel suspicious), please examine autoconf_builder.sh. History ------- 6 May 2007: First written (for libgig) by Toshi Nagata 9 May 2007: Updated to account for the Deployment_UB target 30 Dec 2007: Updated for liblscp project