1 This document contains instructions on how to build the FreeType library
2 on Unix systems. This also works for emulations like Cygwin or MSys on
6 I. Ensure that you are using GNU Make
7 -------------------------------------
9 The FreeType build system _exclusively_ works with GNU Make. You
10 will not be able to compile the library with the instructions
11 below using any other alternative (including BSD Make).
13 Trying to compile the library with a different Make tool will
16 Sorry, GNU make is required to build FreeType2.
18 and the build process will be aborted. If this happens, install
19 GNU Make on your system, and use the GNUMAKE environment variable
24 IV. Build and install the library
25 ---------------------------------
27 The following should work on all Unix systems where the 'make'
28 command invokes GNU Make:
30 ./configure --prefix=<yourprefix>
32 make install (as root)
34 where "<yourprefix>" must be replaced by the prefix returned by
35 the "freetype-config" command.
37 When using a different command to invoke GNU Make, use the GNUMAKE
38 variable. For example, if `gmake' is the command to use on your
39 system, do something like:
41 GNUMAKE=gmake ./configure --prefix=<yourprefix>
43 gmake install (as root)
45 If this still doesn't work, something's rotten on your system(
46 (e.g. you're using a very old version of GNU Make)
53 If you have GNU Make installed, simply type
59 on the command line to configure, build and install FreeType on your
60 system. Note that the default installation path is "/usr/local".
62 Please read the file README.UNX, it contains _critical_ information
63 regarding the installation of FreeType on many Unix systems.
66 II. From the command line
67 -------------------------
69 If you are not using Unix, there are two ways to quickly build
70 FreeType 2 from the command line.
72 The first, and favorite one, is to use the "Jam" build tool. Jam is
73 a highly portable replacement for Make whose control files do not
74 depend on the current platform or compiler toolset.
76 For more information, please see:
78 http://www.freetype.org/jam/index.html
80 The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
83 1. Building FT2 with "Jam"
84 --------------------------
86 Once you've got *our version* of the Jam tool installed on your
87 system, simply go to the top-level FT2 directory, then type
91 on the command line. This will build the library and place it in
94 By default, a static library is built. On Unix systems, it is
95 possible to build a shared library through the "libtool" script.
96 You need to have libtool installed on your system, then re-define
97 a few environment variables before invoking Jam, as in
99 export CC="libtool --mode=compile cc"
100 export LINK="libtool --mode=link cc"
103 In later releases of FT2, building shared libraries with Jam
104 should become automatic on Unix systems.
107 2. Building FT2 with "GNU Make"
108 -------------------------------
110 You need to have GNU Make (version 3.78.1 or newer) installed on
111 your system to compile the library from the command line. This will
112 _NOT_ work with other make tools (including BSD make)!
114 [Well, this is not really correct. Recently, a perl implementation
115 of make called `makepp' has appeared which can also build FreeType 2
116 successfully on Unix platforms. See http://makepp.sourceforge.net
119 - Go to the `freetype2' directory.
121 - Unix (any C compiler should work):
123 - make setup (don't worry, this will invoke a configure script)
127 Alternatively, you can pass parameters to the configure script
128 within the CFG variable, as in:
130 - make setup CFG="--prefix=/usr"
134 If the configure script isn't run, try to add `unix' as a target
135 on the command line, e.g.:
137 - make setup unix CFG="--prefix=/opt/experimental"
142 We provide a version of GNU Make for Win32 on the FreeType site.
143 See http://www.freetype.org/download.html for details.
145 - gcc (Mingw, _not_ CygWin):
159 - make setup bcc32 -> Borland C++ 32 bits
160 - make setup intelc -> Intel C++
161 - make setup watcom -> Watcom C++
162 - make setup lcc -> Win32-LCC
165 If you want to build FreeType 2 in another directory, you must set
166 two environment variables, `OJB_DIR' and `TOP_DIR'. The former
167 gives the directory where the object files and the library should be
168 created (this directory must exist), the latter the top directory of
169 the FreeType 2 source tree. Example:
171 OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
172 make -f$TOP_DIR/Makefile setup ansi
173 OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
174 make -f$TOP_DIR/Makefile
176 On Unix boxes, calling `configure' from the build directory is
177 sufficient; it will build a small Makefile which calls the
178 FreeType 2 Makefile with the necessary parameters.
181 --- end of INSTALL --