Jamfile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. # FreeType 2 top Jamfile.
  2. #
  3. # Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. gzip # support for gzip-compressed files
  68. lzw # support for LZW-compressed files
  69. pcf # PCF font driver
  70. pfr # PFR/TrueDoc font driver
  71. psaux # common PostScript routines module
  72. pshinter # PostScript hinter module
  73. psnames # PostScript names handling
  74. raster # monochrome rasterizer
  75. smooth # anti-aliased rasterizer
  76. sfnt # SFNT-based format support routines
  77. truetype # TrueType font driver
  78. type1 # PostScript Type 1 font driver
  79. type42 # PostScript Type 42 (embedded TrueType) driver
  80. winfonts # Windows FON/FNT font driver
  81. ;
  82. # Don't touch.
  83. #
  84. FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
  85. [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
  86. FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
  87. # Location of API Reference Documentation
  88. #
  89. if $(DOC_DIR)
  90. {
  91. DOC_DIR = $(DOCDIR:T) ;
  92. }
  93. else
  94. {
  95. DOC_DIR = docs/reference ;
  96. }
  97. # Only used by FreeType developers.
  98. #
  99. if $(DEBUG_HINTER)
  100. {
  101. CCFLAGS += -DDEBUG_HINTER ;
  102. }
  103. # We need `freetype2/include' in the current include path in order to
  104. # compile any part of FreeType 2.
  105. #: updating documentation for upcoming release
  106. HDRS += $(FT2_INCLUDE) ;
  107. # We need to #define FT2_BUILD_LIBRARY so that our sources find the
  108. # internal headers
  109. #
  110. DEFINES += FT2_BUILD_LIBRARY ;
  111. # Uncomment the following line if you want to build individual source files
  112. # for each FreeType 2 module. This is only useful during development, and
  113. # is better defined as an environment variable anyway!
  114. #
  115. # FT2_MULTI = true ;
  116. # The file <freetype/config/ftheader.h> is used to define macros that are
  117. # later used in #include statements. It needs to be parsed in order to
  118. # record these definitions.
  119. #
  120. HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
  121. HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
  122. # Now include the Jamfile in `freetype2/src', used to drive the compilation
  123. # of each FreeType 2 component and/or module.
  124. #
  125. SubInclude FT2_TOP $(FT2_SRC_DIR) ;
  126. # Handle the generation of the `ftexport.sym' file which contain the list
  127. # of exported symbols. This can be used on Unix by libtool.
  128. #
  129. SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
  130. rule GenExportSymbols
  131. {
  132. local apinames = apinames$(SUFEXE) ;
  133. local headers = [ Glob $(2) : *.h ] ;
  134. LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
  135. APINAMES on $(1) = apinames$(SUFEXE) ;
  136. Depends $(1) : $(apinames) $(headers) ;
  137. GenExportSymbols1 $(1) : $(headers) ;
  138. Clean clean : $(1) ;
  139. }
  140. actions GenExportSymbols1 bind APINAMES
  141. {
  142. $(APINAMES) $(2) > $(1)
  143. }
  144. GenExportSymbols ftexport.sym : include/freetype include/freetype/cache ;
  145. # Test files (hinter debugging). Only used by FreeType developers.
  146. #
  147. if $(DEBUG_HINTER)
  148. {
  149. SubInclude FT2_TOP tests ;
  150. }
  151. rule RefDoc
  152. {
  153. Depends $1 : all ;
  154. NotFile $1 ;
  155. Always $1 ;
  156. }
  157. actions RefDoc
  158. {
  159. python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.3.12 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
  160. }
  161. RefDoc refdoc ;
  162. # end of top Jamfile