🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
6.4 KiB

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