Jamfile 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. # FreeType 2 top Jamfile.
  2. #
  3. # Copyright 2001-2016 by
  4. # David Turner, Robert Wilhelm, and Werner Lemberg.
  5. #
  6. # This file is part of the FreeType project, and may only be used, modified,
  7. # and distributed under the terms of the FreeType project license,
  8. # LICENSE.TXT. By continuing to use, modify, or distribute this file you
  9. # indicate that you have read the license and understand and accept it
  10. # fully.
  11. # The HDRMACRO is already defined in FTJam and is used to add
  12. # the content of certain macros to the list of included header
  13. # files.
  14. #
  15. # We can compile FreeType 2 with classic Jam however thanks to
  16. # the following code
  17. #
  18. if ! $(JAM_TOOLSET)
  19. {
  20. rule HDRMACRO
  21. {
  22. # nothing
  23. }
  24. }
  25. # We need to invoke a SubDir rule if the FT2 source directory top is not the
  26. # current directory. This allows us to build FreeType 2 as part of a larger
  27. # project easily.
  28. #
  29. if $(FT2_TOP) != $(DOT)
  30. {
  31. SubDir FT2_TOP ;
  32. }
  33. # The following macros define the include directory, the source directory,
  34. # and the final library name (without library extensions). They can be
  35. # replaced by other definitions when the library is compiled as part of
  36. # a larger project.
  37. #
  38. # Name of FreeType include directory during compilation.
  39. # This is relative to FT2_TOP.
  40. #
  41. FT2_INCLUDE_DIR ?= include ;
  42. # Name of FreeType source directory during compilation.
  43. # This is relative to FT2_TOP.
  44. #
  45. FT2_SRC_DIR ?= src ;
  46. # Name of final library, without extension.
  47. #
  48. FT2_LIB ?= $(LIBPREFIX)freetype ;
  49. # Define FT2_BUILD_INCLUDE to point to your build-specific directory.
  50. # This is prepended to FT2_INCLUDE_DIR. It can be used to specify
  51. # the location of a custom <ft2build.h> which will point to custom
  52. # versions of `ftmodule.h' and `ftoption.h', for example.
  53. #
  54. FT2_BUILD_INCLUDE ?= ;
  55. # The list of modules to compile on any given build of the library.
  56. # By default, this will contain _all_ modules defined in FT2_SRC_DIR.
  57. #
  58. # IMPORTANT: You'll need to change the content of `ftmodule.h' as well
  59. # if you modify this list or provide your own.
  60. #
  61. FT2_COMPONENTS ?= autofit # auto-fitter
  62. base # base component (public APIs)
  63. bdf # BDF font driver
  64. bzip2 # support for bzip2-compressed PCF font
  65. cache # cache sub-system
  66. cff # CFF/CEF font driver
  67. cid # PostScript CID-keyed font driver
  68. gzip # support for gzip-compressed PCF font
  69. lzw # support for LZW-compressed PCF font
  70. pcf # PCF font driver
  71. pfr # PFR/TrueDoc font driver
  72. psaux # common PostScript routines module
  73. pshinter # PostScript hinter module
  74. psnames # PostScript names handling
  75. raster # monochrome rasterizer
  76. sfnt # SFNT-based format support routines
  77. smooth # anti-aliased rasterizer
  78. truetype # TrueType font driver
  79. type1 # PostScript Type 1 font driver
  80. type42 # PostScript Type 42 (embedded TrueType) driver
  81. winfonts # Windows FON/FNT font driver
  82. ;
  83. # Don't touch.
  84. #
  85. FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
  86. [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
  87. FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
  88. # Location of API Reference Documentation
  89. #
  90. if $(DOC_DIR)
  91. {
  92. DOC_DIR = $(DOCDIR:T) ;
  93. }
  94. else
  95. {
  96. DOC_DIR = docs/reference ;
  97. }
  98. # Only used by FreeType developers.
  99. #
  100. if $(DEBUG_HINTER)
  101. {
  102. CCFLAGS += -DDEBUG_HINTER ;
  103. }
  104. # We need `include' in the current include path in order to
  105. # compile any part of FreeType 2.
  106. #
  107. HDRS += $(FT2_INCLUDE) ;
  108. # We need to #define FT2_BUILD_LIBRARY so that our sources find the
  109. # internal headers
  110. #
  111. CCFLAGS += -DFT2_BUILD_LIBRARY ;
  112. # Uncomment the following line if you want to build individual source files
  113. # for each FreeType 2 module. This is only useful during development, and
  114. # is better defined as an environment variable anyway!
  115. #
  116. # FT2_MULTI = true ;
  117. # The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
  118. # macros that are later used in #include statements. They need to be parsed
  119. # in order to record these definitions.
  120. #
  121. HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ;
  122. HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal internal.h ] ;
  123. HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ;
  124. # Now include the Jamfile in `freetype2/src', used to drive the compilation
  125. # of each FreeType 2 component and/or module.
  126. #
  127. SubInclude FT2_TOP $(FT2_SRC_DIR) ;
  128. # Handle the generation of the `ftexport.sym' file, which contains the list
  129. # of exported symbols. This can be used on Unix by libtool.
  130. #
  131. SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
  132. rule GenExportSymbols
  133. {
  134. local apinames = apinames$(SUFEXE) ;
  135. local aheader ;
  136. local headers ;
  137. for aheader in [ Glob $(2) : *.h ]
  138. {
  139. switch $(aheader)
  140. {
  141. case */ftmac.h :
  142. if ( $(MAC) || $(OS) = MACOSX ) {
  143. headers += $(aheader) ;
  144. }
  145. case *.h : headers += $(aheader) ;
  146. }
  147. }
  148. LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
  149. APINAMES on $(1) = apinames$(SUFEXE) ;
  150. Depends $(1) : $(apinames) $(headers) ;
  151. GenExportSymbols1 $(1) : $(headers) ;
  152. Clean clean : $(1) ;
  153. }
  154. actions GenExportSymbols1 bind APINAMES
  155. {
  156. $(APINAMES) $(2) > $(1)
  157. }
  158. GenExportSymbols ftexport.sym : include/freetype ;
  159. # Test files (hinter debugging). Only used by FreeType developers.
  160. #
  161. if $(DEBUG_HINTER)
  162. {
  163. SubInclude FT2_TOP tests ;
  164. }
  165. rule RefDoc
  166. {
  167. Depends $1 : all ;
  168. NotFile $1 ;
  169. Always $1 ;
  170. }
  171. actions RefDoc
  172. {
  173. python $(FT2_SRC)/tools/docmaker/docmaker.py
  174. --prefix=ft2
  175. --title=FreeType-2.7
  176. --output=$(DOC_DIR)
  177. $(FT2_INCLUDE)/freetype/*.h
  178. $(FT2_INCLUDE)/freetype/config/*.h
  179. }
  180. RefDoc refdoc ;
  181. # end of top Jamfile