Werner Lemberg | 098ab26 | 2000-11-02 07:53:08 +0000 | [diff] [blame] | 1 | In order to build the library, read the `BUILD' document in the `docs' |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 2 | directory. This is only a quick starter. |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 3 | |
Werner Lemberg | e4b32a5 | 2000-10-31 20:42:18 +0000 | [diff] [blame] | 4 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 5 | I. From the command line |
| 6 | ------------------------ |
| 7 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 8 | There are two ways to quickly build FreeType 2 from the command |
| 9 | line. |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 10 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 11 | The first, and favorite one, is to use the "Jam" build tool. Jam is |
| 12 | a highly portable replacement for Make whose control files do not |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 13 | depend on the current platform or compiler toolset. |
| 14 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 15 | For more information, please see: |
| 16 | |
| 17 | http://www.freetype.org/jam/index.html |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 18 | |
| 19 | The second one is to use "GNU Make" (and NO OTHER MAKE TOOL). |
| 20 | |
| 21 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 22 | 1. Building FT2 with "Jam" |
| 23 | -------------------------- |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 24 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 25 | Once you've got *our version* of the Jam tool installed on your |
| 26 | system, simply go to the top-level FT2 directory, then type |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 27 | |
| 28 | "jam" |
| 29 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 30 | on the command line. This will build the library and place it in |
| 31 | the "objs" directory. |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 32 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 33 | By default, a static library is built. On Unix systems, it is |
| 34 | possible to build a shared library through the "libtool" script. |
| 35 | You need to have libtool installed on your system, then re-define |
| 36 | a few environment variables before invoking Jam, as in |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 37 | |
| 38 | export CC="libtool --mode=compile" |
| 39 | export LINK="libtool --mode=link" |
| 40 | jam |
| 41 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 42 | In later releases of FT2, building shared libraries with Jam |
| 43 | should become automatic. |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 44 | |
| 45 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 46 | 2. Building FT2 with "GNU Make" |
| 47 | ------------------------------- |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 48 | |
Werner Lemberg | 9a8b536 | 2001-03-12 22:33:52 +0000 | [diff] [blame] | 49 | You need to have GNU Make (version 3.78.1 or newer) installed on |
| 50 | your system to compile the library from the command line. This will |
David Turner | 6ce03ef | 2001-03-20 14:50:04 +0000 | [diff] [blame] | 51 | _NOT_ work with other make tools (including BSD make)! |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 52 | |
| 53 | [Well, this is not really correct. Recently, a perl implementation |
| 54 | of make called `makepp' has appeared which can also build FreeType 2 |
| 55 | successfully on Unix platforms. See http://LNC.usc.edu/~holt/makepp |
| 56 | for more details.] |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 57 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 58 | - Go to the `freetype2' directory. |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 59 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 60 | - Unix (any C compiler should work): |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 61 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 62 | - make setup (don't worry, this will invoke a configure script) |
| 63 | - make |
| 64 | - make install |
David Turner | 5ef3c95 | 2000-08-22 23:15:23 +0000 | [diff] [blame] | 65 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 66 | Alternatively, you can pass parameters to the configure script |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 67 | within the CFG variable, as in: |
David Turner | 896b604 | 2000-10-03 17:51:29 +0000 | [diff] [blame] | 68 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 69 | - make setup CFG="--prefix=/usr" |
| 70 | - make |
| 71 | - make install |
David Turner | 5f5b446 | 2000-07-26 19:13:51 +0000 | [diff] [blame] | 72 | |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 73 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 74 | - Windows: |
David Turner | 5f5b446 | 2000-07-26 19:13:51 +0000 | [diff] [blame] | 75 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 76 | We provide a version of GNU Make for Win32 on the FreeType site. |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 77 | See http://www.freetype.org/download.html for details. |
Werner Lemberg | e4b32a5 | 2000-10-31 20:42:18 +0000 | [diff] [blame] | 78 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 79 | - gcc (Mingw, _not_ CygWin): |
David Turner | 859a18a | 2000-12-14 18:50:40 +0000 | [diff] [blame] | 80 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 81 | - make setup |
| 82 | - make |
David Turner | 5f5b446 | 2000-07-26 19:13:51 +0000 | [diff] [blame] | 83 | |
David Turner | 5f5b446 | 2000-07-26 19:13:51 +0000 | [diff] [blame] | 84 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 85 | - Visual C++: |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 86 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 87 | - make setup visualc |
| 88 | - make |
David Turner | 859a18a | 2000-12-14 18:50:40 +0000 | [diff] [blame] | 89 | |
| 90 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 91 | - other compilers: |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 92 | |
David Turner | 1c46854 | 2001-05-29 10:52:34 +0000 | [diff] [blame] | 93 | - make setup bcc32 -> Borland C++ 32 bits |
| 94 | - make setup intelc -> Intel C++ |
| 95 | - make setup watcom -> Watcom C++ |
| 96 | - make setup lcc -> Win32-LCC |
David Turner | 859a18a | 2000-12-14 18:50:40 +0000 | [diff] [blame] | 97 | |
Werner Lemberg | e4b32a5 | 2000-10-31 20:42:18 +0000 | [diff] [blame] | 98 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 99 | II. In your own environment (IDE) |
| 100 | --------------------------------- |
Werner Lemberg | e4b32a5 | 2000-10-31 20:42:18 +0000 | [diff] [blame] | 101 | |
Werner Lemberg | 521a2d7 | 2001-03-20 22:58:56 +0000 | [diff] [blame] | 102 | You need to add the directories "freetype2/include" to your include |
| 103 | path when compiling the library. |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 104 | |
Werner Lemberg | 521a2d7 | 2001-03-20 22:58:56 +0000 | [diff] [blame] | 105 | FreeType 2 is made of several components; each one of them is |
| 106 | located in a subdirectory of "freetype2/src". For example, |
| 107 | `freetype2/src/truetype/' contains the TrueType font driver. |
David Turner | 6ce03ef | 2001-03-20 14:50:04 +0000 | [diff] [blame] | 108 | |
Werner Lemberg | 521a2d7 | 2001-03-20 22:58:56 +0000 | [diff] [blame] | 109 | DO NOT COMPILE ALL C FILES! Rather, compile the following ones: |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 110 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 111 | -- base components (required) |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 112 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 113 | src/base/ftsystem.c |
| 114 | src/base/ftinit.c |
| 115 | src/base/ftdebug.c |
| 116 | src/base/ftbase.c |
| 117 | src/base/ftglyph.c |
| 118 | src/base/ftbbox.c |
| 119 | src/base/ftmm.c |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 120 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 121 | src/base/ftmac.c -- only on the Macintosh |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 122 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 123 | -- other components are optional |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 124 | |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 125 | src/autohint/autohint.c -- auto hinting module |
| 126 | src/cache/ftcache.c -- cache sub-system (in beta) |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 127 | src/sfnt/sfnt.c -- SFNT files support |
| 128 | (TrueType & OpenType) |
Werner Lemberg | 5a2fdc0 | 2000-12-14 22:57:17 +0000 | [diff] [blame] | 129 | src/cff/cff.c -- CFF/OpenType font driver |
| 130 | src/psnames/psnames.c -- Postscript glyph names support |
| 131 | src/psaux/psaux.c -- Postscript Type 1 parsing |
| 132 | src/truetype/truetype.c -- TrueType font driver |
| 133 | src/type1/type1.c -- Type 1 font driver |
| 134 | src/cid/type1cid.c -- Type 1 CID-keyed font driver |
| 135 | src/winfonts/winfonts.c -- Windows FONT / FNT font driver |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 136 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 137 | Note: |
David Turner | b1aabf4 | 2000-11-30 23:48:22 +0000 | [diff] [blame] | 138 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 139 | `truetype.c' needs `sfnt.c' and `psnames.c' |
| 140 | `type1.c' needs `psaux.c' and `psnames.c' |
| 141 | `type1cid.c' needs `psaux.c' and `psnames.c' |
| 142 | `cff.c' needs `sfnt.c', `psaux.c', and `psnames.c' |
Werner Lemberg | e4b32a5 | 2000-10-31 20:42:18 +0000 | [diff] [blame] | 143 | |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 144 | etc. |
| 145 | |
Werner Lemberg | a00ff98 | 2001-05-30 07:53:37 +0000 | [diff] [blame^] | 146 | For more information, please consult "docs/BUILD". |
Werner Lemberg | 4c80f0c | 2000-12-01 17:25:58 +0000 | [diff] [blame] | 147 | |
| 148 | --- end of INSTALL -- |