blob: 9d263749881659d308397f18a193e3dc6d41ca06 [file] [log] [blame]
Werner Lemberg6b3d00e2004-02-03 21:34:29 +00001# FreeType 2 top Jamfile (c) 2001, 2002, 2003, 2004 David Turner
David Turner5bf0a392001-03-24 17:10:09 +00002#
3
David Turner60b32e12002-11-06 22:32:54 +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 Turner60b32e12002-11-06 22:32:54 +00009# the following code
10#
11if ! $(JAM_TOOLSET)
12{
13 rule HDRMACRO
14 {
Werner Lemberga16c4a72003-04-21 13:30:27 +000015 # nothing
David Turner60b32e12002-11-06 22:32:54 +000016 }
17}
18
Werner Lemberga16c4a72003-04-21 13:30:27 +000019
Werner Lemberga1844e02001-04-03 21:07:36 +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.
David Turner5bf0a392001-03-24 17:10:09 +000023#
24if $(FT2_TOP) != $(DOT)
25{
Werner Lemberga1844e02001-04-03 21:07:36 +000026 SubDir FT2_TOP ;
David Turner5bf0a392001-03-24 17:10:09 +000027}
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 Turner60b32e12002-11-06 22:32:54 +000032# replaced by other definitions when the library is compiled as part of
33# a larger project.
34#
David Turner5bf0a392001-03-24 17:10:09 +000035
Werner Lemberga16c4a72003-04-21 13:30:27 +000036# Name of FreeType include directory during compilation.
37# This is relative to FT2_TOP.
David Turner60b32e12002-11-06 22:32:54 +000038#
39FT2_INCLUDE_DIR ?= include ;
David Turner5bf0a392001-03-24 17:10:09 +000040
Werner Lemberga16c4a72003-04-21 13:30:27 +000041# Name of FreeType source directory during compilation.
42# This is relative to FT2_TOP.
David Turner60b32e12002-11-06 22:32:54 +000043#
44FT2_SRC_DIR ?= src ;
45
Werner Lemberga16c4a72003-04-21 13:30:27 +000046# Name of final library, without extension.
David Turner60b32e12002-11-06 22:32:54 +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 Turner60b32e12002-11-06 22:32:54 +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 Turner60b32e12002-11-06 22:32:54 +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 Turner60b32e12002-11-06 22:32:54 +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#
David Turnercf2c49c2003-12-24 18:42:04 +000064FT2_COMPONENTS ?= autofit # auto-fitter
David Turner60b32e12002-11-06 22:32:54 +000065 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 Lemberga16c4a72003-04-21 13:30:27 +000070 cid # PostScript CID-keyed font driver
Werner Lembergdfa46192004-03-05 09:26:24 +000071 gzip # support for gzip-compressed files
72 lzw # support for LZW-compressed files
David Turner60b32e12002-11-06 22:32:54 +000073 pcf # PCF font driver
74 pfr # PFR/TrueDoc font driver
Werner Lemberga16c4a72003-04-21 13:30:27 +000075 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 Turner60b32e12002-11-06 22:32:54 +000080 sfnt # SFNT-based format support routines
81 truetype # TrueType font driver
Werner Lemberga16c4a72003-04-21 13:30:27 +000082 type1 # PostScript Type 1 font driver
83 type42 # PostScript Type 42 (embedded TrueType) driver
David Turner60b32e12002-11-06 22:32:54 +000084 winfonts # Windows FON/FNT font driver
85 ;
86
87
Werner Lemberga16c4a72003-04-21 13:30:27 +000088# Don't touch.
David Turner60b32e12002-11-06 22:32:54 +000089#
90FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
91 [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
92
93FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
94
David Turner3c40d732003-08-17 22:31:23 +000095# Location of API Reference Documentation
96#
97if $(DOC_DIR)
98{
99 DOC_DIR = $(DOCDIR:T) ;
100}
101else
102{
103 DOC_DIR = docs/reference ;
104}
105
106
Werner Lemberga16c4a72003-04-21 13:30:27 +0000107# Only used by FreeType developers.
David Turner60b32e12002-11-06 22:32:54 +0000108#
David Turnerc9349c92001-10-18 11:59:08 +0000109if $(DEBUG_HINTER)
110{
111 CCFLAGS += -DDEBUG_HINTER ;
112}
113
114
Werner Lemberga1844e02001-04-03 21:07:36 +0000115# We need "freetype2/include" in the current include path in order to
116# compile any part of FreeType 2.
David Turner5bf0a392001-03-24 17:10:09 +0000117#
David Turnercce3c802003-01-08 09:10:53 +0000118HDRS += $(FT2_INCLUDE) ;
119
120
Werner Lemberga1844e02001-04-03 21:07:36 +0000121# Uncomment the following line if you want to build individual source files
Werner Lemberga16c4a72003-04-21 13:30:27 +0000122# for each FreeType 2 module. This is only useful during development, and
123# is better defined as an environment variable anyway!
David Turner5bf0a392001-03-24 17:10:09 +0000124#
Werner Lemberg1429db62001-04-02 23:54:01 +0000125# FT2_MULTI = true ;
David Turner5bf0a392001-03-24 17:10:09 +0000126
Werner Lemberga16c4a72003-04-21 13:30:27 +0000127
David Turner6059b032001-05-14 14:01:00 +0000128# The file <freetype/config/ftheader.h> is used to define macros that are
Werner Lemberga1844e02001-04-03 21:07:36 +0000129# later used in #include statements. It needs to be parsed in order to
130# record these definitions.
David Turner5bf0a392001-03-24 17:10:09 +0000131#
David Turnerb3de8172001-05-11 14:25:02 +0000132HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
David Turnerc9349c92001-10-18 11:59:08 +0000133HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
David Turner5bf0a392001-03-24 17:10:09 +0000134
Werner Lemberga16c4a72003-04-21 13:30:27 +0000135
Werner Lemberga1844e02001-04-03 21:07:36 +0000136# Now include the Jamfile in "freetype2/src", used to drive the compilation
137# of each FreeType 2 component and/or module.
David Turner5bf0a392001-03-24 17:10:09 +0000138#
David Turner60b32e12002-11-06 22:32:54 +0000139SubInclude FT2_TOP $(FT2_SRC_DIR) ;
David Turner5bf0a392001-03-24 17:10:09 +0000140
141
Werner Lemberga16c4a72003-04-21 13:30:27 +0000142# Test files (hinter debugging). Only used by FreeType developers.
David Turnerc9349c92001-10-18 11:59:08 +0000143#
144if $(DEBUG_HINTER)
145{
146 SubInclude FT2_TOP tests ;
147}
148
David Turner3c40d732003-08-17 22:31:23 +0000149actions RefDoc
150{
Werner Lemberg17439422004-08-11 05:25:37 +0000151 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 Turner3c40d732003-08-17 22:31:23 +0000152}
153
154RefDoc refdoc ;
155
156
Werner Lemberga1844e02001-04-03 21:07:36 +0000157# end of top Jamfile