| 6 | |
---|
| 7 | == Download the Source == |
---|
| 8 | |
---|
| 9 | Download the latest freetype sourcecode from [http://sourceforge.net/projects/freetype/ sourceforge]. |
---|
| 10 | |
---|
| 11 | Open a terminal and extract the archive: |
---|
| 12 | {{{ |
---|
| 13 | $ tar -jxf libfreetype-2.4.2.tar.bz2 |
---|
| 14 | $ cd libfreetype-2.4.2 |
---|
| 15 | }}} |
---|
| 16 | |
---|
| 17 | == Compiling the library == |
---|
| 18 | |
---|
| 19 | We have to compile the library four times, once for each architecture. |
---|
| 20 | |
---|
| 21 | '''i386''' |
---|
| 22 | {{{ |
---|
| 23 | $ CC="g++ -arch -i386" ./configure;make |
---|
| 24 | }}} |
---|
| 25 | |
---|
| 26 | This forces configure to use the i386 architecture and build the library. The built library is located at objs/.libs/libfreetype.a. We copy this to our top level folder and build the next architecture. |
---|
| 27 | |
---|
| 28 | {{{ |
---|
| 29 | $ cp objs/.libs/libfreetype.a libfreetype-i386.a |
---|
| 30 | }}} |
---|
| 31 | |
---|
| 32 | Similar build setup for x86_64, notice the addition of ''make clean'', we want to completely remove the i386 code. |
---|
| 33 | |
---|
| 34 | '''x86_64''' |
---|
| 35 | {{{ |
---|
| 36 | $ CC="g++ -arch -i386" ./configure;make clean;make |
---|
| 37 | $ cp objs/.libs/libfreetype.a libfreetype-x86_64.a |
---|
| 38 | }}} |