INSTALL.GNU 6.0 KB

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