Jamfile 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. # FreeType 2 top Jamfile.
  2. #
  3. # Copyright 2001-2014 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. cache # cache sub-system
  65. cff # CFF/CEF font driver
  66. cid # PostScript CID-keyed font driver
  67. pcf # PCF font driver
  68. bzip2 # support for bzip2-compressed PCF font
  69. gzip # support for gzip-compressed PCF font
  70. lzw # support for LZW-compressed PCF font
  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. smooth # anti-aliased rasterizer
  77. sfnt # SFNT-based format support routines
  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 `freetype2/include' in the current include path in order to
  105. # compile any part of FreeType 2.
  106. #: updating documentation for upcoming release
  107. HDRS += $(FT2_INCLUDE) ;
  108. # We need to #define FT2_BUILD_LIBRARY so that our sources find the
  109. # internal headers
  110. #
  111. DEFINES += FT2_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 file <config/ftheader.h> is used to define macros that are later used
  118. # in #include statements. It needs to be parsed in order to record these
  119. # definitions.
  120. #
  121. HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
  122. HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
  123. # Now include the Jamfile in `freetype2/src', used to drive the compilation
  124. # of each FreeType 2 component and/or module.
  125. #
  126. SubInclude FT2_TOP $(FT2_SRC_DIR) ;
  127. # Handle the generation of the `ftexport.sym' file which contain the list
  128. # of exported symbols. This can be used on Unix by libtool.
  129. #
  130. SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
  131. rule GenExportSymbols
  132. {
  133. local apinames = apinames$(SUFEXE) ;
  134. local headers = [ Glob $(2) : *.h ] ;
  135. LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
  136. APINAMES on $(1) = apinames$(SUFEXE) ;
  137. Depends $(1) : $(apinames) $(headers) ;
  138. GenExportSymbols1 $(1) : $(headers) ;
  139. Clean clean : $(1) ;
  140. }
  141. actions GenExportSymbols1 bind APINAMES
  142. {
  143. $(APINAMES) $(2) > $(1)
  144. }
  145. GenExportSymbols ftexport.sym : include include/cache ;
  146. # Test files (hinter debugging). Only used by FreeType developers.
  147. #
  148. if $(DEBUG_HINTER)
  149. {
  150. SubInclude FT2_TOP tests ;
  151. }
  152. rule RefDoc
  153. {
  154. Depends $1 : all ;
  155. NotFile $1 ;
  156. Always $1 ;
  157. }
  158. actions RefDoc
  159. {
  160. python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.4 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h
  161. }
  162. RefDoc refdoc ;
  163. # end of top Jamfile