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