2006-11-25 11:44:16 -07:00
|
|
|
# FreeType 2 top Jamfile.
|
|
|
|
#
|
2017-06-23 10:15:17 -06:00
|
|
|
# Copyright 2001-2017 by
|
2006-11-25 11:44:16 -07:00
|
|
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
#
|
|
|
|
# This file is part of the FreeType project, and may only be used, modified,
|
|
|
|
# and distributed under the terms of the FreeType project license,
|
|
|
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
|
|
|
# indicate that you have read the license and understand and accept it
|
|
|
|
# fully.
|
|
|
|
|
|
|
|
|
|
|
|
# The HDRMACRO is already defined in FTJam and is used to add
|
|
|
|
# the content of certain macros to the list of included header
|
|
|
|
# files.
|
|
|
|
#
|
|
|
|
# We can compile FreeType 2 with classic Jam however thanks to
|
|
|
|
# the following code
|
|
|
|
#
|
|
|
|
if ! $(JAM_TOOLSET)
|
|
|
|
{
|
|
|
|
rule HDRMACRO
|
|
|
|
{
|
|
|
|
# nothing
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# We need to invoke a SubDir rule if the FT2 source directory top is not the
|
|
|
|
# current directory. This allows us to build FreeType 2 as part of a larger
|
|
|
|
# project easily.
|
|
|
|
#
|
|
|
|
if $(FT2_TOP) != $(DOT)
|
|
|
|
{
|
|
|
|
SubDir FT2_TOP ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# The following macros define the include directory, the source directory,
|
|
|
|
# and the final library name (without library extensions). They can be
|
|
|
|
# replaced by other definitions when the library is compiled as part of
|
|
|
|
# a larger project.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Name of FreeType include directory during compilation.
|
|
|
|
# This is relative to FT2_TOP.
|
|
|
|
#
|
|
|
|
FT2_INCLUDE_DIR ?= include ;
|
|
|
|
|
|
|
|
# Name of FreeType source directory during compilation.
|
|
|
|
# This is relative to FT2_TOP.
|
|
|
|
#
|
|
|
|
FT2_SRC_DIR ?= src ;
|
|
|
|
|
|
|
|
# Name of final library, without extension.
|
|
|
|
#
|
|
|
|
FT2_LIB ?= $(LIBPREFIX)freetype ;
|
|
|
|
|
|
|
|
|
|
|
|
# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
|
|
|
|
# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
|
|
|
|
# the location of a custom <ft2build.h> which will point to custom
|
|
|
|
# versions of `ftmodule.h' and `ftoption.h', for example.
|
|
|
|
#
|
|
|
|
FT2_BUILD_INCLUDE ?= ;
|
|
|
|
|
|
|
|
# The list of modules to compile on any given build of the library.
|
|
|
|
# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
|
|
|
|
#
|
|
|
|
# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
|
|
|
|
# if you modify this list or provide your own.
|
|
|
|
#
|
|
|
|
FT2_COMPONENTS ?= autofit # auto-fitter
|
|
|
|
base # base component (public APIs)
|
|
|
|
bdf # BDF font driver
|
2015-10-19 01:51:34 -06:00
|
|
|
bzip2 # support for bzip2-compressed PCF font
|
2006-11-25 11:44:16 -07:00
|
|
|
cache # cache sub-system
|
|
|
|
cff # CFF/CEF font driver
|
|
|
|
cid # PostScript CID-keyed font driver
|
2011-07-18 14:29:56 -06:00
|
|
|
gzip # support for gzip-compressed PCF font
|
|
|
|
lzw # support for LZW-compressed PCF font
|
2015-10-19 01:51:34 -06:00
|
|
|
pcf # PCF font driver
|
2006-11-25 11:44:16 -07:00
|
|
|
pfr # PFR/TrueDoc font driver
|
|
|
|
psaux # common PostScript routines module
|
|
|
|
pshinter # PostScript hinter module
|
|
|
|
psnames # PostScript names handling
|
|
|
|
raster # monochrome rasterizer
|
|
|
|
sfnt # SFNT-based format support routines
|
2015-10-19 01:51:34 -06:00
|
|
|
smooth # anti-aliased rasterizer
|
2006-11-25 11:44:16 -07:00
|
|
|
truetype # TrueType font driver
|
|
|
|
type1 # PostScript Type 1 font driver
|
|
|
|
type42 # PostScript Type 42 (embedded TrueType) driver
|
|
|
|
winfonts # Windows FON/FNT font driver
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
# Don't touch.
|
|
|
|
#
|
|
|
|
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
|
|
|
|
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
|
|
|
|
|
|
|
|
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
|
|
|
|
|
|
|
|
# Location of API Reference Documentation
|
|
|
|
#
|
|
|
|
if $(DOC_DIR)
|
|
|
|
{
|
|
|
|
DOC_DIR = $(DOCDIR:T) ;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DOC_DIR = docs/reference ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Only used by FreeType developers.
|
|
|
|
#
|
|
|
|
if $(DEBUG_HINTER)
|
|
|
|
{
|
|
|
|
CCFLAGS += -DDEBUG_HINTER ;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-10-19 01:51:34 -06:00
|
|
|
# We need `include' in the current include path in order to
|
2006-11-25 11:44:16 -07:00
|
|
|
# compile any part of FreeType 2.
|
2015-10-19 01:51:34 -06:00
|
|
|
#
|
2006-11-25 11:44:16 -07:00
|
|
|
HDRS += $(FT2_INCLUDE) ;
|
|
|
|
|
|
|
|
|
|
|
|
# We need to #define FT2_BUILD_LIBRARY so that our sources find the
|
|
|
|
# internal headers
|
|
|
|
#
|
2015-10-19 01:51:34 -06:00
|
|
|
CCFLAGS += -DFT2_BUILD_LIBRARY ;
|
2006-11-25 11:44:16 -07:00
|
|
|
|
|
|
|
# Uncomment the following line if you want to build individual source files
|
|
|
|
# for each FreeType 2 module. This is only useful during development, and
|
|
|
|
# is better defined as an environment variable anyway!
|
|
|
|
#
|
|
|
|
# FT2_MULTI = true ;
|
|
|
|
|
|
|
|
|
2015-10-19 01:51:34 -06:00
|
|
|
# The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
|
|
|
|
# macros that are later used in #include statements. They need to be parsed
|
|
|
|
# in order to record these definitions.
|
2006-11-25 11:44:16 -07:00
|
|
|
#
|
2015-10-19 01:51:34 -06:00
|
|
|
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ;
|
|
|
|
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal internal.h ] ;
|
|
|
|
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ;
|
2006-11-25 11:44:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
# Now include the Jamfile in `freetype2/src', used to drive the compilation
|
|
|
|
# of each FreeType 2 component and/or module.
|
|
|
|
#
|
|
|
|
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
|
|
|
|
|
2015-10-19 01:51:34 -06:00
|
|
|
# Handle the generation of the `ftexport.sym' file, which contains the list
|
2006-11-25 11:44:16 -07:00
|
|
|
# of exported symbols. This can be used on Unix by libtool.
|
|
|
|
#
|
|
|
|
SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
|
|
|
|
|
|
|
|
rule GenExportSymbols
|
|
|
|
{
|
|
|
|
local apinames = apinames$(SUFEXE) ;
|
2016-08-09 01:16:08 -06:00
|
|
|
local aheader ;
|
|
|
|
local headers ;
|
|
|
|
|
|
|
|
for aheader in [ Glob $(2) : *.h ]
|
|
|
|
{
|
|
|
|
switch $(aheader)
|
|
|
|
{
|
|
|
|
case */ftmac.h :
|
|
|
|
if ( $(MAC) || $(OS) = MACOSX ) {
|
|
|
|
headers += $(aheader) ;
|
|
|
|
}
|
|
|
|
case *.h : headers += $(aheader) ;
|
|
|
|
}
|
|
|
|
}
|
2006-11-25 11:44:16 -07:00
|
|
|
|
|
|
|
LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
|
|
|
|
|
|
|
|
APINAMES on $(1) = apinames$(SUFEXE) ;
|
|
|
|
|
|
|
|
Depends $(1) : $(apinames) $(headers) ;
|
|
|
|
GenExportSymbols1 $(1) : $(headers) ;
|
|
|
|
Clean clean : $(1) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
actions GenExportSymbols1 bind APINAMES
|
|
|
|
{
|
|
|
|
$(APINAMES) $(2) > $(1)
|
|
|
|
}
|
|
|
|
|
2016-08-09 01:16:08 -06:00
|
|
|
GenExportSymbols ftexport.sym : include/freetype ;
|
2006-11-25 11:44:16 -07:00
|
|
|
|
|
|
|
# Test files (hinter debugging). Only used by FreeType developers.
|
|
|
|
#
|
|
|
|
if $(DEBUG_HINTER)
|
|
|
|
{
|
|
|
|
SubInclude FT2_TOP tests ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule RefDoc
|
|
|
|
{
|
|
|
|
Depends $1 : all ;
|
|
|
|
NotFile $1 ;
|
|
|
|
Always $1 ;
|
|
|
|
}
|
|
|
|
|
|
|
|
actions RefDoc
|
|
|
|
{
|
2015-10-19 01:51:34 -06:00
|
|
|
python $(FT2_SRC)/tools/docmaker/docmaker.py
|
|
|
|
--prefix=ft2
|
2017-06-23 10:15:17 -06:00
|
|
|
--title=FreeType-2.8
|
2015-10-19 01:51:34 -06:00
|
|
|
--output=$(DOC_DIR)
|
|
|
|
$(FT2_INCLUDE)/freetype/*.h
|
|
|
|
$(FT2_INCLUDE)/freetype/config/*.h
|
2006-11-25 11:44:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
RefDoc refdoc ;
|
|
|
|
|
|
|
|
|
|
|
|
# end of top Jamfile
|