48 |
Universal Binaries |
Universal Binaries |
49 |
------------------ |
------------------ |
50 |
|
|
51 |
Universal Binaries are not automatically created by the XCode project. |
You can create the Universal Binaries by selecting "Deployment_UB" build |
52 |
However, it is easy to create them by hands as follows: |
style and build. The binaries for i386 and ppc architectures are built |
53 |
|
separately and then automatically combined. The products are found in |
54 |
|
$LIBGIG/../temp_build/Deployment_UB/local/{bin,lib}. |
55 |
|
|
56 |
$ cd $LIBGIG # Move to the libgig directory |
You can also create the binaries for i386 and ppc architectures |
57 |
$ mkdir -p ../temp_build/UB/bin ../temp_build/UB/lib |
separately by selecting "Deployment_i386" and "Deployment_ppc" built |
58 |
$ cd ../temp_build/Deployment_ppc |
styles respectively. This may be more convenient when you make your |
59 |
$ for i in bin/* lib/*.a; do |
binary exclusively for your own use, and/or the required libraries |
60 |
lipo -create $i ../Deployment_i386/$i -output ../UB/$i |
(e.g. libsndfile, see below) are available only for a single |
61 |
done |
architecture. |
62 |
|
|
63 |
|
Note that the current XCode project does _not_ take care of libgig.la |
64 |
|
and pkgconfig/gig.pc when creating the Universal Binary. |
65 |
|
|
66 |
The libgig project is dependent on libsndfile, but you may not |
The libgig project is dependent on libsndfile, but you may not |
67 |
have a Universal Binary version of libsndfile. Don't worry, you |
have a Universal Binary version of libsndfile. Don't worry, you |
68 |
can still create UB of libgig products. Follow these steps: |
can still create UB of libgig products. Follow these steps: |
85 |
After these steps, the i386 and ppc versions of libsndfile.a are |
After these steps, the i386 and ppc versions of libsndfile.a are |
86 |
created in $LIBGIG/../temp_build/Deployment_$ARCH/local/lib |
created in $LIBGIG/../temp_build/Deployment_$ARCH/local/lib |
87 |
($ARCH is either i386 or ppc). Now you can double-click on |
($ARCH is either i386 or ppc). Now you can double-click on |
88 |
libgig.xcodeproj and build libgig with Deployment_i386 and |
libgig.xcodeproj and build libgig with Deployment_UB build style. |
89 |
Deployment_ppc build styles. pkg-config will find the correct |
When XCode is building libgig for each architecture, pkg-config |
90 |
version of libsndfile.a in $LIBGIG/../temp_build/$BUILD_STYLES/ |
will find the correct version of libsndfile.a in $LIBGIG/../ |
91 |
local/lib. |
temp_build/Deployment_{ppc,i386}/local/lib. |
92 |
|
|
93 |
|
(You can also easily create a Universal Binary of libsndfile.a, |
94 |
|
but then you need to take care manually of the contents of |
95 |
|
libsndfile.la and pkgconfig/sndfile.pc.) |
96 |
|
|
97 |
Additional Information |
Additional Information |
98 |
---------------------- |
---------------------- |
99 |
|
|
100 |
The XCode project just invokes autoconf_builder.sh with after |
The XCode project just invokes autoconf_builder.sh after |
101 |
setting relevant environmental variables. If you are interested |
setting relevant environmental variables. If you are interested |
102 |
(or feel suspicious), please examine autoconf_builder.sh. |
(or feel suspicious), please examine autoconf_builder.sh. |
103 |
|
|
104 |
|
|
105 |
6 May 2007 |
6 May 2007: First written by Toshi Nagata |
106 |
Written by Toshi Nagata |
9 May 2007: Updated to account for the Deployment_UB target |
107 |
|
|