Werner Lemberg | 60a04df | 2005-06-04 23:04:30 +0000 | [diff] [blame] | 1 | # FreeType 2 top Jamfile. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 2 | # |
Werner Lemberg | 563ae78 | 2017-01-04 20:16:34 +0100 | [diff] [blame] | 3 | # Copyright 2001-2017 by |
Werner Lemberg | 60a04df | 2005-06-04 23:04:30 +0000 | [diff] [blame] | 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 | |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 12 | |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 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. |
| 16 | # |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 17 | # We can compile FreeType 2 with classic Jam however thanks to |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 18 | # the following code |
| 19 | # |
| 20 | if ! $(JAM_TOOLSET) |
| 21 | { |
| 22 | rule HDRMACRO |
| 23 | { |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 24 | # nothing |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 25 | } |
| 26 | } |
| 27 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 28 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 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. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 32 | # |
| 33 | if $(FT2_TOP) != $(DOT) |
| 34 | { |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 35 | SubDir FT2_TOP ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 36 | } |
| 37 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 38 | |
| 39 | # The following macros define the include directory, the source directory, |
| 40 | # and the final library name (without library extensions). They can be |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 41 | # replaced by other definitions when the library is compiled as part of |
| 42 | # a larger project. |
| 43 | # |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 44 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 45 | # Name of FreeType include directory during compilation. |
| 46 | # This is relative to FT2_TOP. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 47 | # |
| 48 | FT2_INCLUDE_DIR ?= include ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 49 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 50 | # Name of FreeType source directory during compilation. |
| 51 | # This is relative to FT2_TOP. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 52 | # |
| 53 | FT2_SRC_DIR ?= src ; |
| 54 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 55 | # Name of final library, without extension. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 56 | # |
| 57 | FT2_LIB ?= $(LIBPREFIX)freetype ; |
| 58 | |
| 59 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 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 |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 62 | # the location of a custom <ft2build.h> which will point to custom |
Werner Lemberg | 8e6c56f | 2005-10-18 06:09:13 +0000 | [diff] [blame] | 63 | # versions of `ftmodule.h' and `ftoption.h', for example. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 64 | # |
| 65 | FT2_BUILD_INCLUDE ?= ; |
| 66 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 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. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 69 | # |
Werner Lemberg | 8e6c56f | 2005-10-18 06:09:13 +0000 | [diff] [blame] | 70 | # IMPORTANT: You'll need to change the content of `ftmodule.h' as well |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 71 | # if you modify this list or provide your own. |
| 72 | # |
David Turner | cf2c49c | 2003-12-24 18:42:04 +0000 | [diff] [blame] | 73 | FT2_COMPONENTS ?= autofit # auto-fitter |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 74 | base # base component (public APIs) |
| 75 | bdf # BDF font driver |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 76 | bzip2 # support for bzip2-compressed PCF font |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 77 | cache # cache sub-system |
| 78 | cff # CFF/CEF font driver |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 79 | cid # PostScript CID-keyed font driver |
suzuki toshiya | 34f4b20 | 2011-01-06 11:19:50 +0900 | [diff] [blame] | 80 | gzip # support for gzip-compressed PCF font |
| 81 | lzw # support for LZW-compressed PCF font |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 82 | pcf # PCF font driver |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 83 | pfr # PFR/TrueDoc font driver |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 84 | psaux # common PostScript routines module |
| 85 | pshinter # PostScript hinter module |
| 86 | psnames # PostScript names handling |
| 87 | raster # monochrome rasterizer |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 88 | sfnt # SFNT-based format support routines |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 89 | smooth # anti-aliased rasterizer |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 90 | truetype # TrueType font driver |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 91 | type1 # PostScript Type 1 font driver |
| 92 | type42 # PostScript Type 42 (embedded TrueType) driver |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 93 | winfonts # Windows FON/FNT font driver |
| 94 | ; |
| 95 | |
| 96 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 97 | # Don't touch. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 98 | # |
| 99 | FT2_INCLUDE = $(FT2_BUILD_INCLUDE) |
| 100 | [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ; |
| 101 | |
| 102 | FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ; |
| 103 | |
David Turner | 3c40d73 | 2003-08-17 22:31:23 +0000 | [diff] [blame] | 104 | # Location of API Reference Documentation |
| 105 | # |
| 106 | if $(DOC_DIR) |
| 107 | { |
| 108 | DOC_DIR = $(DOCDIR:T) ; |
| 109 | } |
| 110 | else |
| 111 | { |
| 112 | DOC_DIR = docs/reference ; |
| 113 | } |
| 114 | |
| 115 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 116 | # Only used by FreeType developers. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 117 | # |
David Turner | c9349c9 | 2001-10-18 11:59:08 +0000 | [diff] [blame] | 118 | if $(DEBUG_HINTER) |
| 119 | { |
| 120 | CCFLAGS += -DDEBUG_HINTER ; |
| 121 | } |
| 122 | |
| 123 | |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 124 | # We need `include' in the current include path in order to |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 125 | # compile any part of FreeType 2. |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 126 | # |
David Turner | cce3c80 | 2003-01-08 09:10:53 +0000 | [diff] [blame] | 127 | HDRS += $(FT2_INCLUDE) ; |
| 128 | |
David Turner | 2ce9203 | 2006-03-23 20:58:20 +0000 | [diff] [blame] | 129 | |
David Turner | ff0e9e6 | 2006-01-27 09:15:53 +0000 | [diff] [blame] | 130 | # We need to #define FT2_BUILD_LIBRARY so that our sources find the |
| 131 | # internal headers |
| 132 | # |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 133 | CCFLAGS += -DFT2_BUILD_LIBRARY ; |
David Turner | cce3c80 | 2003-01-08 09:10:53 +0000 | [diff] [blame] | 134 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 135 | # Uncomment the following line if you want to build individual source files |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 136 | # for each FreeType 2 module. This is only useful during development, and |
| 137 | # is better defined as an environment variable anyway! |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 138 | # |
Werner Lemberg | 1429db6 | 2001-04-02 23:54:01 +0000 | [diff] [blame] | 139 | # FT2_MULTI = true ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 140 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 141 | |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 142 | # The files `ftheader.h', `internal.h', and `ftserv.h' are used to define |
| 143 | # macros that are later used in #include statements. They need to be parsed |
| 144 | # in order to record these definitions. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 145 | # |
Werner Lemberg | 392cf22 | 2015-06-25 13:04:57 +0200 | [diff] [blame] | 146 | HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ; |
| 147 | HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal internal.h ] ; |
| 148 | HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 149 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 150 | |
Werner Lemberg | 8e6c56f | 2005-10-18 06:09:13 +0000 | [diff] [blame] | 151 | # Now include the Jamfile in `freetype2/src', used to drive the compilation |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 152 | # of each FreeType 2 component and/or module. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 153 | # |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 154 | SubInclude FT2_TOP $(FT2_SRC_DIR) ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 155 | |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 156 | # Handle the generation of the `ftexport.sym' file, which contains the list |
Werner Lemberg | 8e6c56f | 2005-10-18 06:09:13 +0000 | [diff] [blame] | 157 | # of exported symbols. This can be used on Unix by libtool. |
David Turner | 6c5299e | 2005-10-16 08:29:12 +0000 | [diff] [blame] | 158 | # |
| 159 | SubInclude FT2_TOP $(FT2_SRC_DIR) tools ; |
| 160 | |
| 161 | rule GenExportSymbols |
| 162 | { |
David Turner | 9fbd2ab | 2005-10-28 16:14:14 +0000 | [diff] [blame] | 163 | local apinames = apinames$(SUFEXE) ; |
suzuki toshiya | 83c877f | 2016-07-09 13:36:27 +0900 | [diff] [blame] | 164 | local aheader ; |
| 165 | local headers ; |
| 166 | |
| 167 | for aheader in [ Glob $(2) : *.h ] |
| 168 | { |
| 169 | switch $(aheader) |
| 170 | { |
| 171 | case */ftmac.h : |
| 172 | if ( $(MAC) || $(OS) = MACOSX ) { |
| 173 | headers += $(aheader) ; |
| 174 | } |
| 175 | case *.h : headers += $(aheader) ; |
| 176 | } |
| 177 | } |
David Turner | 6c5299e | 2005-10-16 08:29:12 +0000 | [diff] [blame] | 178 | |
David Turner | 8def3c8 | 2005-12-14 16:38:31 +0000 | [diff] [blame] | 179 | LOCATE on $(1) = $(ALL_LOCATE_TARGET) ; |
| 180 | |
David Turner | 6c5299e | 2005-10-16 08:29:12 +0000 | [diff] [blame] | 181 | APINAMES on $(1) = apinames$(SUFEXE) ; |
| 182 | |
David Turner | 9fbd2ab | 2005-10-28 16:14:14 +0000 | [diff] [blame] | 183 | Depends $(1) : $(apinames) $(headers) ; |
David Turner | 6c5299e | 2005-10-16 08:29:12 +0000 | [diff] [blame] | 184 | GenExportSymbols1 $(1) : $(headers) ; |
David Turner | 9fbd2ab | 2005-10-28 16:14:14 +0000 | [diff] [blame] | 185 | Clean clean : $(1) ; |
David Turner | 6c5299e | 2005-10-16 08:29:12 +0000 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | actions GenExportSymbols1 bind APINAMES |
| 189 | { |
| 190 | $(APINAMES) $(2) > $(1) |
| 191 | } |
| 192 | |
suzuki toshiya | 83c877f | 2016-07-09 13:36:27 +0900 | [diff] [blame] | 193 | GenExportSymbols ftexport.sym : include/freetype ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 194 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 195 | # Test files (hinter debugging). Only used by FreeType developers. |
David Turner | c9349c9 | 2001-10-18 11:59:08 +0000 | [diff] [blame] | 196 | # |
| 197 | if $(DEBUG_HINTER) |
| 198 | { |
| 199 | SubInclude FT2_TOP tests ; |
| 200 | } |
| 201 | |
David Turner | e6bb953 | 2005-12-23 13:32:06 +0000 | [diff] [blame] | 202 | rule RefDoc |
| 203 | { |
| 204 | Depends $1 : all ; |
| 205 | NotFile $1 ; |
| 206 | Always $1 ; |
| 207 | } |
| 208 | |
David Turner | 3c40d73 | 2003-08-17 22:31:23 +0000 | [diff] [blame] | 209 | actions RefDoc |
| 210 | { |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 211 | python $(FT2_SRC)/tools/docmaker/docmaker.py |
| 212 | --prefix=ft2 |
Werner Lemberg | 39ce3ac | 2017-09-16 19:08:17 +0200 | [diff] [blame] | 213 | --title=FreeType-2.8.1 |
Werner Lemberg | 31d97df | 2015-06-21 19:12:12 +0200 | [diff] [blame] | 214 | --output=$(DOC_DIR) |
Werner Lemberg | 392cf22 | 2015-06-25 13:04:57 +0200 | [diff] [blame] | 215 | $(FT2_INCLUDE)/freetype/*.h |
| 216 | $(FT2_INCLUDE)/freetype/config/*.h |
David Turner | 3c40d73 | 2003-08-17 22:31:23 +0000 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | RefDoc refdoc ; |
| 220 | |
| 221 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 222 | # end of top Jamfile |