1 | In order to build the library, read the `BUILD' document in the `docs' |
---|
2 | directory. This is only a quick starter. |
---|
3 | |
---|
4 | |
---|
5 | I. Unix systems |
---|
6 | --------------- |
---|
7 | |
---|
8 | If you have GNU Make installed, simply type |
---|
9 | |
---|
10 | ./configure |
---|
11 | make |
---|
12 | make install |
---|
13 | |
---|
14 | on the command line to configure, build and install FreeType on your |
---|
15 | system. Note that the default installation path is "/usr/local". |
---|
16 | |
---|
17 | Please read the file README.UNX, it contains _critical_ information |
---|
18 | regarding the installation of FreeType on many Unix systems. |
---|
19 | |
---|
20 | |
---|
21 | II. From the command line |
---|
22 | ------------------------- |
---|
23 | |
---|
24 | If you are not using Unix, there are two ways to quickly build |
---|
25 | FreeType 2 from the command line. |
---|
26 | |
---|
27 | The first, and favorite one, is to use the "Jam" build tool. Jam is |
---|
28 | a highly portable replacement for Make whose control files do not |
---|
29 | depend on the current platform or compiler toolset. |
---|
30 | |
---|
31 | For more information, please see: |
---|
32 | |
---|
33 | http://www.freetype.org/jam/index.html |
---|
34 | |
---|
35 | The second one is to use "GNU Make" (and NO OTHER MAKE TOOL). |
---|
36 | |
---|
37 | |
---|
38 | 1. Building FT2 with "Jam" |
---|
39 | -------------------------- |
---|
40 | |
---|
41 | Once you've got *our version* of the Jam tool installed on your |
---|
42 | system, simply go to the top-level FT2 directory, then type |
---|
43 | |
---|
44 | "jam" |
---|
45 | |
---|
46 | on the command line. This will build the library and place it in |
---|
47 | the "objs" directory. |
---|
48 | |
---|
49 | By default, a static library is built. On Unix systems, it is |
---|
50 | possible to build a shared library through the "libtool" script. |
---|
51 | You need to have libtool installed on your system, then re-define |
---|
52 | a few environment variables before invoking Jam, as in |
---|
53 | |
---|
54 | export CC="libtool --mode=compile cc" |
---|
55 | export LINK="libtool --mode=link cc" |
---|
56 | jam |
---|
57 | |
---|
58 | In later releases of FT2, building shared libraries with Jam |
---|
59 | should become automatic on Unix systems. |
---|
60 | |
---|
61 | |
---|
62 | 2. Building FT2 with "GNU Make" |
---|
63 | ------------------------------- |
---|
64 | |
---|
65 | You need to have GNU Make (version 3.78.1 or newer) installed on |
---|
66 | your system to compile the library from the command line. This will |
---|
67 | _NOT_ work with other make tools (including BSD make)! |
---|
68 | |
---|
69 | [Well, this is not really correct. Recently, a perl implementation |
---|
70 | of make called `makepp' has appeared which can also build FreeType 2 |
---|
71 | successfully on Unix platforms. See http://makepp.sourceforge.net |
---|
72 | for more details.] |
---|
73 | |
---|
74 | - Go to the `freetype2' directory. |
---|
75 | |
---|
76 | - Unix (any C compiler should work): |
---|
77 | |
---|
78 | - make setup (don't worry, this will invoke a configure script) |
---|
79 | - make |
---|
80 | - make install |
---|
81 | |
---|
82 | Alternatively, you can pass parameters to the configure script |
---|
83 | within the CFG variable, as in: |
---|
84 | |
---|
85 | - make setup CFG="--prefix=/usr" |
---|
86 | - make |
---|
87 | - make install |
---|
88 | |
---|
89 | If the configure script isn't run, try to add `unix' as a target |
---|
90 | on the command line, e.g.: |
---|
91 | |
---|
92 | - make setup unix CFG="--prefix=/opt/experimental" |
---|
93 | |
---|
94 | |
---|
95 | - Windows: |
---|
96 | |
---|
97 | We provide a version of GNU Make for Win32 on the FreeType site. |
---|
98 | See http://www.freetype.org/download.html for details. |
---|
99 | |
---|
100 | - gcc (Mingw, _not_ CygWin): |
---|
101 | |
---|
102 | - make setup |
---|
103 | - make |
---|
104 | |
---|
105 | |
---|
106 | - Visual C++: |
---|
107 | |
---|
108 | - make setup visualc |
---|
109 | - make |
---|
110 | |
---|
111 | |
---|
112 | - other compilers: |
---|
113 | |
---|
114 | - make setup bcc32 -> Borland C++ 32 bits |
---|
115 | - make setup intelc -> Intel C++ |
---|
116 | - make setup watcom -> Watcom C++ |
---|
117 | - make setup lcc -> Win32-LCC |
---|
118 | |
---|
119 | |
---|
120 | If you want to build FreeType 2 in another directory, you must set |
---|
121 | two environment variables, `OJB_DIR' and `TOP_DIR'. The former |
---|
122 | gives the directory where the object files and the library should be |
---|
123 | created (this directory must exist), the latter the top directory of |
---|
124 | the FreeType 2 source tree. Example: |
---|
125 | |
---|
126 | OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \ |
---|
127 | make -f$TOP_DIR/Makefile setup ansi |
---|
128 | OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \ |
---|
129 | make -f$TOP_DIR/Makefile |
---|
130 | |
---|
131 | On Unix boxes, calling `configure' from the build directory is |
---|
132 | sufficient; it will build a small Makefile which calls the |
---|
133 | FreeType 2 Makefile with the necessary parameters. |
---|
134 | |
---|
135 | |
---|
136 | III. In your own environment (IDE) |
---|
137 | ---------------------------------- |
---|
138 | |
---|
139 | You need to add the directories "freetype2/include" to your include |
---|
140 | path when compiling the library. |
---|
141 | |
---|
142 | FreeType 2 is made of several components; each one of them is |
---|
143 | located in a subdirectory of "freetype2/src". For example, |
---|
144 | `freetype2/src/truetype/' contains the TrueType font driver. |
---|
145 | |
---|
146 | DO NOT COMPILE ALL C FILES! Rather, compile the following ones: |
---|
147 | |
---|
148 | -- base components (required) |
---|
149 | |
---|
150 | src/base/ftsystem.c |
---|
151 | src/base/ftinit.c |
---|
152 | src/base/ftdebug.c |
---|
153 | src/base/ftbase.c |
---|
154 | src/base/ftglyph.c |
---|
155 | src/base/ftbbox.c |
---|
156 | src/base/ftmm.c |
---|
157 | |
---|
158 | src/base/ftmac.c -- only on the Macintosh |
---|
159 | |
---|
160 | -- other components are optional |
---|
161 | |
---|
162 | src/autohint/autohint.c -- auto hinting module |
---|
163 | src/cache/ftcache.c -- cache sub-system (in beta) |
---|
164 | src/sfnt/sfnt.c -- SFNT files support |
---|
165 | (TrueType & OpenType) |
---|
166 | src/cff/cff.c -- CFF/OpenType font driver |
---|
167 | src/psnames/psnames.c -- Postscript glyph names support |
---|
168 | src/psaux/psaux.c -- Postscript Type 1 parsing |
---|
169 | src/truetype/truetype.c -- TrueType font driver |
---|
170 | src/type1/type1.c -- Type 1 font driver |
---|
171 | src/cid/type1cid.c -- Type 1 CID-keyed font driver |
---|
172 | src/winfonts/winfonts.c -- Windows FONT / FNT font driver |
---|
173 | |
---|
174 | Note: |
---|
175 | |
---|
176 | `truetype.c' needs `sfnt.c' and `psnames.c' |
---|
177 | `type1.c' needs `psaux.c' and `psnames.c' |
---|
178 | `type1cid.c' needs `psaux.c' and `psnames.c' |
---|
179 | `cff.c' needs `sfnt.c', `psaux.c', and `psnames.c' |
---|
180 | |
---|
181 | etc. |
---|
182 | |
---|
183 | For more information, please consult "docs/BUILD". |
---|
184 | |
---|
185 | --- end of INSTALL -- |
---|