blob: 467df10fe56420c69fec06106a4de7d029f97d72 [file] [log] [blame]
Werner Lemberg098ab262000-11-02 07:53:08 +00001In order to build the library, read the `BUILD' document in the `docs'
Werner Lemberg5a2fdc02000-12-14 22:57:17 +00002directory. This is only a quick starter.
David Turnerc3c7e7f2000-03-13 14:19:31 +00003
Werner Lemberge4b32a52000-10-31 20:42:18 +00004
Werner Lemberg5a2fdc02000-12-14 22:57:17 +00005I. From the command line
6------------------------
7
Werner Lemberga00ff982001-05-30 07:53:37 +00008 There are two ways to quickly build FreeType 2 from the command
9 line.
David Turner1c468542001-05-29 10:52:34 +000010
Werner Lemberga00ff982001-05-30 07:53:37 +000011 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 Turner1c468542001-05-29 10:52:34 +000013 depend on the current platform or compiler toolset.
14
Werner Lemberga00ff982001-05-30 07:53:37 +000015 For more information, please see:
16
17 http://www.freetype.org/jam/index.html
David Turner1c468542001-05-29 10:52:34 +000018
19 The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
20
21
Werner Lemberga00ff982001-05-30 07:53:37 +000022 1. Building FT2 with "Jam"
23 --------------------------
David Turner1c468542001-05-29 10:52:34 +000024
Werner Lemberga00ff982001-05-30 07:53:37 +000025 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 Turner1c468542001-05-29 10:52:34 +000027
28 "jam"
29
Werner Lemberga00ff982001-05-30 07:53:37 +000030 on the command line. This will build the library and place it in
31 the "objs" directory.
David Turner1c468542001-05-29 10:52:34 +000032
Werner Lemberga00ff982001-05-30 07:53:37 +000033 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 Turner1c468542001-05-29 10:52:34 +000037
38 export CC="libtool --mode=compile"
39 export LINK="libtool --mode=link"
40 jam
41
Werner Lemberga00ff982001-05-30 07:53:37 +000042 In later releases of FT2, building shared libraries with Jam
43 should become automatic.
David Turner1c468542001-05-29 10:52:34 +000044
45
Werner Lemberga00ff982001-05-30 07:53:37 +000046 2. Building FT2 with "GNU Make"
47 -------------------------------
David Turner1c468542001-05-29 10:52:34 +000048
Werner Lemberg9a8b5362001-03-12 22:33:52 +000049 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 Turner6ce03ef2001-03-20 14:50:04 +000051 _NOT_ work with other make tools (including BSD make)!
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000052
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 Turnerb1aabf42000-11-30 23:48:22 +000057
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000058 - Go to the `freetype2' directory.
David Turnerb1aabf42000-11-30 23:48:22 +000059
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000060 - Unix (any C compiler should work):
David Turnerb1aabf42000-11-30 23:48:22 +000061
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000062 - make setup (don't worry, this will invoke a configure script)
63 - make
64 - make install
David Turner5ef3c952000-08-22 23:15:23 +000065
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000066 Alternatively, you can pass parameters to the configure script
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000067 within the CFG variable, as in:
David Turner896b6042000-10-03 17:51:29 +000068
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000069 - make setup CFG="--prefix=/usr"
70 - make
71 - make install
David Turner5f5b4462000-07-26 19:13:51 +000072
David Turner1c468542001-05-29 10:52:34 +000073
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000074 - Windows:
David Turner5f5b4462000-07-26 19:13:51 +000075
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000076 We provide a version of GNU Make for Win32 on the FreeType site.
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000077 See http://www.freetype.org/download.html for details.
Werner Lemberge4b32a52000-10-31 20:42:18 +000078
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000079 - gcc (Mingw, _not_ CygWin):
David Turner859a18a2000-12-14 18:50:40 +000080
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000081 - make setup
82 - make
David Turner5f5b4462000-07-26 19:13:51 +000083
David Turner5f5b4462000-07-26 19:13:51 +000084
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000085 - Visual C++:
David Turnerb1aabf42000-11-30 23:48:22 +000086
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000087 - make setup visualc
88 - make
David Turner859a18a2000-12-14 18:50:40 +000089
90
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000091 - other compilers:
David Turnerb1aabf42000-11-30 23:48:22 +000092
David Turner1c468542001-05-29 10:52:34 +000093 - 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 Turner859a18a2000-12-14 18:50:40 +000097
Werner Lemberge4b32a52000-10-31 20:42:18 +000098
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000099II. In your own environment (IDE)
100---------------------------------
Werner Lemberge4b32a52000-10-31 20:42:18 +0000101
Werner Lemberg521a2d72001-03-20 22:58:56 +0000102 You need to add the directories "freetype2/include" to your include
103 path when compiling the library.
David Turnerb1aabf42000-11-30 23:48:22 +0000104
Werner Lemberg521a2d72001-03-20 22:58:56 +0000105 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 Turner6ce03ef2001-03-20 14:50:04 +0000108
Werner Lemberg521a2d72001-03-20 22:58:56 +0000109 DO NOT COMPILE ALL C FILES! Rather, compile the following ones:
David Turnerb1aabf42000-11-30 23:48:22 +0000110
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000111 -- base components (required)
David Turnerb1aabf42000-11-30 23:48:22 +0000112
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000113 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 Turnerb1aabf42000-11-30 23:48:22 +0000120
Werner Lemberg5a2fdc02000-12-14 22:57:17 +0000121 src/base/ftmac.c -- only on the Macintosh
David Turnerb1aabf42000-11-30 23:48:22 +0000122
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000123 -- other components are optional
David Turnerb1aabf42000-11-30 23:48:22 +0000124
Werner Lemberg5a2fdc02000-12-14 22:57:17 +0000125 src/autohint/autohint.c -- auto hinting module
126 src/cache/ftcache.c -- cache sub-system (in beta)
Werner Lemberga00ff982001-05-30 07:53:37 +0000127 src/sfnt/sfnt.c -- SFNT files support
128 (TrueType & OpenType)
Werner Lemberg5a2fdc02000-12-14 22:57:17 +0000129 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 Turnerb1aabf42000-11-30 23:48:22 +0000136
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000137 Note:
David Turnerb1aabf42000-11-30 23:48:22 +0000138
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000139 `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 Lemberge4b32a52000-10-31 20:42:18 +0000143
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000144 etc.
145
Werner Lemberga00ff982001-05-30 07:53:37 +0000146For more information, please consult "docs/BUILD".
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000147
148--- end of INSTALL --