modules/freetype2/Jamfile

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/modules/freetype2/Jamfile	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,204 @@
     1.4 +# FreeType 2 top Jamfile.
     1.5 +#
     1.6 +# Copyright 2001-2014 by
     1.7 +# David Turner, Robert Wilhelm, and Werner Lemberg.
     1.8 +#
     1.9 +# This file is part of the FreeType project, and may only be used, modified,
    1.10 +# and distributed under the terms of the FreeType project license,
    1.11 +# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
    1.12 +# indicate that you have read the license and understand and accept it
    1.13 +# fully.
    1.14 +
    1.15 +
    1.16 +# The HDRMACRO is already defined in FTJam and is used to add
    1.17 +# the content of certain macros to the list of included header
    1.18 +# files.
    1.19 +#
    1.20 +# We can compile FreeType 2 with classic Jam however thanks to
    1.21 +# the following code
    1.22 +#
    1.23 +if ! $(JAM_TOOLSET)
    1.24 +{
    1.25 +  rule HDRMACRO
    1.26 +  {
    1.27 +    # nothing
    1.28 +  }
    1.29 +}
    1.30 +
    1.31 +
    1.32 +# We need to invoke a SubDir rule if the FT2 source directory top is not the
    1.33 +# current directory.  This allows us to build FreeType 2 as part of a larger
    1.34 +# project easily.
    1.35 +#
    1.36 +if $(FT2_TOP) != $(DOT)
    1.37 +{
    1.38 +  SubDir  FT2_TOP ;
    1.39 +}
    1.40 +
    1.41 +
    1.42 +# The following macros define the include directory, the source directory,
    1.43 +# and the final library name (without library extensions).  They can be
    1.44 +# replaced by other definitions when the library is compiled as part of
    1.45 +# a larger project.
    1.46 +#
    1.47 +
    1.48 +# Name of FreeType include directory during compilation.
    1.49 +# This is relative to FT2_TOP.
    1.50 +#
    1.51 +FT2_INCLUDE_DIR ?= include ;
    1.52 +
    1.53 +# Name of FreeType source directory during compilation.
    1.54 +# This is relative to FT2_TOP.
    1.55 +#
    1.56 +FT2_SRC_DIR ?= src ;
    1.57 +
    1.58 +# Name of final library, without extension.
    1.59 +#
    1.60 +FT2_LIB ?= $(LIBPREFIX)freetype ;
    1.61 +
    1.62 +
    1.63 +# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
    1.64 +# This is prepended to FT2_INCLUDE_DIR.  It can be used to specify
    1.65 +# the location of a custom <ft2build.h> which will point to custom
    1.66 +# versions of `ftmodule.h' and `ftoption.h', for example.
    1.67 +#
    1.68 +FT2_BUILD_INCLUDE ?= ;
    1.69 +
    1.70 +# The list of modules to compile on any given build of the library.
    1.71 +# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
    1.72 +#
    1.73 +# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
    1.74 +#            if you modify this list or provide your own.
    1.75 +#
    1.76 +FT2_COMPONENTS ?= autofit    # auto-fitter
    1.77 +                  base       # base component (public APIs)
    1.78 +                  bdf        # BDF font driver
    1.79 +                  cache      # cache sub-system
    1.80 +                  cff        # CFF/CEF font driver
    1.81 +                  cid        # PostScript CID-keyed font driver
    1.82 +                  pcf        # PCF font driver
    1.83 +                  bzip2      # support for bzip2-compressed PCF font
    1.84 +                  gzip       # support for gzip-compressed PCF font
    1.85 +                  lzw        # support for LZW-compressed PCF font
    1.86 +                  pfr        # PFR/TrueDoc font driver
    1.87 +                  psaux      # common PostScript routines module
    1.88 +                  pshinter   # PostScript hinter module
    1.89 +                  psnames    # PostScript names handling
    1.90 +                  raster     # monochrome rasterizer
    1.91 +                  smooth     # anti-aliased rasterizer
    1.92 +                  sfnt       # SFNT-based format support routines
    1.93 +                  truetype   # TrueType font driver
    1.94 +                  type1      # PostScript Type 1 font driver
    1.95 +                  type42     # PostScript Type 42 (embedded TrueType) driver
    1.96 +                  winfonts   # Windows FON/FNT font driver
    1.97 +                  ;
    1.98 +
    1.99 +
   1.100 +# Don't touch.
   1.101 +#
   1.102 +FT2_INCLUDE  = $(FT2_BUILD_INCLUDE)
   1.103 +               [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
   1.104 +
   1.105 +FT2_SRC      = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
   1.106 +
   1.107 +# Location of API Reference Documentation
   1.108 +#
   1.109 +if $(DOC_DIR)
   1.110 +{
   1.111 +  DOC_DIR = $(DOCDIR:T) ;
   1.112 +}
   1.113 +else
   1.114 +{
   1.115 +  DOC_DIR = docs/reference ;
   1.116 +}
   1.117 +
   1.118 +
   1.119 +# Only used by FreeType developers.
   1.120 +#
   1.121 +if $(DEBUG_HINTER)
   1.122 +{
   1.123 +  CCFLAGS += -DDEBUG_HINTER ;
   1.124 +}
   1.125 +
   1.126 +
   1.127 +# We need `freetype2/include' in the current include path in order to
   1.128 +# compile any part of FreeType 2.
   1.129 +#: updating documentation for upcoming release
   1.130 +
   1.131 +HDRS += $(FT2_INCLUDE) ;
   1.132 +
   1.133 +
   1.134 +# We need to #define FT2_BUILD_LIBRARY so that our sources find the
   1.135 +# internal headers
   1.136 +#
   1.137 +DEFINES += FT2_BUILD_LIBRARY ;
   1.138 +
   1.139 +# Uncomment the following line if you want to build individual source files
   1.140 +# for each FreeType 2 module.  This is only useful during development, and
   1.141 +# is better defined as an environment variable anyway!
   1.142 +#
   1.143 +# FT2_MULTI = true ;
   1.144 +
   1.145 +
   1.146 +# The file <config/ftheader.h> is used to define macros that are later used
   1.147 +# in #include statements.  It needs to be parsed in order to record these
   1.148 +# definitions.
   1.149 +#
   1.150 +HDRMACRO  [ FT2_SubDir  include freetype config ftheader.h ] ;
   1.151 +HDRMACRO  [ FT2_SubDir  include freetype internal internal.h ] ;
   1.152 +
   1.153 +
   1.154 +# Now include the Jamfile in `freetype2/src', used to drive the compilation
   1.155 +# of each FreeType 2 component and/or module.
   1.156 +#
   1.157 +SubInclude  FT2_TOP $(FT2_SRC_DIR) ;
   1.158 +
   1.159 +# Handle the generation of the `ftexport.sym' file which contain the list
   1.160 +# of exported symbols.  This can be used on Unix by libtool.
   1.161 +#
   1.162 +SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
   1.163 +
   1.164 +rule GenExportSymbols
   1.165 +{
   1.166 +  local  apinames = apinames$(SUFEXE) ;
   1.167 +  local  headers  = [ Glob $(2) : *.h ] ;
   1.168 +
   1.169 +  LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
   1.170 +
   1.171 +  APINAMES on $(1) = apinames$(SUFEXE) ;
   1.172 +
   1.173 +  Depends            $(1) : $(apinames) $(headers) ;
   1.174 +  GenExportSymbols1  $(1) : $(headers) ;
   1.175 +  Clean              clean : $(1) ;
   1.176 +}
   1.177 +
   1.178 +actions GenExportSymbols1 bind APINAMES
   1.179 +{
   1.180 +  $(APINAMES) $(2) > $(1)
   1.181 +}
   1.182 +
   1.183 +GenExportSymbols  ftexport.sym : include include/cache ;
   1.184 +
   1.185 +# Test files (hinter debugging).  Only used by FreeType developers.
   1.186 +#
   1.187 +if $(DEBUG_HINTER)
   1.188 +{
   1.189 +  SubInclude FT2_TOP tests ;
   1.190 +}
   1.191 +
   1.192 +rule RefDoc
   1.193 +{
   1.194 +  Depends  $1 : all ;
   1.195 +  NotFile  $1 ;
   1.196 +  Always   $1 ;
   1.197 +}
   1.198 +
   1.199 +actions RefDoc
   1.200 +{
   1.201 +  python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.3 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h
   1.202 +}
   1.203 +
   1.204 +RefDoc  refdoc ;
   1.205 +
   1.206 +
   1.207 +# end of top Jamfile

mercurial