52645f1f7b36974e7865f078087f5c26850f8432
[platform/upstream/freetype2.git] / docs / INSTALL.GNU
1 This document contains instructions how  to build the FreeType library
2 on non-Unix systems with  the help of GNU Make.  Note  that if you are
3 running  Cygwin  or  MinGW/MSYS  in Windows,  you  should  follow  the
4 instructions in the file `INSTALL.UNIX' instead.
5
6
7   FreeType 2 includes a powerful and flexible build system that allows
8   you to  easily compile it on  a great variety of  platforms from the
9   command line.  To do so, just follow these simple instructions.
10
11   1. Install GNU Make
12   -------------------
13
14     Because  GNU Make  is  the  only Make  tool  supported to  compile
15     FreeType 2, you should install it on your machine.
16
17     The FreeType 2 build system relies on many features special to GNU
18     Make.
19
20     NEARLY ALL OTHER MAKE TOOLS  FAIL, INCLUDING `BSD MAKE', SO REALLY
21     INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
22
23     Note that  make++, a  make tool written  in Perl,  supports enough
24     features of GNU make to compile FreeType.  See
25
26       http://makepp.sourceforge.net
27
28     for more information; you need version 1.19 or newer, and you must
29     pass option `--norc-substitution'.
30
31     Make sure that you are invoking GNU Make from the command line, by
32     typing something like:
33
34       make -v
35
36     to display its version number.
37
38     VERSION 3.80 OR NEWER IS NEEDED!
39
40
41   2. Invoke `make'
42   ----------------
43
44     Go to  the root  directory of FreeType  2, then simply  invoke GNU
45     Make from the command line.   This will launch the FreeType 2 host
46     platform  detection routines.   A summary  will be  displayed, for
47     example, on Win32.
48
49
50       ==============================================================
51       FreeType build system -- automatic system detection
52
53       The following settings are used:
54
55         platform                     windows
56         compiler                     gcc
57         configuration directory      .\builds\windows
58         configuration rules          .\builds\windows\w32-gcc.mk
59
60       If this does not correspond to your system or settings please
61       remove the file 'config.mk' from this directory then read the
62       INSTALL file for help.
63
64       Otherwise, simply type 'make' again to build the library
65       or 'make refdoc' to build the API reference (the latter needs
66       python).
67       =============================================================
68
69
70     If the detected settings correspond to your platform and compiler,
71     skip to step 5.  Note that if your platform is completely alien to
72     the build system, the detected platform will be `ansi'.
73
74
75   3. Configure the build system for a different compiler
76   ------------------------------------------------------
77
78     If the build system correctly detected your platform, but you want
79     to use a different compiler  than the one specified in the summary
80     (for most platforms, gcc is the default compiler), invoke GNU Make
81     with
82
83       make setup <compiler>
84
85     Examples:
86
87       to use Visual C++ on Win32, type:  `make setup visualc'
88       to use Borland C++ on Win32, type  `make setup bcc32'
89       to use Watcom C++ on Win32, type   `make setup watcom'
90       to use Intel C++ on Win32, type    `make setup intelc'
91       to use LCC-Win32 on Win32, type:   `make setup lcc'
92       to use Watcom C++ on OS/2, type    `make setup watcom'
93       to use VisualAge C++ on OS/2, type `make setup visualage'
94
95     The  <compiler> name to  use is  platform-dependent.  The  list of
96     available  compilers for  your  system is  available  in the  file
97     `builds/<system>/detect.mk'.
98
99     If you  are satisfied  by the new  configuration summary,  skip to
100     step 5.
101
102
103   4. Configure the build system for an unknown platform/compiler
104   --------------------------------------------------------------
105
106     The auto-detection/setup  phase of the build system  copies a file
107     to the current directory under the name `config.mk'.
108
109     For    example,    on    OS/2+gcc,    it   would    simply    copy
110     `builds/os2/os2-gcc.mk' to `./config.mk'.
111
112     If for  some reason your  platform isn't correctly  detected, copy
113     manually the configuration sub-makefile to `./config.mk' and go to
114     step 5.
115
116     Note  that  this file  is  a  sub-Makefile  used to  specify  Make
117     variables  for compiler  and linker  invocation during  the build.
118     You can  easily create your own  version from one  of the existing
119     configuration files,  then copy it to the  current directory under
120     the name `./config.mk'.
121
122
123   5. Build the library
124   --------------------
125
126     The auto-detection/setup  phase should have  copied a file  in the
127     current  directory,  called  `./config.mk'.   This  file  contains
128     definitions of various Make  variables used to invoke the compiler
129     and linker during the build.  [It has also generated a file called
130     `ftmodule.h'   in  the  objects   directory  (which   is  normally
131     `<toplevel>/objs/');  please read  the  file `docs/CUSTOMIZE'  for
132     customization of FreeType.]
133
134     To  launch  the build,  simply  invoke  GNU  Make again:  The  top
135     Makefile will detect the configuration file and run the build with
136     it.
137
138
139   Final note
140
141     The above instructions build a  _statically_ linked library of the
142     font engine in the `objs' directory.   On Windows, you can build a
143     DLL  either  with  MinGW  (within an  MSYS  shell,  following  the
144     instructions in `INSTALL.UNIX'), or you  use one of the Visual C++
145     project files; see  the  subdirectories  of `builds/windows'.  For
146     everything else,  you are on  your own,  and you might  follow the
147     instructions in `INSTALL.ANY' to create your own Makefiles.
148
149 ----------------------------------------------------------------------
150
151 Copyright 2003-2018 by
152 David Turner, Robert Wilhelm, and Werner Lemberg.
153
154 This  file is  part of  the FreeType  project, and  may only  be used,
155 modified,  and distributed  under the  terms of  the  FreeType project
156 license,  LICENSE.TXT.  By  continuing to  use, modify,  or distribute
157 this file you  indicate that you have read  the license and understand
158 and accept it fully.
159
160
161 --- end of INSTALL.GNU ---