1 |
Compiling liblscp for Mac OS X with XCode |
2 |
======================================== |
3 |
|
4 |
Requirements |
5 |
------------ |
6 |
|
7 |
The XCode project uses autotools build files. On Mac OS 10.4, you need |
8 |
to install pkg-config (available at http://pkgconfig.freedesktop.org/wiki/). |
9 |
|
10 |
If you are to build the CVS snapshot, then you need to do the following |
11 |
steps to make autotools work correctly: |
12 |
|
13 |
$ sudo ln -sf /usr/bin/glibtoolize /usr/local/bin/libtoolize |
14 |
$ sudo cat >/usr/local/bin/aclocal <<'EOF' |
15 |
#!/bin/sh |
16 |
/usr/bin/aclocal -I /usr/local/share/aclocal $@ |
17 |
EOF |
18 |
$ sudo chmod +x /usr/local/bin/aclocal |
19 |
|
20 |
Layout of the Directories |
21 |
------------------------- |
22 |
|
23 |
The XCode project for liblscp creates a temporary build directory as |
24 |
"$LIBGIG/../temp_build/$BUILD_STYLE" (where $LIBGIG is the libgig |
25 |
directory, and $BUILD_STYLE is the build style defined in the XCode |
26 |
project). In this directory, the following subdirectories are created |
27 |
and used: |
28 |
$BASE.build: |
29 |
Intermediate build directory. Symbolic links to the original |
30 |
source files are placed and "configure && make" is performed in |
31 |
this directory. ($BASE is the basename of the liblscp directory.) |
32 |
local: |
33 |
The product, liblscp.a, is "installed" in local/lib. |
34 |
Such a layout allows you to build binaries of different architectures |
35 |
(and build options) independently. On the other hand, you will need to |
36 |
link liblscp.a statically because you cannot expect other users to place |
37 |
liblscp.a at the same path. The XCode project takes care of this by |
38 |
giving "--disable-shared" to configure. |
39 |
|
40 |
Also note that this temporary directory is outside the liblscp directory |
41 |
and will be shared with the Xcode projects for other linuxsampler |
42 |
subproducts. So it is best to create a common directory for all |
43 |
linuxsampler subproducts and place the liblscp directory (and the |
44 |
directories of other linuxsampler subproducts) in it. |
45 |
|
46 |
Universal Binaries |
47 |
------------------ |
48 |
|
49 |
You can create the Universal Binaries by selecting "Deployment_UB" build |
50 |
style and build. The binaries for i386 and ppc architectures are built |
51 |
separately and then automatically combined. The products are found in |
52 |
$LIBLSCP/../temp_build/Deployment_UB/local/{bin,lib}. |
53 |
|
54 |
You can also create the binaries for i386 and ppc architectures |
55 |
separately by selecting "Deployment_i386" and "Deployment_ppc" built |
56 |
styles respectively. This may be more convenient when you make your |
57 |
binary exclusively for your own use. |
58 |
|
59 |
Note that the current XCode project does _not_ take care of liblscp.la |
60 |
and pkgconfig/lscp.pc when creating the Universal Binary. |
61 |
|
62 |
Additional Information |
63 |
---------------------- |
64 |
|
65 |
The XCode project just invokes autoconf_builder.sh after |
66 |
setting relevant environmental variables. If you are interested |
67 |
(or feel suspicious), please examine autoconf_builder.sh. |
68 |
|
69 |
|
70 |
History |
71 |
------- |
72 |
|
73 |
6 May 2007: First written (for libgig) by Toshi Nagata |
74 |
9 May 2007: Updated to account for the Deployment_UB target |
75 |
30 Dec 2007: Updated for liblscp project |