blob: e35eda88bfee67e2bfa6d3fdb5ea54f7fd302a58 [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
David Turner1c468542001-05-29 10:52:34 +00008 There are two ways to quickly build FreeType 2 from the command line.
9
10 The first, and favorite one, is to use the "Jam" build tool. Jam is
11 a highly portable replacement for Make whose control files do not
12 depend on the current platform or compiler toolset.
13
14 For more information, please see: http://www.freetype.org/jam/index.html
15
16 The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
17
18
19 1. Building FT2 with "Jam":
20 ===========================
21
22 once you've got *our version* of the Jam tool installed on your
23 system, simply go to the top-level FT2 directory, then type:
24
25 "jam"
26
27 on the command line. This will build the library and place it
28 in the "objs" directory.
29
30 By default, a static library is built. On Unix systems, it's possible
31 to build a shared library through the "libtool" script. You'll need
32 to have libtool installed on your system, then re-define a few
33 environment variables before invoking Jam, as in:
34
35 export CC="libtool --mode=compile"
36 export LINK="libtool --mode=link"
37 jam
38
39 In later releases of FT2, building shared libraries with Jam should
40 become automatic..
41
42
43 2. Building FT2 with "GNU Make":
44 ================================
45
Werner Lemberg9a8b5362001-03-12 22:33:52 +000046 You need to have GNU Make (version 3.78.1 or newer) installed on
47 your system to compile the library from the command line. This will
David Turner6ce03ef2001-03-20 14:50:04 +000048 _NOT_ work with other make tools (including BSD make)!
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000049
50 [Well, this is not really correct. Recently, a perl implementation
51 of make called `makepp' has appeared which can also build FreeType 2
52 successfully on Unix platforms. See http://LNC.usc.edu/~holt/makepp
53 for more details.]
David Turnerb1aabf42000-11-30 23:48:22 +000054
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000055 - Go to the `freetype2' directory.
David Turnerb1aabf42000-11-30 23:48:22 +000056
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000057 - Unix (any C compiler should work):
David Turnerb1aabf42000-11-30 23:48:22 +000058
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000059 - make setup (don't worry, this will invoke a configure script)
60 - make
61 - make install
David Turner5ef3c952000-08-22 23:15:23 +000062
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000063 Alternatively, you can pass parameters to the configure script
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000064 within the CFG variable, as in:
David Turner896b6042000-10-03 17:51:29 +000065
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000066 - make setup CFG="--prefix=/usr"
67 - make
68 - make install
David Turner5f5b4462000-07-26 19:13:51 +000069
David Turner1c468542001-05-29 10:52:34 +000070
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000071 - Windows:
David Turner5f5b4462000-07-26 19:13:51 +000072
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000073 We provide a version of GNU Make for Win32 on the FreeType site.
Werner Lemberg4c80f0c2000-12-01 17:25:58 +000074 See http://www.freetype.org/download.html for details.
Werner Lemberge4b32a52000-10-31 20:42:18 +000075
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000076 - gcc (Mingw, _not_ CygWin):
David Turner859a18a2000-12-14 18:50:40 +000077
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000078 - make setup
79 - make
David Turner5f5b4462000-07-26 19:13:51 +000080
David Turner5f5b4462000-07-26 19:13:51 +000081
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000082 - Visual C++:
David Turnerb1aabf42000-11-30 23:48:22 +000083
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000084 - make setup visualc
85 - make
David Turner859a18a2000-12-14 18:50:40 +000086
87
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000088 - other compilers:
David Turnerb1aabf42000-11-30 23:48:22 +000089
David Turner1c468542001-05-29 10:52:34 +000090 - make setup bcc32 -> Borland C++ 32 bits
91 - make setup intelc -> Intel C++
92 - make setup watcom -> Watcom C++
93 - make setup lcc -> Win32-LCC
David Turner859a18a2000-12-14 18:50:40 +000094
Werner Lemberge4b32a52000-10-31 20:42:18 +000095
Werner Lemberg5a2fdc02000-12-14 22:57:17 +000096II. In your own environment (IDE)
97---------------------------------
Werner Lemberge4b32a52000-10-31 20:42:18 +000098
Werner Lemberg521a2d72001-03-20 22:58:56 +000099 You need to add the directories "freetype2/include" to your include
100 path when compiling the library.
David Turnerb1aabf42000-11-30 23:48:22 +0000101
Werner Lemberg521a2d72001-03-20 22:58:56 +0000102 FreeType 2 is made of several components; each one of them is
103 located in a subdirectory of "freetype2/src". For example,
104 `freetype2/src/truetype/' contains the TrueType font driver.
David Turner6ce03ef2001-03-20 14:50:04 +0000105
Werner Lemberg521a2d72001-03-20 22:58:56 +0000106 DO NOT COMPILE ALL C FILES! Rather, compile the following ones:
David Turnerb1aabf42000-11-30 23:48:22 +0000107
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000108 -- base components (required)
David Turnerb1aabf42000-11-30 23:48:22 +0000109
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000110 src/base/ftsystem.c
111 src/base/ftinit.c
112 src/base/ftdebug.c
113 src/base/ftbase.c
114 src/base/ftglyph.c
115 src/base/ftbbox.c
116 src/base/ftmm.c
David Turnerb1aabf42000-11-30 23:48:22 +0000117
Werner Lemberg5a2fdc02000-12-14 22:57:17 +0000118 src/base/ftmac.c -- only on the Macintosh
David Turnerb1aabf42000-11-30 23:48:22 +0000119
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000120 -- other components are optional
David Turnerb1aabf42000-11-30 23:48:22 +0000121
Werner Lemberg5a2fdc02000-12-14 22:57:17 +0000122 src/autohint/autohint.c -- auto hinting module
123 src/cache/ftcache.c -- cache sub-system (in beta)
124 src/sfnt/sfnt.c -- SFNT files support (TrueType & OpenType)
125 src/cff/cff.c -- CFF/OpenType font driver
126 src/psnames/psnames.c -- Postscript glyph names support
127 src/psaux/psaux.c -- Postscript Type 1 parsing
128 src/truetype/truetype.c -- TrueType font driver
129 src/type1/type1.c -- Type 1 font driver
130 src/cid/type1cid.c -- Type 1 CID-keyed font driver
131 src/winfonts/winfonts.c -- Windows FONT / FNT font driver
David Turnerb1aabf42000-11-30 23:48:22 +0000132
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000133 Note:
David Turnerb1aabf42000-11-30 23:48:22 +0000134
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000135 `truetype.c' needs `sfnt.c' and `psnames.c'
136 `type1.c' needs `psaux.c' and `psnames.c'
137 `type1cid.c' needs `psaux.c' and `psnames.c'
138 `cff.c' needs `sfnt.c', `psaux.c', and `psnames.c'
Werner Lemberge4b32a52000-10-31 20:42:18 +0000139
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000140 etc.
141
David Turner1c468542001-05-29 10:52:34 +0000142For more information, please consult "docs/BUILD" !!
Werner Lemberg4c80f0c2000-12-01 17:25:58 +0000143
144--- end of INSTALL --