modules/freetype2/Jamfile

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

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

mercurial