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