2000-07-08 02:22:20 +02:00
|
|
|
#
|
|
|
|
# FreeType 2 library sub-Makefile
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2004-04-02 09:13:53 +02:00
|
|
|
# Copyright 1996-2000, 2001, 2002, 2003, 2004 by
|
2000-07-08 02:22:20 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
|
|
|
|
# OTHER MAKEFILES.
|
|
|
|
|
|
|
|
|
|
|
|
# The following variables (set by other Makefile components, in the
|
|
|
|
# environment, or on the command line) are used:
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
# BUILD_DIR The architecture dependent directory,
|
2002-06-14 10:09:25 +02:00
|
|
|
# e.g. `$(TOP_DIR)/builds/unix'.
|
2000-07-08 02:22:20 +02:00
|
|
|
#
|
|
|
|
# OBJ_DIR The directory in which object files are created.
|
|
|
|
#
|
|
|
|
# LIB_DIR The directory in which the library is created.
|
|
|
|
#
|
2003-07-09 17:20:32 +02:00
|
|
|
# DOC_DIR The directory in which the API reference is created.
|
|
|
|
#
|
2000-07-08 02:22:20 +02:00
|
|
|
# INCLUDES A list of directories to be included additionally.
|
|
|
|
# Usually empty.
|
|
|
|
#
|
|
|
|
# CFLAGS Compilation flags. This overrides the default settings
|
|
|
|
# in the platform-specific configuration files.
|
|
|
|
#
|
|
|
|
# FTSYS_SRC If set, its value is used as the name of a replacement
|
|
|
|
# file for `src/base/ftsystem.c'.
|
|
|
|
#
|
|
|
|
# FTDEBUG_SRC If set, its value is used as the name of a replacement
|
|
|
|
# file for `src/base/ftdebug.c'. [For a normal build, this
|
|
|
|
# file does nothing.]
|
|
|
|
#
|
|
|
|
# FT_MODULE_LIST The file which contains the list of modules for the
|
|
|
|
# current build. Usually, this is automatically created by
|
|
|
|
# `modules.mk'.
|
|
|
|
#
|
|
|
|
# BASE_OBJ_S
|
|
|
|
# BASE_OBJ_M A list of base objects (for single object and multiple
|
|
|
|
# object builds, respectively). Set up in
|
|
|
|
# `src/base/rules.mk'.
|
|
|
|
#
|
|
|
|
# BASE_EXT_OBJ A list of base extension objects. Set up in
|
|
|
|
# `src/base/rules.mk'.
|
|
|
|
#
|
|
|
|
# DRV_OBJ_S
|
|
|
|
# DRV_OBJ_M A list of driver objects (for single object and multiple
|
|
|
|
# object builds, respectively). Set up cumulatively in
|
|
|
|
# `src/<driver>/rules.mk'.
|
|
|
|
#
|
2000-07-20 08:57:41 +02:00
|
|
|
# CLEAN
|
|
|
|
# DISTCLEAN The sub-makefiles can append additional stuff to these two
|
|
|
|
# variables which is to be removed for the `clean' resp.
|
|
|
|
# `distclean' target.
|
|
|
|
#
|
2002-06-14 10:09:25 +02:00
|
|
|
# TOP_DIR, SEP,
|
2003-06-09 06:46:30 +02:00
|
|
|
# COMPILER_SEP,
|
2000-07-08 02:22:20 +02:00
|
|
|
# LIBRARY, CC,
|
|
|
|
# A, I, O, T Check `config.mk' for details.
|
|
|
|
|
|
|
|
|
|
|
|
# The targets `objects' and `library' are defined at the end of this
|
|
|
|
# Makefile after all other rules have been included.
|
|
|
|
#
|
2003-07-09 17:20:32 +02:00
|
|
|
.PHONY: single multi objects library refdoc
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
# default target -- build single objects and library
|
|
|
|
#
|
|
|
|
single: objects library
|
|
|
|
|
|
|
|
# `multi' target -- build multiple objects and library
|
|
|
|
#
|
|
|
|
multi: objects library
|
|
|
|
|
|
|
|
|
|
|
|
# The FreeType source directory, usually `./src'.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
SRC_DIR := $(TOP_DIR)/src
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
# The directory where the base layer components are placed, usually
|
|
|
|
# `./src/base'.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
BASE_DIR := $(SRC_DIR)/base
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-06-09 06:46:30 +02:00
|
|
|
# Other derived directories.
|
2000-07-08 02:22:20 +02:00
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
PUBLIC_DIR := $(TOP_DIR)/include/freetype
|
|
|
|
INTERNAL_DIR := $(PUBLIC_DIR)/internal
|
2003-09-16 09:57:25 +02:00
|
|
|
SERVICES_DIR := $(INTERNAL_DIR)/services
|
2003-06-09 06:46:30 +02:00
|
|
|
CONFIG_DIR := $(PUBLIC_DIR)/config
|
|
|
|
CACHE_DIR := $(PUBLIC_DIR)/cache
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-07-09 17:20:32 +02:00
|
|
|
# The documentation directory.
|
|
|
|
#
|
|
|
|
ifndef DOC_DIR
|
|
|
|
DOC_DIR := $(TOP_DIR)/docs/reference
|
|
|
|
endif
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
# The final name of the library file.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# include paths
|
|
|
|
#
|
|
|
|
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
|
|
|
|
# in front of the include list. Porters are then able to
|
|
|
|
# put their own version of some of the FreeType components
|
2000-07-08 02:41:13 +02:00
|
|
|
# in the `freetype/builds/<system>' directory, as these
|
2000-07-08 02:22:20 +02:00
|
|
|
# files will override the default sources.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) $(BUILD_DIR) \
|
|
|
|
$(TOP_DIR)/include)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
INCLUDE_FLAGS = $(INCLUDES:%=$I%)
|
|
|
|
|
|
|
|
|
|
|
|
# C flags used for the compilation of an object file. This must include at
|
2000-07-08 02:41:13 +02:00
|
|
|
# least the paths for the `base' and `builds/<system>' directories;
|
2000-07-08 02:22:20 +02:00
|
|
|
# debug/optimization/warning flags + ansi compliance if needed.
|
|
|
|
#
|
2002-02-19 17:30:15 +01:00
|
|
|
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
|
|
|
|
# old FreeType versions.
|
|
|
|
#
|
|
|
|
FT_CFLAGS = $(INCLUDE_FLAGS) $(CFLAGS)
|
2000-07-08 02:22:20 +02:00
|
|
|
FT_CC = $(CC) $(FT_CFLAGS)
|
|
|
|
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
# Include the `modules' rules file.
|
|
|
|
#
|
2002-06-14 10:09:25 +02:00
|
|
|
include $(TOP_DIR)/builds/modules.mk
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Initialize the list of objects.
|
|
|
|
#
|
|
|
|
OBJECTS_LIST :=
|
|
|
|
|
|
|
|
|
|
|
|
# Define $(PUBLIC_H) as the list of all public header files located in
|
2002-06-14 10:09:25 +02:00
|
|
|
# `$(TOP_DIR)/include/freetype'. $(BASE_H), $(CACHE_H), and $(CONFIG_H) are
|
2000-09-22 23:23:29 +02:00
|
|
|
# defined similarly.
|
2000-07-08 02:22:20 +02:00
|
|
|
#
|
|
|
|
# This is used to simplify the dependency rules -- if one of these files
|
|
|
|
# changes, the whole library is recompiled.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
|
2003-09-16 09:57:25 +02:00
|
|
|
BASE_H := $(wildcard $(INTERNAL_DIR)/*.h) \
|
|
|
|
$(wildcard $(SERVICES_DIR)/*.h)
|
2003-06-09 06:46:30 +02:00
|
|
|
CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
|
|
|
|
$(wildcard $(BUILD_DIR)/freetype/config/*.h)
|
|
|
|
CACHE_H := $(wildcard $(CACHE_DIR)/*.h)
|
|
|
|
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-06-09 06:46:30 +02:00
|
|
|
FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(CACHE_H) $(DEVEL_H)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# ftsystem component
|
|
|
|
#
|
|
|
|
ifndef FTSYS_SRC
|
2003-06-09 06:46:30 +02:00
|
|
|
FTSYS_SRC = $(BASE_DIR)/ftsystem.c
|
2000-07-08 02:22:20 +02:00
|
|
|
endif
|
|
|
|
|
2003-06-09 06:46:30 +02:00
|
|
|
FTSYS_OBJ = $(OBJ_DIR)/ftsystem.$O
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
OBJECTS_LIST += $(FTSYS_OBJ)
|
|
|
|
|
|
|
|
$(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
|
2003-06-09 06:46:30 +02:00
|
|
|
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# ftdebug component
|
|
|
|
#
|
|
|
|
ifndef FTDEBUG_SRC
|
2003-06-09 06:46:30 +02:00
|
|
|
FTDEBUG_SRC = $(BASE_DIR)/ftdebug.c
|
2000-07-08 02:22:20 +02:00
|
|
|
endif
|
|
|
|
|
2003-06-09 06:46:30 +02:00
|
|
|
FTDEBUG_OBJ = $(OBJ_DIR)/ftdebug.$O
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
OBJECTS_LIST += $(FTDEBUG_OBJ)
|
|
|
|
|
|
|
|
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
|
2003-06-09 06:46:30 +02:00
|
|
|
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Include all rule files from FreeType components.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
include $(wildcard $(SRC_DIR)/*/rules.mk)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# ftinit component
|
|
|
|
#
|
|
|
|
# The C source `ftinit.c' contains the FreeType initialization routines.
|
|
|
|
# It is able to automatically register one or more drivers when the API
|
|
|
|
# function FT_Init_FreeType() is called.
|
|
|
|
#
|
|
|
|
# The set of initial drivers is determined by the driver Makefiles
|
|
|
|
# includes above. Each driver Makefile updates the FTINIT_xxx lists
|
|
|
|
# which contain additional include paths and macros used to compile the
|
|
|
|
# single `ftinit.c' source.
|
|
|
|
#
|
2003-06-09 06:46:30 +02:00
|
|
|
FTINIT_SRC := $(BASE_DIR)/ftinit.c
|
|
|
|
FTINIT_OBJ := $(OBJ_DIR)/ftinit.$O
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
OBJECTS_LIST += $(FTINIT_OBJ)
|
|
|
|
|
|
|
|
$(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H) $(FT_MODULE_LIST)
|
2003-06-09 06:46:30 +02:00
|
|
|
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# All FreeType library objects
|
|
|
|
#
|
|
|
|
# By default, we include the base layer extensions. These could be
|
|
|
|
# omitted on builds which do not want them.
|
|
|
|
#
|
|
|
|
OBJ_M = $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M)
|
|
|
|
OBJ_S = $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S)
|
|
|
|
|
|
|
|
|
|
|
|
# The target `multi' on the Make command line indicates that we want to
|
|
|
|
# compile each source file independently.
|
|
|
|
#
|
|
|
|
# Otherwise, each module/driver is compiled in a single object file through
|
|
|
|
# source file inclusion (see `src/base/ftbase.c' or
|
|
|
|
# `src/truetype/truetype.c' for examples).
|
|
|
|
#
|
|
|
|
BASE_OBJECTS := $(OBJECTS_LIST)
|
|
|
|
|
|
|
|
ifneq ($(findstring multi,$(MAKECMDGOALS)),)
|
|
|
|
OBJECTS_LIST += $(OBJ_M)
|
|
|
|
else
|
|
|
|
OBJECTS_LIST += $(OBJ_S)
|
|
|
|
endif
|
|
|
|
|
|
|
|
objects: $(OBJECTS_LIST)
|
|
|
|
|
2000-09-16 00:42:06 +02:00
|
|
|
library: $(PROJECT_LIBRARY)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
.c.$O:
|
2003-06-09 06:46:30 +02:00
|
|
|
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2003-07-09 17:20:32 +02:00
|
|
|
refdoc:
|
|
|
|
python $(SRC_DIR)/tools/docmaker/docmaker.py \
|
|
|
|
--prefix=ft2 \
|
2004-04-24 16:43:37 +02:00
|
|
|
--title=FreeType-2.1.9 \
|
2003-07-09 17:20:32 +02:00
|
|
|
--output=$(DOC_DIR) \
|
|
|
|
$(PUBLIC_DIR)/*.h \
|
|
|
|
$(PUBLIC_DIR)/config/*.h \
|
|
|
|
$(PUBLIC_DIR)/cache/*.h
|
|
|
|
|
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
.PHONY: clean_project_std distclean_project_std
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
# Standard cleaning and distclean rules. These are not accepted
|
|
|
|
# on all systems though.
|
|
|
|
#
|
2000-09-16 00:42:06 +02:00
|
|
|
clean_project_std:
|
2000-07-20 08:57:41 +02:00
|
|
|
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) $(CLEAN)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-09-16 00:42:06 +02:00
|
|
|
distclean_project_std: clean_project_std
|
|
|
|
-$(DELETE) $(PROJECT_LIBRARY)
|
2000-07-20 08:57:41 +02:00
|
|
|
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
|
|
|
|
.PHONY: clean_project_dos distclean_project_dos
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
# The Dos command shell does not support very long list of arguments, so
|
|
|
|
# we are stuck with wildcards.
|
|
|
|
#
|
2002-05-02 08:50:58 +02:00
|
|
|
# Don't break the command lines with \; this prevents the "del" command from
|
2001-05-12 08:40:50 +02:00
|
|
|
# working correctly on Win9x.
|
* include/freetype/fttrigon.h, src/base/fttrigon.c, src/base/ftbase.c,
src/base/Jamfile, src/base/rules.mk: adding trigonometric functions
to the core API (using Cordic algorithms).
* builds/top_level.mk, builds/newline, builds/detect.mk: fixed problems
with Make on Windows 2000, as well as problems when "make distclean" is
invoked on a non-Unix platform when there is no "config.mk" in the
current directory..
* builds/freetype.mk: fixed a problem with object deletions under
Dos/Windows/OS/2 systems
* src/tools: added new directory to hold tools and test programs
moved docmaker.py, glnames.py to it..
* src/tools/docmaker.py: improved the script to add the current date
at the footer of each web page (useful to distinguish between versions)
* Jamfile: fixed incorrect HDRMACRO argument.
* TODO: removed the cubic arc bbox computation note, since it has been
fixed recently..
* include/freetype/t1tables.h, include/freetype/config/ftoption.h:
formatting
2001-05-11 16:25:57 +02:00
|
|
|
#
|
2000-09-16 00:42:06 +02:00
|
|
|
clean_project_dos:
|
2003-06-09 06:46:30 +02:00
|
|
|
-$(DELETE) $(subst /,\,$(OBJ)/*.$O $(CLEAN) $(NO_OUTPUT))
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-09-16 00:42:06 +02:00
|
|
|
distclean_project_dos: clean_project_dos
|
2003-06-09 06:46:30 +02:00
|
|
|
-$(DELETE) $(subst /,\,$(PROJECT_LIBRARY) $(DISTCLEAN) $(NO_OUTPUT))
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
|
|
|
|
.PHONY: remove_config_mk
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
# Remove configuration file (used for distclean).
|
|
|
|
#
|
|
|
|
remove_config_mk:
|
2003-06-09 06:46:30 +02:00
|
|
|
-$(DELETE) $(subst /,$(SEP),$(CONFIG_MK) $(NO_OUTPUT))
|
2000-07-08 02:22:20 +02:00
|
|
|
|
|
|
|
|
2000-12-20 23:09:41 +01:00
|
|
|
.PHONY: clean distclean
|
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
# The `config.mk' file must define `clean_freetype' and
|
|
|
|
# `distclean_freetype'. Implementations may use to relay these to either
|
|
|
|
# the `std' or `dos' versions from above, or simply provide their own
|
|
|
|
# implementation.
|
|
|
|
#
|
2000-09-16 00:42:06 +02:00
|
|
|
clean: clean_project
|
|
|
|
distclean: distclean_project remove_config_mk
|
2003-07-09 17:20:32 +02:00
|
|
|
-$(DELETE) $(subst /,$(SEP),$(DOC_DIR)/*.html $(NO_OUTPUT))
|
2000-07-08 02:22:20 +02:00
|
|
|
|
2003-06-09 06:46:30 +02:00
|
|
|
|
2000-07-08 02:22:20 +02:00
|
|
|
# EOF
|