childs -> children.
[AROS.git] / workbench / libs / freetype / Jamfile
bloba345d242ee45b6bd00413600ae464478ed19e13a
1 # FreeType 2 top Jamfile.
3 # Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by
4 # David Turner, Robert Wilhelm, and Werner Lemberg.
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.
13 # The HDRMACRO is already defined in FTJam and is used to add
14 # the content of certain macros to the list of included header
15 # files.
17 # We can compile FreeType 2 with classic Jam however thanks to
18 # the following code
20 if ! $(JAM_TOOLSET)
22   rule HDRMACRO
23   {
24     # nothing
25   }
29 # We need to invoke a SubDir rule if the FT2 source directory top is not the
30 # current directory.  This allows us to build FreeType 2 as part of a larger
31 # project easily.
33 if $(FT2_TOP) != $(DOT)
35   SubDir  FT2_TOP ;
39 # The following macros define the include directory, the source directory,
40 # and the final library name (without library extensions).  They can be
41 # replaced by other definitions when the library is compiled as part of
42 # a larger project.
45 # Name of FreeType include directory during compilation.
46 # This is relative to FT2_TOP.
48 FT2_INCLUDE_DIR ?= include ;
50 # Name of FreeType source directory during compilation.
51 # This is relative to FT2_TOP.
53 FT2_SRC_DIR ?= src ;
55 # Name of final library, without extension.
57 FT2_LIB ?= $(LIBPREFIX)freetype ;
60 # Define FT2_BUILD_INCLUDE to point to your build-specific directory.
61 # This is prepended to FT2_INCLUDE_DIR.  It can be used to specify
62 # the location of a custom <ft2build.h> which will point to custom
63 # versions of `ftmodule.h' and `ftoption.h', for example.
65 FT2_BUILD_INCLUDE ?= ;
67 # The list of modules to compile on any given build of the library.
68 # By default, this will contain _all_ modules defined in FT2_SRC_DIR.
70 # IMPORTANT: You'll need to change the content of `ftmodule.h' as well
71 #            if you modify this list or provide your own.
73 FT2_COMPONENTS ?= autofit    # auto-fitter
74                   base       # base component (public APIs)
75                   bdf        # BDF font driver
76                   cache      # cache sub-system
77                   cff        # CFF/CEF font driver
78                   cid        # PostScript CID-keyed font driver
79                   gzip       # support for gzip-compressed files
80                   lzw        # support for LZW-compressed files
81                   pcf        # PCF font driver
82                   pfr        # PFR/TrueDoc font driver
83                   psaux      # common PostScript routines module
84                   pshinter   # PostScript hinter module
85                   psnames    # PostScript names handling
86                   raster     # monochrome rasterizer
87                   smooth     # anti-aliased rasterizer
88                   sfnt       # SFNT-based format support routines
89                   truetype   # TrueType font driver
90                   type1      # PostScript Type 1 font driver
91                   type42     # PostScript Type 42 (embedded TrueType) driver
92                   winfonts   # Windows FON/FNT font driver
93                   ;
96 # Don't touch.
98 FT2_INCLUDE  = $(FT2_BUILD_INCLUDE)
99                [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
101 FT2_SRC      = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
103 # Location of API Reference Documentation
105 if $(DOC_DIR)
107   DOC_DIR = $(DOCDIR:T) ;
109 else
111   DOC_DIR = docs/reference ;
115 # Only used by FreeType developers.
117 if $(DEBUG_HINTER)
119   CCFLAGS += -DDEBUG_HINTER ;
123 # We need `freetype2/include' in the current include path in order to
124 # compile any part of FreeType 2.
125 #: updating documentation for upcoming release
127 HDRS += $(FT2_INCLUDE) ;
130 # We need to #define FT2_BUILD_LIBRARY so that our sources find the
131 # internal headers
133 DEFINES += FT2_BUILD_LIBRARY ;
135 # Uncomment the following line if you want to build individual source files
136 # for each FreeType 2 module.  This is only useful during development, and
137 # is better defined as an environment variable anyway!
139 # FT2_MULTI = true ;
142 # The file <freetype/config/ftheader.h> is used to define macros that are
143 # later used in #include statements.  It needs to be parsed in order to
144 # record these definitions.
146 HDRMACRO  [ FT2_SubDir  include freetype config ftheader.h ] ;
147 HDRMACRO  [ FT2_SubDir  include freetype internal internal.h ] ;
150 # Now include the Jamfile in `freetype2/src', used to drive the compilation
151 # of each FreeType 2 component and/or module.
153 SubInclude  FT2_TOP $(FT2_SRC_DIR) ;
155 # Handle the generation of the `ftexport.sym' file which contain the list
156 # of exported symbols.  This can be used on Unix by libtool.
158 SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
160 rule GenExportSymbols
162   local  apinames = apinames$(SUFEXE) ;
163   local  headers  = [ Glob $(2) : *.h ] ;
165   LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
167   APINAMES on $(1) = apinames$(SUFEXE) ;
169   Depends            $(1) : $(apinames) $(headers) ;
170   GenExportSymbols1  $(1) : $(headers) ;
171   Clean              clean : $(1) ;
174 actions GenExportSymbols1 bind APINAMES
176   $(APINAMES) $(2) > $(1)
179 GenExportSymbols  ftexport.sym : include/freetype include/freetype/cache ;
181 # Test files (hinter debugging).  Only used by FreeType developers.
183 if $(DEBUG_HINTER)
185   SubInclude FT2_TOP tests ;
188 rule RefDoc
190   Depends  $1 : all ;
191   NotFile  $1 ;
192   Always   $1 ;
195 actions RefDoc
197   python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.3.7 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
200 RefDoc  refdoc ;
203 # end of top Jamfile