blob: c933cd92de6fa5e67cd14dd0a31d47905df54bca [file] [log] [blame]
Werner Lemberga16c4a72003-04-21 13:30:27 +00001# FreeType 2 top Jamfile (c) 2001, 2002, 2003 David Turner
David Turner2c7558c2002-04-11 14:21:16 +00002#
3
David Turner20e33152003-01-07 22:54:02 +00004# 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 Lemberga16c4a72003-04-21 13:30:27 +00008# We can compile FreeType 2 with classic Jam however thanks to
David Turner20e33152003-01-07 22:54:02 +00009# the following code
10#
11if ! $(JAM_TOOLSET)
12{
13 rule HDRMACRO
14 {
Werner Lemberga16c4a72003-04-21 13:30:27 +000015 # nothing
David Turner20e33152003-01-07 22:54:02 +000016 }
17}
18
Werner Lemberga16c4a72003-04-21 13:30:27 +000019
David Turner2c7558c2002-04-11 14:21:16 +000020# 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.
23#
24if $(FT2_TOP) != $(DOT)
25{
26 SubDir FT2_TOP ;
27}
28
Werner Lemberga16c4a72003-04-21 13:30:27 +000029
30# The following macros define the include directory, the source directory,
31# and the final library name (without library extensions). They can be
David Turner20e33152003-01-07 22:54:02 +000032# replaced by other definitions when the library is compiled as part of
33# a larger project.
David Turner2c7558c2002-04-11 14:21:16 +000034#
35
Werner Lemberga16c4a72003-04-21 13:30:27 +000036# Name of FreeType include directory during compilation.
37# This is relative to FT2_TOP.
David Turner20e33152003-01-07 22:54:02 +000038#
39FT2_INCLUDE_DIR ?= include ;
40
Werner Lemberga16c4a72003-04-21 13:30:27 +000041# Name of FreeType source directory during compilation.
42# This is relative to FT2_TOP.
David Turner20e33152003-01-07 22:54:02 +000043#
44FT2_SRC_DIR ?= src ;
45
Werner Lemberga16c4a72003-04-21 13:30:27 +000046# Name of final library, without extension.
David Turner20e33152003-01-07 22:54:02 +000047#
48FT2_LIB ?= $(LIBPREFIX)freetype ;
49
50
Werner Lemberga16c4a72003-04-21 13:30:27 +000051# 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 Turner20e33152003-01-07 22:54:02 +000053# the location of a custom <ft2build.h> which will point to custom
Werner Lemberga16c4a72003-04-21 13:30:27 +000054# versions of "ftmodule.h" and "ftoption.h", for example.
David Turner20e33152003-01-07 22:54:02 +000055#
56FT2_BUILD_INCLUDE ?= ;
57
Werner Lemberga16c4a72003-04-21 13:30:27 +000058# 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 Turner20e33152003-01-07 22:54:02 +000060#
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#
Werner Lemberga16c4a72003-04-21 13:30:27 +000064FT2_COMPONENTS ?= gzip # support for gzip-compressed files
David Turner20e33152003-01-07 22:54:02 +000065 autohint # auto-hinter
66 base # base component (public APIs)
67 bdf # BDF font driver
68 cache # cache sub-system
David Turner20e33152003-01-07 22:54:02 +000069 cff # CFF/CEF font driver
Werner Lemberga16c4a72003-04-21 13:30:27 +000070 cid # PostScript CID-keyed font driver
David Turner20e33152003-01-07 22:54:02 +000071 pcf # PCF font driver
72 pfr # PFR/TrueDoc font driver
Werner Lemberga16c4a72003-04-21 13:30:27 +000073 psaux # common PostScript routines module
74 pshinter # PostScript hinter module
75 psnames # PostScript names handling
76 raster # monochrome rasterizer
77 smooth # anti-aliased rasterizer
David Turner20e33152003-01-07 22:54:02 +000078 sfnt # SFNT-based format support routines
79 truetype # TrueType font driver
Werner Lemberga16c4a72003-04-21 13:30:27 +000080 type1 # PostScript Type 1 font driver
81 type42 # PostScript Type 42 (embedded TrueType) driver
David Turner20e33152003-01-07 22:54:02 +000082 winfonts # Windows FON/FNT font driver
83 ;
84
85
Werner Lemberga16c4a72003-04-21 13:30:27 +000086# Don't touch.
David Turner20e33152003-01-07 22:54:02 +000087#
88FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
89 [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
90
91FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
92
Werner Lemberga16c4a72003-04-21 13:30:27 +000093# Only used by FreeType developers.
David Turner2c7558c2002-04-11 14:21:16 +000094#
95if $(DEBUG_HINTER)
96{
97 CCFLAGS += -DDEBUG_HINTER ;
98}
99
100
101# We need "freetype2/include" in the current include path in order to
102# compile any part of FreeType 2.
103#
David Turner4bdf4352003-01-30 23:24:18 +0000104HDRS += $(FT2_INCLUDE) ;
105
106
David Turner2c7558c2002-04-11 14:21:16 +0000107# Uncomment the following line if you want to build individual source files
Werner Lemberga16c4a72003-04-21 13:30:27 +0000108# for each FreeType 2 module. This is only useful during development, and
109# is better defined as an environment variable anyway!
David Turner2c7558c2002-04-11 14:21:16 +0000110#
111# FT2_MULTI = true ;
112
Werner Lemberga16c4a72003-04-21 13:30:27 +0000113
David Turner2c7558c2002-04-11 14:21:16 +0000114# The file <freetype/config/ftheader.h> is used to define macros that are
115# later used in #include statements. It needs to be parsed in order to
116# record these definitions.
117#
118HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
119HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
120
Werner Lemberga16c4a72003-04-21 13:30:27 +0000121
David Turner2c7558c2002-04-11 14:21:16 +0000122# Now include the Jamfile in "freetype2/src", used to drive the compilation
123# of each FreeType 2 component and/or module.
124#
David Turner60b32e12002-11-06 22:32:54 +0000125SubInclude FT2_TOP $(FT2_SRC_DIR) ;
David Turner2c7558c2002-04-11 14:21:16 +0000126
127
Werner Lemberga16c4a72003-04-21 13:30:27 +0000128# Test files (hinter debugging). Only used by FreeType developers.
David Turner2c7558c2002-04-11 14:21:16 +0000129#
130if $(DEBUG_HINTER)
131{
132 SubInclude FT2_TOP tests ;
133}
134
135# end of top Jamfile