michael@0: This document contains instructions how to build the FreeType library michael@0: on non-Unix systems with the help of GNU Make. Note that if you are michael@0: running Cygwin or MinGW/MSYS in Windows, you should follow the michael@0: instructions in the file `INSTALL.UNIX' instead. michael@0: michael@0: michael@0: FreeType 2 includes a powerful and flexible build system that allows michael@0: you to easily compile it on a great variety of platforms from the michael@0: command line. To do so, just follow these simple instructions. michael@0: michael@0: 1. Install GNU Make michael@0: ------------------- michael@0: michael@0: Because GNU Make is the only Make tool supported to compile michael@0: FreeType 2, you should install it on your machine. michael@0: michael@0: The FreeType 2 build system relies on many features special to GNU michael@0: Make. michael@0: michael@0: NEARLY ALL OTHER MAKE TOOLS FAIL, INCLUDING `BSD MAKE', SO REALLY michael@0: INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM! michael@0: michael@0: Note that make++, a make tool written in Perl, supports enough michael@0: features of GNU make to compile FreeType. See michael@0: michael@0: http://makepp.sourceforge.net michael@0: michael@0: for more information; you need version 1.19 or newer, and you must michael@0: pass option `--norc-substitution'. michael@0: michael@0: Make sure that you are invoking GNU Make from the command line, by michael@0: typing something like: michael@0: michael@0: make -v michael@0: michael@0: to display its version number. michael@0: michael@0: VERSION 3.80 OR NEWER IS NEEDED! michael@0: michael@0: michael@0: 2. Invoke `make' michael@0: ---------------- michael@0: michael@0: Go to the root directory of FreeType 2, then simply invoke GNU michael@0: Make from the command line. This will launch the FreeType 2 host michael@0: platform detection routines. A summary will be displayed, for michael@0: example, on Win32. michael@0: michael@0: michael@0: ============================================================== michael@0: FreeType build system -- automatic system detection michael@0: michael@0: The following settings are used: michael@0: michael@0: platform windows michael@0: compiler gcc michael@0: configuration directory .\builds\windows michael@0: configuration rules .\builds\windows\w32-gcc.mk michael@0: michael@0: If this does not correspond to your system or settings please michael@0: remove the file 'config.mk' from this directory then read the michael@0: INSTALL file for help. michael@0: michael@0: Otherwise, simply type 'make' again to build the library michael@0: or 'make refdoc' to build the API reference (the latter needs michael@0: python). michael@0: ============================================================= michael@0: michael@0: michael@0: If the detected settings correspond to your platform and compiler, michael@0: skip to step 5. Note that if your platform is completely alien to michael@0: the build system, the detected platform will be `ansi'. michael@0: michael@0: michael@0: 3. Configure the build system for a different compiler michael@0: ------------------------------------------------------ michael@0: michael@0: If the build system correctly detected your platform, but you want michael@0: to use a different compiler than the one specified in the summary michael@0: (for most platforms, gcc is the default compiler), invoke GNU Make michael@0: with michael@0: michael@0: make setup michael@0: michael@0: Examples: michael@0: michael@0: to use Visual C++ on Win32, type: `make setup visualc' michael@0: to use Borland C++ on Win32, type `make setup bcc32' michael@0: to use Watcom C++ on Win32, type `make setup watcom' michael@0: to use Intel C++ on Win32, type `make setup intelc' michael@0: to use LCC-Win32 on Win32, type: `make setup lcc' michael@0: to use Watcom C++ on OS/2, type `make setup watcom' michael@0: to use VisualAge C++ on OS/2, type `make setup visualage' michael@0: michael@0: The name to use is platform-dependent. The list of michael@0: available compilers for your system is available in the file michael@0: `builds//detect.mk'. michael@0: michael@0: If you are satisfied by the new configuration summary, skip to michael@0: step 5. michael@0: michael@0: michael@0: 4. Configure the build system for an unknown platform/compiler michael@0: -------------------------------------------------------------- michael@0: michael@0: The auto-detection/setup phase of the build system copies a file michael@0: to the current directory under the name `config.mk'. michael@0: michael@0: For example, on OS/2+gcc, it would simply copy michael@0: `builds/os2/os2-gcc.mk' to `./config.mk'. michael@0: michael@0: If for some reason your platform isn't correctly detected, copy michael@0: manually the configuration sub-makefile to `./config.mk' and go to michael@0: step 5. michael@0: michael@0: Note that this file is a sub-Makefile used to specify Make michael@0: variables for compiler and linker invocation during the build. michael@0: You can easily create your own version from one of the existing michael@0: configuration files, then copy it to the current directory under michael@0: the name `./config.mk'. michael@0: michael@0: michael@0: 5. Build the library michael@0: -------------------- michael@0: michael@0: The auto-detection/setup phase should have copied a file in the michael@0: current directory, called `./config.mk'. This file contains michael@0: definitions of various Make variables used to invoke the compiler michael@0: and linker during the build. [It has also generated a file called michael@0: `ftmodule.h' in the objects directory (which is normally michael@0: `/objs/'); please read the file `docs/CUSTOMIZE' for michael@0: customization of FreeType.] michael@0: michael@0: To launch the build, simply invoke GNU Make again: The top michael@0: Makefile will detect the configuration file and run the build with michael@0: it. michael@0: michael@0: michael@0: Final note michael@0: michael@0: The above instructions build a _statically_ linked library of the michael@0: font engine in the `objs' directory. On Windows, you can build a michael@0: DLL either with MinGW (within an MSYS shell, following the michael@0: instructions in `INSTALL.UNIX'), or you use one of the Visual C++ michael@0: project files; see the subdirectories of `builds/windows'. For michael@0: everything else, you are on your own, and you might follow the michael@0: instructions in `INSTALL.ANY' to create your own Makefiles. michael@0: michael@0: ---------------------------------------------------------------------- michael@0: michael@0: Copyright 2003-2006, 2008, 2013, 2014 by michael@0: David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: michael@0: This file is part of the FreeType project, and may only be used, michael@0: modified, and distributed under the terms of the FreeType project michael@0: license, LICENSE.TXT. By continuing to use, modify, or distribute michael@0: this file you indicate that you have read the license and understand michael@0: and accept it fully. michael@0: michael@0: michael@0: --- end of INSTALL.GNU ---