Werner Lemberg | 6b3d00e | 2004-02-03 21:34:29 +0000 | [diff] [blame] | 1 | # FreeType 2 top Jamfile (c) 2001, 2002, 2003, 2004 David Turner |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 2 | # |
| 3 | |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 4 | # The HDRMACRO is already defined in FTJam and is used to add |
| 5 | # the content of certain macros to the list of included header |
| 6 | # files. |
| 7 | # |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 8 | # We can compile FreeType 2 with classic Jam however thanks to |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 9 | # the following code |
| 10 | # |
| 11 | if ! $(JAM_TOOLSET) |
| 12 | { |
| 13 | rule HDRMACRO |
| 14 | { |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 15 | # nothing |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 16 | } |
| 17 | } |
| 18 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 19 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 20 | # We need to invoke a SubDir rule if the FT2 source directory top is not the |
| 21 | # current directory. This allows us to build FreeType 2 as part of a larger |
| 22 | # project easily. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 23 | # |
| 24 | if $(FT2_TOP) != $(DOT) |
| 25 | { |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 26 | SubDir FT2_TOP ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 27 | } |
| 28 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 29 | |
| 30 | # The following macros define the include directory, the source directory, |
| 31 | # and the final library name (without library extensions). They can be |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 32 | # replaced by other definitions when the library is compiled as part of |
| 33 | # a larger project. |
| 34 | # |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 35 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 36 | # Name of FreeType include directory during compilation. |
| 37 | # This is relative to FT2_TOP. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 38 | # |
| 39 | FT2_INCLUDE_DIR ?= include ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 40 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 41 | # Name of FreeType source directory during compilation. |
| 42 | # This is relative to FT2_TOP. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 43 | # |
| 44 | FT2_SRC_DIR ?= src ; |
| 45 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 46 | # Name of final library, without extension. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 47 | # |
| 48 | FT2_LIB ?= $(LIBPREFIX)freetype ; |
| 49 | |
| 50 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 51 | # Define FT2_BUILD_INCLUDE to point to your build-specific directory. |
| 52 | # 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] | 53 | # the location of a custom <ft2build.h> which will point to custom |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 54 | # versions of "ftmodule.h" and "ftoption.h", for example. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 55 | # |
| 56 | FT2_BUILD_INCLUDE ?= ; |
| 57 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 58 | # The list of modules to compile on any given build of the library. |
| 59 | # By default, this will contain _all_ modules defined in FT2_SRC_DIR. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 60 | # |
| 61 | # IMPORTANT: You'll need to change the content of "ftmodule.h" as well |
| 62 | # if you modify this list or provide your own. |
| 63 | # |
David Turner | cf2c49c | 2003-12-24 18:42:04 +0000 | [diff] [blame] | 64 | FT2_COMPONENTS ?= autofit # auto-fitter |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 65 | autohint # auto-hinter |
| 66 | base # base component (public APIs) |
| 67 | bdf # BDF font driver |
| 68 | cache # cache sub-system |
| 69 | cff # CFF/CEF font driver |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 70 | cid # PostScript CID-keyed font driver |
Werner Lemberg | dfa4619 | 2004-03-05 09:26:24 +0000 | [diff] [blame] | 71 | gzip # support for gzip-compressed files |
| 72 | lzw # support for LZW-compressed files |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 73 | pcf # PCF font driver |
| 74 | pfr # PFR/TrueDoc font driver |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 75 | psaux # common PostScript routines module |
| 76 | pshinter # PostScript hinter module |
| 77 | psnames # PostScript names handling |
| 78 | raster # monochrome rasterizer |
| 79 | smooth # anti-aliased rasterizer |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 80 | sfnt # SFNT-based format support routines |
| 81 | truetype # TrueType font driver |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 82 | type1 # PostScript Type 1 font driver |
| 83 | type42 # PostScript Type 42 (embedded TrueType) driver |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 84 | winfonts # Windows FON/FNT font driver |
| 85 | ; |
| 86 | |
| 87 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 88 | # Don't touch. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 89 | # |
| 90 | FT2_INCLUDE = $(FT2_BUILD_INCLUDE) |
| 91 | [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ; |
| 92 | |
| 93 | FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ; |
| 94 | |
David Turner | 3c40d73 | 2003-08-17 22:31:23 +0000 | [diff] [blame] | 95 | # Location of API Reference Documentation |
| 96 | # |
| 97 | if $(DOC_DIR) |
| 98 | { |
| 99 | DOC_DIR = $(DOCDIR:T) ; |
| 100 | } |
| 101 | else |
| 102 | { |
| 103 | DOC_DIR = docs/reference ; |
| 104 | } |
| 105 | |
| 106 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 107 | # Only used by FreeType developers. |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 108 | # |
David Turner | c9349c9 | 2001-10-18 11:59:08 +0000 | [diff] [blame] | 109 | if $(DEBUG_HINTER) |
| 110 | { |
| 111 | CCFLAGS += -DDEBUG_HINTER ; |
| 112 | } |
| 113 | |
| 114 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 115 | # We need "freetype2/include" in the current include path in order to |
| 116 | # compile any part of FreeType 2. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 117 | # |
David Turner | cce3c80 | 2003-01-08 09:10:53 +0000 | [diff] [blame] | 118 | HDRS += $(FT2_INCLUDE) ; |
| 119 | |
| 120 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 121 | # Uncomment the following line if you want to build individual source files |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 122 | # for each FreeType 2 module. This is only useful during development, and |
| 123 | # is better defined as an environment variable anyway! |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 124 | # |
Werner Lemberg | 1429db6 | 2001-04-02 23:54:01 +0000 | [diff] [blame] | 125 | # FT2_MULTI = true ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 126 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 127 | |
David Turner | 6059b03 | 2001-05-14 14:01:00 +0000 | [diff] [blame] | 128 | # The file <freetype/config/ftheader.h> is used to define macros that are |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 129 | # later used in #include statements. It needs to be parsed in order to |
| 130 | # record these definitions. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 131 | # |
David Turner | b3de817 | 2001-05-11 14:25:02 +0000 | [diff] [blame] | 132 | HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ; |
David Turner | c9349c9 | 2001-10-18 11:59:08 +0000 | [diff] [blame] | 133 | HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 134 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 135 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 136 | # Now include the Jamfile in "freetype2/src", used to drive the compilation |
| 137 | # of each FreeType 2 component and/or module. |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 138 | # |
David Turner | 60b32e1 | 2002-11-06 22:32:54 +0000 | [diff] [blame] | 139 | SubInclude FT2_TOP $(FT2_SRC_DIR) ; |
David Turner | 5bf0a39 | 2001-03-24 17:10:09 +0000 | [diff] [blame] | 140 | |
| 141 | |
Werner Lemberg | a16c4a7 | 2003-04-21 13:30:27 +0000 | [diff] [blame] | 142 | # Test files (hinter debugging). Only used by FreeType developers. |
David Turner | c9349c9 | 2001-10-18 11:59:08 +0000 | [diff] [blame] | 143 | # |
| 144 | if $(DEBUG_HINTER) |
| 145 | { |
| 146 | SubInclude FT2_TOP tests ; |
| 147 | } |
| 148 | |
David Turner | 3c40d73 | 2003-08-17 22:31:23 +0000 | [diff] [blame] | 149 | actions RefDoc |
| 150 | { |
Werner Lemberg | 1743942 | 2004-08-11 05:25:37 +0000 | [diff] [blame] | 151 | python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.1.10 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h $(FT2_INCLUDE)/freetype/cache/*.h |
David Turner | 3c40d73 | 2003-08-17 22:31:23 +0000 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | RefDoc refdoc ; |
| 155 | |
| 156 | |
Werner Lemberg | a1844e0 | 2001-04-03 21:07:36 +0000 | [diff] [blame] | 157 | # end of top Jamfile |