A first check of FT2's Make system. Many smaller and larger bugs have been

fixed:

. Removing unused variables.

. detect.mk files now must provide $(CONFIG_FILE) and not $(CONFIG_RULE).

. ansi.mk will now be really used as a fallback if the detect mechanism
  fails.

. ANSIFLAGS will now be really used (fixing a typo).

. `make clean' now works (again two typos).

. Detection of gcc on Unix has been fixed (using the `-v' option instead of
  `--version').

. `make devel' now works (on Unix).

. Fixing *again* a bug in demos/graph/x11/rules.mk to allow multiple use
  of `-L' compiler options.

. $(BASE_H) now contains a few more header files.

As usual, a lot of formatting (not finished yet).
This commit is contained in:
Werner Lemberg 2000-03-05 01:14:19 +00:00
parent 8c5c932e46
commit febe3fbeba
24 changed files with 1217 additions and 1454 deletions

139
Makefile
View File

@ -1,108 +1,103 @@
#****************************************************************************** #
#* # FreeType 2 build system -- top-level Makefile
#* FreeType build system - top-level Makefile #
#*
#* This file is designed for GNU Make, do not use it with another Make tool.
#* It works as follows : # Copyright 1996-2000 by
#* # David Turner, Robert Wilhelm, and Werner Lemberg.
#* - when invoked for the first time, this Makefile will include #
#* the rules found in `freetype/config/detect.mk'. They are in charge # This file is part of the FreeType project, and may only be used modified
#* of detecting the current platform. # and distributed under the terms of the FreeType project license,
#* # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* A summary of the detection will be displayed, and the file `config.mk' # indicate that you have read the license and understand and accept it
#* will be created in the current directory # fully.
#*
#*
#* - when invoked later, this Makefile will include the rules found in # This file is designed for GNU Make, do not use it with another Make tool!
#* `config.mk'. This sub-Makefile will define some system-specific #
#* variables (like compiler, compilation flags, object suffix, etc..), # It works as follows:
#* then include the rules found in `freetype/config/freetype.mk', #
#* used to build the library. # - When invoked for the first time, this Makefile will include the rules
#* # found in `freetype/config/detect.mk'. They are in charge of detecting
#* See the comments in `config/detect.mk' and `config/freetype.mk' for # the current platform.
#* more details on host platform detection and library builds.. #
#* # A summary of the detection will be displayed, and the file `config.mk'
#****************************************************************************** # will be created in the current directory.
#
# - When invoked later, this Makefile will include the rules found in
# `config.mk'. This sub-Makefile will define some system-specific
# variables (like compiler, compilation flags, object suffix, etc.), then
# include the rules found in `freetype/config/freetype.mk', used to build
# the library.
#
# See the comments in `config/detect.mk' and `config/freetype.mk' for more
# details on host platform detection and library builds.
.PHONY: setup .PHONY: setup
#
# The variable TOP holds the path to the topmost directory in the FreeType # The variable TOP holds the path to the topmost directory in the FreeType
# engine source hierarchy. If it is not defined, default it to '.' # engine source hierarchy. If it is not defined, default it to `.'.
# #
ifndef TOP ifndef TOP
TOP := . TOP := .
endif endif
CONFIG_MK := config.mk CONFIG_MK := config.mk
############################################################################# # If no configuration sub-makefile is present, or if `setup' is the target
# # to be built, run the auto-detection rules to figure out which
# If no configuration sub-makefile is present, or if "setup" is the target # configuration rules file to use.
# to be built, run the auto-detection rules to figure out which configuration
# rules file to use..
# #
# Note that the configuration file is put in the current directory, which is # Note that the configuration file is put in the current directory, which is
# not necessarily TOP. # not necessarily $(TOP).
#
# if `config.mk' is not present, set "check_platform" and "first_time" # If `config.mk' is not present, set `check_platform'.
# #
ifeq ($(wildcard $(CONFIG_MK)),) ifeq ($(wildcard $(CONFIG_MK)),)
check_platform := 1 check_platform := 1
first_time := 1
endif endif
# if `setup' is one of the targets requested, set "check_platform" # If `setup' is one of the targets requested, set `check_platform'.
# #
ifneq ($(findstring setup,$(MAKECMDGOALS)),) ifneq ($(findstring setup,$(MAKECMDGOALS)),)
check_platform := 1 check_platform := 1
endif endif
# Include the automatic host platform detection rules when we need to
#########################################################################
#
# include the automatic host platform detection rules when we need to
# check the platform. # check the platform.
# #
#
ifdef check_platform ifdef check_platform
all: setup all: setup
# If the module list $(FT_MODULE_LIST) file is not present, generate it.
#
modules: make_module_list setup
# if the module list $(FT_MODULE_LIST) file is not present, include $(TOP)/config/detect.mk
# generate it include $(TOP)/config/modules.mk
#
modules: make_module_list setup
include $(TOP)/config/detect.mk
include $(TOP)/config/modules.mk
ifeq ($(wildcard $(FT_MODULE_LIST)),)
setup: make_module_list
endif
# "setup" must be defined by the host platform detection rules
# to create the 'config.mk' file in the current directory.
#
ifeq ($(wildcard $(FT_MODULE_LIST)),)
setup: make_module_list
endif
# IMPORTANT:
#
# `setup' must be defined by the host platform detection rules to create
# the `config.mk' file in the current directory.
else else
######################################################################## # A configuration sub-Makefile is present -- simply run it.
# #
# A configuration sub-Makefile is present, simply run it.. all: build_freetype
#
#
all: build_freetype
modules: make_module_list modules: make_module_list
BUILD_FREETYPE := yes BUILD_FREETYPE := yes
include $(CONFIG_MK) include $(CONFIG_MK)
endif #test check_platform endif # test check_platform
# EOF

View File

@ -1,23 +1,20 @@
#******************************************************************* #
#* # FreeType 2 configuration rules for a `normal' ANSI compiler
#* FreeType 2 Configuration rules for a `normal' ANSI compiler #
#*
#* Copyright 1996-2000 by
#* David Turner, Robert Wilhelm, and Werner Lemberg. # Copyright 1996-2000 by
#* # 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 # This file is part of the FreeType project, and may only be used modified
#* license, LICENSE.TXT. By continuing to use, modify, or distribute # and distributed under the terms of the FreeType project license,
#* this file you indicate that you have read the license and # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* understand and accept it fully. # indicate that you have read the license and understand and accept it
#* # fully.
#* Please read the file "freetype/docs/config.txt" to understand
#* what this file does..
#*
#*******************************************************************
ifndef TOP ifndef TOP
TOP := . TOP := .
endif endif
DELETE := rm -f DELETE := rm -f
@ -26,109 +23,110 @@ HOSTSEP := $(SEP)
BUILD := $(TOP)/config/ansi BUILD := $(TOP)/config/ansi
PLATFORM := ansi PLATFORM := ansi
# the directory where all object files are placed # The directory where all object files are placed.
# #
# Note that this is not $(TOP)/obj !! # Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory # This lets you build the library in your own directory with something like
# with something like :
#
# set TOP=....../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
# #
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f $TOP/Makefile setup [options]
# make -f $TOP/Makefile
# #
OBJ_DIR := obj OBJ_DIR := obj
# the directory where all library files are placed # The directory where all library files are placed
# #
# by default, this is the same as OBJ_DIR, however, this can be # By default, this is the same as $(OBJ_DIR), however, this can be changed
# changed to suit particular needs.. # to suit particular needs.
# #
LIB_DIR := $(OBJ_DIR) LIB_DIR := $(OBJ_DIR)
# the object file extension, this can be .o, .tco, .obj, etc.. # The object file extension. This can be .o, .tco, .obj, etc., depending on
# depending on the platform # the platform.
# #
O := o O := o
# the library file extension, this can be .a, .lib, etc.. # The library file extension. This can be .a, .lib, etc., depending on the
# depending on the platform # platform.
# #
A := a A := a
# The name of the final library file. # The name of the final library file. Note that the DOS-specific Makefile
# Note that the DOS-specific Makefile uses a shorter (8.3) name # uses a shorter (8.3) name.
# #
LIBRARY := libfreetype LIBRARY := libfreetype
# path inclusion flag. # Path inclusion flag. Some compilers use a different flag than `-I' to
# # specify an additional include path. Examples are `/i=' or `-J'.
# Some compilers use a different flag than '-I' to specify an
# additional include path. Examples are "/i=" or "-J", etc...
# #
I := -I I := -I
# C flag used to define a macro before the compilation of a given # C flag used to define a macro before the compilation of a given source
# source object. Usually is '-D' like in "-DDEBUG" # object. Usually is `-D' like in `-DDEBUG'.
# #
D := -D D := -D
# Target flag - beware, there is a space after the 'o' !! # The link flag used to specify a given library file on link. Note that
# # this is only used to compile the demo programs, not the library itself.
#
T := -o
# The link flag used to specify a given library file on link.
# Note that this is only used to compile the demo programs, not
# the library itself.
# #
L := -l L := -l
# Target flag.
#
T := -o # Don't remove this comment line! We need the space after `-o'.
# C flags # C flags
# #
# These should concern : debug output, optimization & warnings # These should concern: debug output, optimization & warnings.
# #
# Use the ANSIFLAGS variable to define the compiler flags used # Use the ANSIFLAGS variable to define the compiler flags used to enfore
# to enfore ANSI compliance.. # ANSI compliance.
# #
ifndef CFLAGS ifndef CFLAGS
CFLAGS := -c CFLAGS := -c
endif endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
# nothing (if it already is by default like LCC).
# #
ANSIFLAGS := ANSIFLAGS :=
# Now include the main sub-makefile. It contains all the rules used
# to build the library with the previous variables defined
#
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_std ifdef BUILD_FREETYPE
distclean_freetype: clean_freetype_library_std
# Librarian to use to build the static library # Now include the main sub-makefile. It contains all the rules used to
# # build the library with the previous variables defined.
FT_LIBRARIAN := $(AR) -r #
include $(TOP)/config/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_std
distclean_freetype: distclean_freetype_std
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single # This final rule is used to link all object files into a single library.
# library. It is part of the system-specific sub-Makefile because not # It is part of the system-specific sub-Makefile because not all
# all librarians accept a simple syntax like : # librarians accept a simple syntax like:
# #
# librarian library_file {list of object files} # librarian library_file {list of object files}
# #
$(FT_LIBRARY): $(OBJECTS_LIST) $(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $@ -$(DELETE) $@
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST) $(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

View File

@ -1,127 +1,130 @@
#**************************************************************************** #
#* * # FreeType 2 host platform detection rules
#* FreeType host platform detection rules * #
#* *
#* Copyright 1996-1999 by *
#* 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. *
#* *
#* *
#* This sub-Makefile is in charge of detecting the current platform *
#* It sets some variables accordingly. Namely : *
#* *
#* PLATFORM The detected platform. This will default to "ansi" if *
#* auto-detection fails. *
#* *
#* BUILD The configuration and system-specific directory. Usually *
#* 'freetype/config/$(PLATFORM)' but can be different when *
#* a specific compiler has been requested on the *
#* command line.. *
#* *
#* CONFIG_RULES The Makefile to use. This usually depends on the compiler *
#* defined in the 'CC' environment variable. *
#* *
#* DELETE The shell command used to remove a given file *
#* COPY The shell command used to copy one file *
#* *
#* You need to set the following variable(s) before calling it: *
#* *
#* TOP The top-most directory in the FreeType library source *
#* hierarchy. If not defined, it will default to '.' *
#* *
#****************************************************************************
# If TOP is not defined, default it to '.'
# Copyright 1996-2000 by
# 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.
# This sub-Makefile is in charge of detecting the current platform. It sets
# the following variables:
#
# BUILD The configuration and system-specific directory. Usually
# `freetype/config/$(PLATFORM)' but can be different if a
# specific compiler has been requested on the command line.
#
# The following variables must be defined in system specific `detect.mk'
# files:
#
# PLATFORM The detected platform. This will default to `ansi' if
# auto-detection fails.
# CONFIG_FILE The Makefile to use. This usually depends on the compiler
# defined in the `CC' environment variable.
# DELETE The shell command used to remove a given file.
# COPY The shell command used to copy one file.
# SEP The platform-specific directory separator.
# CC The compiler to use.
#
# You need to set the following variable(s) before calling it:
#
# TOP The top-most directory in the FreeType library source
# hierarchy. If not defined, it will default to `.'.
# If TOP is not defined, default it to `.'
# #
ifndef TOP ifndef TOP
TOP := . TOP := .
endif endif
# Set auto-detection default to `ansi'.
# Note that we delay the evaluation of $(CONFIG_), $(BUILD), and
# $(CONFIG_RULES).
# #
# set auto-detection default to ANSI. PLATFORM := ansi
# Note that we delay the valuation of BUILD and RULES DELETE := $(RM)
# COPY := cp
PLATFORM := ansi SEP := /
CONFIG = $(TOP)$(SEP)config
DELETE := $(RM)
COPY := cp
SEP := /
BUILD = $(CONFIG)$(SEP)$(PLATFORM) CONFIG_ = $(TOP)$(SEP)config$(SEP)
CONFIG_FILE = $(BUILD)/Makefile BUILD = $(CONFIG_)$(PLATFORM)
CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
# We define the BACKSLASH variable to hold a single back-slash character.
###########################################################################
#
# Now, include each detection rules file found in a `config/<system>'
# directory..
#
#
# we define the BACKSLASH variable to hold a single back-slash character
# This is needed because a line like # This is needed because a line like
# #
# SEP := \ # SEP := \
# #
# does not work with GNU Make (the back-slash is interpreted as a line # does not work with GNU Make (the backslash is interpreted as a line
# continuation). While a line like : # continuation). While a line like
# #
# SEP := \\ # SEP := \\
# #
# really define $(SEP) as "\" on Unix, and "\\" on Dos and Windows !! # really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
# #
BACKSLASH := $(strip \ ) BACKSLASH := $(strip \ )
include $(wildcard $(CONFIG)/*/detect.mk) # Now, include all detection rule files found in the `config/<system>'
# directories. Note that the calling order of the various `detect.mk' files
# isn't predictable.
#
include $(wildcard $(CONFIG_)*/detect.mk)
# In case no detection rule file was successful, use the default.
#
ifndef CONFIG_FILE
CONFIG_FILE := ansi.mk
setup: std_setup
endif
# The following targets are equivalent, with the exception that they use # The following targets are equivalent, with the exception that they use
# slightly different syntaxes for the `echo' command. This is due to # slightly different syntaxes for the `echo' command.
# #
# std_setup: is defined for most platforms # std_setup: defined for most platforms
# dos_setup: is defined for Dos-ish platforms like Dos, Windows & OS/2 # dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
# #
.PHONY: std_setup dos_setup
.PHONY: std_setup dos_setup
std_setup: std_setup:
@echo "" @echo ""
@echo "FreeType build system - automatic system detection" @echo "FreeType build system -- automatic system detection"
@echo "" @echo ""
@echo "The following settings were detected :" @echo "The following settings are used:"
@echo "" @echo ""
@echo " platform : $(PLATFORM)" @echo " platform $(PLATFORM)"
@echo " compiler : $(CC)" @echo " compiler $(CC)"
@echo " configuration directory : $(BUILD)" @echo " configuration directory $(BUILD)"
@echo " configuration rules : $(CONFIG_RULES)" @echo " configuration rules $(CONFIG_RULES)"
@echo "" @echo ""
@echo "If this does not correspond to your system or settings please remove the file" @echo "If this does not correspond to your system or settings please remove the file"
@echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help." @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
@echo "" @echo ""
@echo "Otherwise, simple type \`make' again to build the library" @echo "Otherwise, simply type \`make' again to build the library."
@echo "" @echo ""
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK) @$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
dos_setup: dos_setup:
@echo ÿ @echo ÿ
@echo FreeType build system - automatic system detection @echo FreeType build system -- automatic system detection
@echo ÿ @echo ÿ
@echo The following settings were detected : @echo The following settings are used:
@echo ÿ @echo ÿ
@echo ÿÿplatformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ: $(PLATFORM) @echo ÿÿplatformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
@echo ÿÿcompilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ: $(CC) @echo ÿÿcompilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
@echo ÿÿconfiguration directoryÿÿ: $(BUILD) @echo ÿÿconfiguration directoryÿÿÿÿÿÿ$(BUILD)
@echo ÿÿconfiguration rulesÿÿÿÿÿÿ: $(CONFIG_RULES) @echo ÿÿconfiguration rulesÿÿÿÿÿÿÿÿÿÿ$(CONFIG_RULES)
@echo ÿ @echo ÿ
@echo If this does not correspond to your system or settings please remove the file @echo If this does not correspond to your system or settings please remove the file
@echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help. @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
@echo ÿ @echo ÿ
@echo Otherwise, simple type 'make' again to build the library @echo Otherwise, simply type 'make' again to build the library.
@echo ÿ @echo ÿ
@$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul @$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul
# EOF

View File

@ -1,87 +1,91 @@
# #
# This file is used to detect a DOS host platform. # FreeType 2 configuration file to detect a DOS host platform.
# #
# Copyright 1996-2000 by
# 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.
# This configuration file to be used depends on the value of the CC # This configuration file to be used depends on the value of the CC
# environment variable. # environment variable which is set below according to the compiler name
# # given as a parameter to make.
#
# We test for the COMSPEC environment variable, then run the 'ver'
# command-line program to see if its output contains the word "Dos"
#
# If this is true, we're running a Dos-ish platform (or an emulation)
#
# We test for the COMSPEC environment variable, then run the `ver'
# command-line program to see if its output contains the word `Dos'.
#
# If this is true, we are running a Dos-ish platform (or an emulation).
#
ifeq ($(PLATFORM),ansi) ifeq ($(PLATFORM),ansi)
ifdef COMSPEC ifdef COMSPEC
is_dos := $(findstring Dos,$(shell ver)) is_dos := $(findstring Dos,$(shell ver))
# We try to recognize a Dos session under OS/2. The "ver" command # We try to recognize a Dos session under OS/2. The `ver' command
# returns 'Operating System/2 ...' there, so 'is_dos' should be empty # returns `Operating System/2 ...' there, so `is_dos' should be empty
# there. # there.
# #
# To recognize a Dos session under OS/2, we check COMSPEC for the # To recognize a Dos session under OS/2, we check COMSPEC for the
# substring "MDOS\COMMAND" # substring `MDOS\COMMAND'
# #
ifeq ($(is_dos),) ifeq ($(is_dos),)
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC)) is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
endif endif
ifneq ($(is_dos),) ifneq ($(is_dos),)
PLATFORM := dos PLATFORM := dos
DELETE := del DELETE := del
COPY := copy COPY := copy
##################################################################### # Use DJGPP (i.e. gcc) by default.
# #
# Use gcc, i.e. DJGPP by default. Aren't we biased ;-) CONFIG_FILE := dos-gcc.mk
# SEP := /
# ifndef CC
CONFIG_FILE := dos-gcc.mk CC := gcc
SEP := / endif
ifndef CC
CC := gcc
endif
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
CONFIG_FILE := dos-tcc.mk
SEP := $(BACKSLASH)
CC := tcc
.PHONY: turboc
endif
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := dos-tcc.mk CONFIG_FILE := dos-wat.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := tcc CC := wcc386
.PHONY: turboc .PHONY: watcom
endif endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16 bits
CONFIG_FILE := dos-wat.mk CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := wcc386 CC := bcc
.PHONY: watcom .PHONY: borlandc16
endif endif
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16 bits ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32 bits
CONFIG_FILE := dos-bcc.mk CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := bcc CC := bcc32
.PHONY: borlandc16 .PHONY: borlandc
endif endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32 bits setup: dos_setup
CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
.PHONY: borlandc
endif
CONFIG_RULES := $(TOP)\config\dos\$(CONFIG_FILE) endif # test Dos
endif # test COMSPEC
# use the Dos version of the "setup dump" endif # test PLATFORM
#
setup: dos_setup
endif # test Dos
endif # test COMSPEC
endif # test PLATFORM
# EOF

View File

@ -1,23 +1,20 @@
#******************************************************************* #
#* # FreeType 2 configuration rules for the DJGPP compiler
#* FreeType 2 Configuration rules for Dos + GCC #
#*
#* Copyright 1996-2000 by
#* David Turner, Robert Wilhelm, and Werner Lemberg. # Copyright 1996-2000 by
#* # 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 # This file is part of the FreeType project, and may only be used modified
#* license, LICENSE.TXT. By continuing to use, modify, or distribute # and distributed under the terms of the FreeType project license,
#* this file you indicate that you have read the license and # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* understand and accept it fully. # indicate that you have read the license and understand and accept it
#* # fully.
#* Please read the file "freetype/docs/config.txt" to understand
#* what this file does..
#*
#*******************************************************************
ifndef TOP ifndef TOP
TOP := . TOP := .
endif endif
DELETE := rm -f DELETE := rm -f
@ -26,106 +23,110 @@ HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/dos BUILD := $(TOP)/config/dos
PLATFORM := dos PLATFORM := dos
# the directory where all object files are placed # The directory where all object files are placed.
# #
# Note that this is not $(TOP)/obj !! # Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory # This lets you build the library in your own directory with something like
# with something like :
#
# set TOP=....../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
# #
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
# #
OBJ_DIR := obj OBJ_DIR := obj
# the directory where all library files are placed # The directory where all library files are placed
# #
# by default, this is the same as OBJ_DIR, however, this can be # By default, this is the same as $(OBJ_DIR), however, this can be changed
# changed to suit particular needs.. # to suit particular needs.
# #
LIB_DIR := $(OBJ_DIR) LIB_DIR := $(OBJ_DIR)
# the object file extension, this can be .o, .tco, .obj, etc.. # The object file extension. This can be .o, .tco, .obj, etc., depending on
# depending on the platform # the platform.
# #
O := o O := o
# the library file extension, this can be .a, .lib, etc.. # The library file extension. This can be .a, .lib, etc., depending on the
# depending on the platform # platform.
# #
A := a A := a
# The name of the final library file. # The name of the final library file. Note that the DOS-specific Makefile
# Note that the DOS-specific Makefile uses a shorter (8.3) name # uses a shorter (8.3) name.
# #
LIBRARY := libfreetype LIBRARY := libfreetype
# path inclusion flag. # Path inclusion flag. Some compilers use a different flag than `-I' to
# # specify an additional include path. Examples are `/i=' or `-J'.
# Some compilers use a different flag than '-I' to specify an
# additional include path. Examples are "/i=" or "-J", etc...
# #
I := -I I := -I
# The link flag used to specify a given library file on link. # C flag used to define a macro before the compilation of a given source
# Note that this is only used to compile the demo programs, not # object. Usually is `-D' like in `-DDEBUG'.
# the library itself.
#
L := -l
# C flag used to define a macro before the compilation of a given
# source object. Usually is '-D' like in "-DDEBUG"
# #
D := -D D := -D
# Target flag - beware, there is a space after the 'o' !! # The link flag used to specify a given library file on link. Note that
# this is only used to compile the demo programs, not the library itself.
# #
L := -l
# Target flag.
# #
T := -o T := -o # Don't remove this comment line! We need the space after `-o'.
# C flags # C flags
# #
# These should concern : # These should concern: debug output, optimization & warnings.
# #
# - debug output # Use the ANSIFLAGS variable to define the compiler flags used to enfore
# - optimization # ANSI compliance.
# - warnings
# - ansi compliance..
# #
ifndef CFLAGS ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall CFLAGS := -c -g -O6 -Wall
endif endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
# nothing (if it already is by default like LCC).
# #
ANSIFLAGS := -ansi -pedantic ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos # The cleanup targets.
distclean_freetype: distclean_freetype_dos #
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single # This final rule is used to link all object files into a single library.
# library. It is part of the system-specific sub-Makefile because not # It is part of the system-specific sub-Makefile because not all
# all librarians accept a simple syntax like : # librarians accept a simple syntax like:
# #
# librarian library_file {list of object files} # librarian library_file {list of object files}
# #
$(FT_LIBRARY): $(OBJECTS_LIST) $(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $@ -$(DELETE) $@
$(AR) -r $@ $(OBJECTS_LIST) $(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif endif
# EOF

View File

@ -1,57 +1,51 @@
#****************************************************************************
#* *
#* FreeType library sub-Makefile *
#* *
#* Copyright 1996-1999 by *
#* 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. *
#* *
#****************************************************************************
# include the 'modules' rules file
# #
include $(TOP)/config/modules.mk # FreeType 2 library sub-Makefile
#
# The targets `objects', `library' are defined at the end of
# this Makefile when all rules have been included.. # Copyright 1996-2000 by
# 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 targets `objects' and `library' are defined at the end of this
# Makefile when all rules have been included.
# #
.PHONY: build_freetype objects library .PHONY: build_freetype objects library
# default target - build objects and library # default target -- build objects and library
# #
build_freetype: objects library build_freetype: objects library
# `multi' target - build multiple objects and library # `multi' target -- build multiple objects and library
# #
multi: objects library multi: objects library
# The FreeType sources directory. # The FreeType source directory.
# #
SRC := $(TOP)$(SEP)src SRC := $(TOP)$(SEP)src
# The directory where the base layer components are placed. # The directory where the base layer components are placed. By default,
# By default, this is 'freetype/src/base' # this is `freetype/src/base'.
# #
BASE_DIR := $(SRC)$(SEP)base BASE_DIR := $(SRC)$(SEP)base
# A Few short-cuts in order to avoid typing $(SEP) all the time for # A few short-cuts in order to avoid typing $(SEP) all the time for the
# the directory separator # directory separator.
# #
# For example: SRC_ equals to './src/' where '.' is $(TOP) # For example: SRC_ equals to `./src/' where `.' is $(TOP).
# #
# #
SRC_ := $(SRC)$(SEP) SRC_ := $(SRC)$(SEP)
@ -61,6 +55,7 @@ LIB_ := $(LIB_DIR)$(SEP)
PUBLIC_ := $(TOP)$(SEP)include$(SEP) PUBLIC_ := $(TOP)$(SEP)include$(SEP)
CONFIG_ := $(TOP)$(SEP)config$(SEP) CONFIG_ := $(TOP)$(SEP)config$(SEP)
# The name of the final library file. # The name of the final library file.
# #
FT_LIBRARY := $(LIB_)$(LIBRARY).$A FT_LIBRARY := $(LIB_)$(LIBRARY).$A
@ -69,10 +64,10 @@ FT_LIBRARY := $(LIB_)$(LIBRARY).$A
# include paths # include paths
# #
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed # IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
# in front of the include list. Porters are then able to put # in front of the include list. Porters are then able to
# their own version of some of the FreeType components in # put their own version of some of the FreeType components
# the 'freetype/config/<system>' directory, as these files # in the `freetype/config/<system>' directory, as these
# will override the default sources. # files will override the default sources.
# #
INCLUDES := $(BUILD) $(TOP)$(SEP)config $(TOP)$(SEP)include $(INCLUDES) INCLUDES := $(BUILD) $(TOP)$(SEP)config $(TOP)$(SEP)include $(INCLUDES)
@ -80,34 +75,37 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# C flags used for the compilation of an object file. This must include at # C flags used for the compilation of an object file. This must include at
# least the paths for the 'base' and 'config/<system>' directories, # least the paths for the `base' and `config/<system>' directories,
# debug/optimization/warning flags + ansi compliance if needed. # debug/optimization/warning flags + ansi compliance if needed.
# #
FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS) FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
FT_CC = $(CC) $(FT_CFLAGS) FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(CC) $(ANSI_FLAGS) $(FT_CFLAGS) FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
# include the `modules' rules file
# #
# Free the lists of driver objects include $(CONFIG_)modules.mk
# Free the lists of driver objects.
# #
COMPONENTS_LIST := COMPONENTS_LIST :=
DRIVERS_LIST := DRIVERS_LIST :=
OBJECTS_LIST := OBJECTS_LIST :=
# System-specific component - this must be defined in this Makefile # System-specific component -- this must be defined in this Makefile for
# for easy updates. The default Ansi ftsystem.c is located in # easy updates. The default ANSI ftsystem.c is located in
# 'freetype/config/ftsystem.c'. However, some system-specific # `freetype/config/ftsystem.c'. However, some system-specific configuration
# configuration might define FTSYS_SRC to fetch it in other places, # might define $(FTSYS_SRC) to fetch it in other places, like
# like 'freetype/config/<system>/ftsystem.c' # `freetype/config/<system>/ftsystem.c'.
# #
# BASE_H is defined in src/base/rules.mk and contains the list of all # $(BASE_H) is defined in `src/base/rules.mk' and contains the list of all
# base layer header files. # base layer header files.
# #
ifndef FTSYS_SRC ifndef FTSYS_SRC
FTSYS_SRC = $(BASE_)ftsystem.c FTSYS_SRC = $(BASE_)ftsystem.c
endif endif
FTSYS_OBJ = $(OBJ_)ftsystem.$O FTSYS_OBJ = $(OBJ_)ftsystem.$O
OBJECTS_LIST += $(FTSYS_OBJ) OBJECTS_LIST += $(FTSYS_OBJ)
@ -118,10 +116,9 @@ $(FTSYS_OBJ): $(FTSYS_SRC) $(BASE_H)
# ftdebug component # ftdebug component
# #
# FTDebug contains code used to print traces and errors. It is # FTDebug contains code used to print traces and errors. It is normally
# normally empty for a release build (see ftoption.h) # empty for a release build (see ftoption.h).
# #
FTDEBUG_SRC = $(BASE_)ftdebug.c FTDEBUG_SRC = $(BASE_)ftdebug.c
FTDEBUG_OBJ = $(OBJ_)ftdebug.$O FTDEBUG_OBJ = $(OBJ_)ftdebug.$O
@ -131,28 +128,27 @@ $(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(BASE_H)
$(FT_COMPILE) $T$@ $< $(FT_COMPILE) $T$@ $<
# Define $(PUBLIC_H) as the list of all public header files located in
# Define PUBLIC_H as the list of all public header files located in # `$(TOP)/include'.
# `$(TOP)/include'
# #
PUBLIC_H := $(wildcard $(PUBLIC_)*.h) PUBLIC_H := $(wildcard $(PUBLIC_)*.h)
# Include all rule files from FreeType components # Include all rule files from FreeType components.
#
# #
include $(wildcard $(SRC)/*/rules.mk) include $(wildcard $(SRC)/*/rules.mk)
# FTInit file:
# FTInit file
# #
# The C source 'ftinit.c' contains the FreeType initialisation routines. # The C source `ftinit.c' contains the FreeType initialization routines.
# It is able to automatically register one or more drivers when the API # It is able to automatically register one or more drivers when the API
# function FT_Init_FreeType() is called. # function FT_Init_FreeType() is called.
# #
# The set of initial drivers is determined by the driver Makefiles # The set of initial drivers is determined by the driver Makefiles
# includes above. Each driver Makefile updates the FTINIT_xxxx lists # includes above. Each driver Makefile updates the FTINIT_xxxx lists
# which contain additional include paths and macros used to compile the # which contain additional include paths and macros used to compile the
# single 'ftinit.c' source. # single `ftinit.c' source.
# #
FTINIT_SRC := $(BASE_)ftinit.c FTINIT_SRC := $(BASE_)ftinit.c
FTINIT_OBJ := $(OBJ_)ftinit.$O FTINIT_OBJ := $(OBJ_)ftinit.$O
@ -166,26 +162,25 @@ $(FTINIT_OBJ): $(FTINIT_SRC) $(BASE_H) $(FT_MODULE_LIST)
# All FreeType library objects # All FreeType library objects
# #
# By default, we include the base layer extensions. These could be # By default, we include the base layer extensions. These could be
# ommitted on builds which do not want them. # omitted on builds which do not want them.
# #
OBJ_M = $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) OBJ_M = $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M)
OBJ_S = $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) 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)
#
# 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) BASE_OBJECTS := $(OBJECTS_LIST)
ifneq ($(findstring multi,$(MAKECMDGOALS)),) ifneq ($(findstring multi,$(MAKECMDGOALS)),)
OBJECTS_LIST += $(OBJ_M) OBJECTS_LIST += $(OBJ_M)
else else
OBJECTS_LIST += $(OBJ_S) OBJECTS_LIST += $(OBJ_S)
endif endif
objects: $(OBJECTS_LIST) objects: $(OBJECTS_LIST)
@ -196,36 +191,36 @@ library: $(FT_LIBRARY)
$(FT_COMPILE) $T$@ $< $(FT_COMPILE) $T$@ $<
# Standard cleaning and distclean rules. These are not accepted # Standard cleaning and distclean rules. These are not accepted
# on all systems though.. # on all systems though.
# #
clean_freetype_std: clean_freetype_std:
-$(DELETE) $(BASE_OBJECTS) $(OBJS_M) $(OBJS_S) -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
distclean_freetype_std: clean_freetype_std distclean_freetype_std: clean_freetype_std
-$(DELETE) $(FT_LIBRARY) -$(DELETE) $(FT_LIBRARY)
-$(DELETE) *.orig *~ core *.core -$(DELETE) *.orig *~ core *.core
# The Dos command shell does not support very long list of arguments # The Dos command shell does not support very long list of arguments, so
# so we're stuck with wildcards # we are stuck with wildcards.
# #
clean_freetype_dos: clean_freetype_dos:
-del $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O 2> nul -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O 2> nul
distclean_freetype_dos: clean_freetype_dos distclean_freetype_dos: clean_freetype_dos
-del $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
# remove configuration file (used for distclean) # Remove configuration file (used for distclean).
# #
remove_config_mk: remove_config_mk:
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK))
# the "config.mk" must define 'clean_freetype' and 'distclean_freetype'
# implementations may use to relay these to either the 'std' or 'dos' # The `config.mk' file must define `clean_freetype' and
# versions, or simply provide their own implementation.. # `distclean_freetype'. Implementations may use to relay these to either
# the `std' or `dos' versions, or simply provide their own implementation.
# #
clean: clean_freetype clean: clean_freetype
distclean: distclean_freetype remove_config_mk distclean: distclean_freetype remove_config_mk
# END # EOF

View File

@ -1,69 +1,73 @@
#**************************************************************************** #
#* * # FreeType 2 modules sub-Makefile
#* FreeType modules sub-Makefile * #
#* *
#* Copyright 1996-1999 by *
#* David Turner, Robert Wilhelm, and Werner Lemberg. * # Copyright 1996-2000 by
#* * # 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 * # This file is part of the FreeType project, and may only be used modified
#* license, LICENSE.TXT. By continuing to use, modify, or distribute * # and distributed under the terms of the FreeType project license,
#* this file you indicate that you have read the license and * # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* understand and accept it fully. * # 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 * # DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
#* OTHER MAKEFILES. * # OTHER MAKEFILES.
#* *
#* This file is in charge of handling the generation of the modules list *
#* file, normally located in `config/ftmodule.h' * # This file is in charge of handling the generation of the modules list
#* * # file, normally located in `config/ftmodule.h'.
#****************************************************************************
.PHONY: make_module_list clean_module_list remake_module_list .PHONY: make_module_list clean_module_list remake_module_list
# MODULE_LIST, as it name suggests, indicate where the modules list # MODULE_LIST, as its name suggests, indicates where the modules list
# reside. For now, it is in $(BUILD)/ftmodule.h # resides. For now, it is in `config/ftmodule.h'.
# #
ifndef FT_MODULE_LIST ifndef FT_MODULE_LIST
FT_MODULE_LIST := $(TOP)$(SEP)config$(SEP)ftmodule.h FT_MODULE_LIST := $(CONFIG_)ftmodule.h
endif endif
# To build the modules list, we invoke the `make_module_list' target # To build the modules list, we invoke the `make_module_list' target.
# #
#$(FT_MODULE_LIST): make_module_list #$(FT_MODULE_LIST): make_module_list
# Before the modules list file can be generated, we must remove the # Before the modules list file can be generated, we must remove the file in
# file in order to `clean' the list # order to `clean' the list.
# #
clean_module_list: clean_module_list:
@-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_MODULE_LIST)) @-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_MODULE_LIST))
@-echo Regenerating the font drivers list in $(FT_MODULE_LIST) @-echo Regenerating the font drivers list in $(FT_MODULE_LIST)...
make_module_list: clean_module_list make_module_list: clean_module_list
@echo -- done -- @echo done.
# Trailing spaces are protected with a `#' sign to avoid accidental
# removing.
#
ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),) ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
OPEN_MODULE := @echo OPEN_MODULE := @echo #
CLOSE_MODULE := >> $(FT_MODULE_LIST) CLOSE_MODULE := >> $(FT_MODULE_LIST)
else else
OPEN_MODULE := @echo " OPEN_MODULE := @echo "
CLOSE_MODULE := " >> $(FT_MODULE_LIST) CLOSE_MODULE := " >> $(FT_MODULE_LIST)
endif endif
# OPEN_DRIVER & CLOSE_DRIVER are used to specify a given font driver # $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
# in the `module.mk' rules file # in the `module.mk' rules file.
# #
OPEN_DRIVER := $(OPEN_MODULE)FT_DRIVER( OPEN_DRIVER := $(OPEN_MODULE)FT_DRIVER(
CLOSE_DRIVER := )$(CLOSE_MODULE) CLOSE_DRIVER := )$(CLOSE_MODULE)
ECHO_DRIVER := @echo "* driver: ECHO_DRIVER := @echo "* driver: #
ECHO_DRIVER_DESC := ( ECHO_DRIVER_DESC := (
ECHO_DRIVER_DONE := )" ECHO_DRIVER_DONE := )"
# each `module.mk' in the `src' sub-dirs is used to add one rule to # Each `module.mk' in the `src' sub-dirs is used to add one rule to the
# the target `make_module_list'. # target `make_module_list'.
# #
include $(wildcard $(TOP)/src/*/module.mk) include $(wildcard $(TOP)/src/*/module.mk)
# EOF

View File

@ -1,54 +1,64 @@
# #
# This file is used to detect an OS/2 host, and set the build variables # FreeType 2 configuration file to detect an OS/2 host platform.
# accordingly..
#
# which Makefile to use based on the value of the CC environment variable.
#
# OS/2
# #
# Copyright 1996-2000 by
# 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.
# This configuration file to be used depends on the value of the CC
# environment variable which is set below according to the compiler name
# given as a parameter to make.
ifeq ($(PLATFORM),ansi) ifeq ($(PLATFORM),ansi)
ifdef OS2_SHELL ifdef OS2_SHELL
PLATFORM := os2 PLATFORM := os2
COPY := copy COPY := copy
DELETE := del DELETE := del
CONFIG_FILE := os2-gcc.mk # gcc-emx by default CONFIG_FILE := os2-gcc.mk # gcc-emx by default
SEP := / SEP := /
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++ ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := os2-icc.mk CONFIG_FILE := os2-icc.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := icc CC := icc
.PHONY: visualage .PHONY: visualage
endif endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := os2-wat.mk CONFIG_FILE := os2-wat.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := wcc386 CC := wcc386
.PHONY: watcom .PHONY: watcom
endif endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32 bits ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32 bits
CONFIG_FILE := os2-bcc.mk CONFIG_FILE := os2-bcc.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := bcc32 CC := bcc32
.PHONY: borlandc .PHONY: borlandc
endif endif
ifneq ($(findstring devel,$(MAKECMDGOALS)),) ifneq ($(findstring devel,$(MAKECMDGOALS)),)
CONFIG_FILE := os2-dev.mk CONFIG_FILE := os2-dev.mk
CC := gcc CC := gcc
SEP := / SEP := /
devel: setup devel: setup
endif endif
CONFIG_RULES := $(TOP)\config\os2\$(CONFIG_FILE) setup: dos_setup
setup: dos_setup endif # test OS2_SHELL
endif # test PLATFORM
endif #test OS2_SHELL #EOF
endif #test PLATFORM

View File

@ -1,58 +1,62 @@
# #
# This file is used to detect which Makefile to use based on the # FreeType 2 configuration file to detect a UNIX host platform.
# value of the CC environment variable.
# #
# Unix
#
# # Copyright 1996-2000 by
# This will _much_ probably change in the future if we're going to use # David Turner, Robert Wilhelm, and Werner Lemberg.
# Automake/Autoconf..
# #
# 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.
# This will probably change a lost in the future if we are going to use
# Automake/Autoconf...
ifeq ($(PLATFORM),ansi) ifeq ($(PLATFORM),ansi)
has_inittab := $(strip $(wildcard /etc/inittab)) has_inittab := $(strip $(wildcard /etc/inittab))
ifneq ($(has_inittab),)
PLATFORM := unix ifneq ($(has_inittab),)
COPY := cp
DELETE := rm -f
# if `devel' is the requested target, use the development Makefile PLATFORM := unix
# COPY := cp
ifneq ($(findstring devel,$(MAKECMDGOALS)),) DELETE := rm -f
CONFIG_RULES := $(BUILD)$(SEP)unix-dev.mk
devel: setup;
endif
# test wether we're using gcc ? If it is, we selected the
# 'unix-gcc.mk' configuration file. Otherwise, the standard
# 'unix.mk' which simply calls "cc -c" with no extra arguments
#
# Feel free to add support for other platform specific compilers
# in this directory (e.g. solaris.mk + changes here to detect the
# platform)
#
ifeq ($(CC),gcc)
is_gcc := 1
else
ifneq ($(findstring gcc,$(shell $(CC) --version)),)
is_gcc := 1
endif
endif
ifdef is_gcc
CONFIG_RULES := $(BUILD)$(SEP)unix-gcc.mk
else
CONFIG_RULES := $(BUILD)$(SEP)unix.mk
endif
setup: std_setup
endif # test Unix
endif # test PLATFORM
# Test whether we're using gcc. If so, we select the `unix-gcc.mk'
# configuration file. Otherwise, the standard `unix.mk' is used which
# simply calls `cc -c' with no extra arguments.
#
# Feel free to add support for other platform specific compilers in this
# directory (e.g. solaris.mk + changes here to detect the platform).
#
ifeq ($(CC),gcc)
is_gcc := 1
else
ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),)
is_gcc := 1
endif
endif
ifdef is_gcc
CONFIG_FILE := unix-gcc.mk
else
CONFIG_FILE := unix.mk
endif
# If `devel' is the requested target, use the development Makefile.
#
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-dev.mk
devel: setup
endif
setup: std_setup
endif # test Unix
endif # test PLATFORM
# EOF

View File

@ -1,23 +1,20 @@
#******************************************************************* #
#* # FreeType 2 configuration rules for the gcc compiler under UNIX
#* FreeType 2 Configuration rules for a standard Unix compiler #
#*
#* Copyright 1996-2000 by
#* David Turner, Robert Wilhelm, and Werner Lemberg. # Copyright 1996-2000 by
#* # 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 # This file is part of the FreeType project, and may only be used modified
#* license, LICENSE.TXT. By continuing to use, modify, or distribute # and distributed under the terms of the FreeType project license,
#* this file you indicate that you have read the license and # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* understand and accept it fully. # indicate that you have read the license and understand and accept it
#* # fully.
#* Please read the file "freetype/docs/config.txt" to understand
#* what this file does..
#*
#*******************************************************************
ifndef TOP ifndef TOP
TOP := . TOP := .
endif endif
DELETE := rm -f DELETE := rm -f
@ -26,105 +23,110 @@ HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix BUILD := $(TOP)/config/unix
PLATFORM := unix PLATFORM := unix
# the directory where all object files are placed # The directory where all object files are placed.
# #
# Note that this is not $(TOP)/obj !! # Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory # This lets you build the library in your own directory with something like
# with something like :
#
# set TOP=....../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
# #
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f $TOP/Makefile setup [options]
# make -f $TOP/Makefile
# #
OBJ_DIR := obj OBJ_DIR := obj
# the directory where all library files are placed # The directory where all library files are placed
# #
# by default, this is the same as OBJ_DIR, however, this can be # By default, this is the same as $(OBJ_DIR), however, this can be changed
# changed to suit particular needs.. # to suit particular needs.
# #
LIB_DIR := $(OBJ_DIR) LIB_DIR := $(OBJ_DIR)
# the object file extension, this can be .o, .tco, .obj, etc.. # The object file extension. This can be .o, .tco, .obj, etc., depending on
# depending on the platform # the platform.
# #
O := o O := o
# the library file extension, this can be .a, .lib, etc.. # The library file extension. This can be .a, .lib, etc., depending on the
# depending on the platform # platform.
# #
A := a A := a
# The name of the final library file. # The name of the final library file. Note that the DOS-specific Makefile
# Note that the DOS-specific Makefile uses a shorter (8.3) name # uses a shorter (8.3) name.
# #
LIBRARY := libfreetype LIBRARY := libfreetype
# path inclusion flag. # Path inclusion flag. Some compilers use a different flag than `-I' to
# # specify an additional include path. Examples are `/i=' or `-J'.
# Some compilers use a different flag than '-I' to specify an
# additional include path. Examples are "/i=" or "-J", etc...
# #
I := -I I := -I
# The link flag used to specify a given library file on link. # C flag used to define a macro before the compilation of a given source
# Note that this is only used to compile the demo programs, not # object. Usually is `-D' like in `-DDEBUG'.
# the library itself.
#
L := -l
# C flag used to define a macro before the compilation of a given
# source object. Usually is '-D' like in "-DDEBUG"
# #
D := -D D := -D
# Target flag - beware, there is a space after the 'o' !! # The link flag used to specify a given library file on link. Note that
# this is only used to compile the demo programs, not the library itself.
# #
L := -l
# Target flag.
# #
T := -o T := -o # Don't remove this comment line! We need the space after `-o'.
# C flags # C flags
# #
# These should concern : # These should concern: debug output, optimization & warnings.
# #
# - debug output # Use the ANSIFLAGS variable to define the compiler flags used to enfore
# - optimization # ANSI compliance.
# - warnings
# - ansi compliance..
# #
ifndef CFLAGS ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall CFLAGS := -c -g -O6 -Wall
endif endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
# nothing (if it already is by default like LCC).
# #
ANSIFLAGS := -ansi -pedantic ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk # Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_std # The cleanup targets.
distclean_freetype: distclean_freetype_std #
clean_freetype: clean_freetype_std
distclean_freetype: distclean_freetype_std
# This final rule is used to link all object files into a single # Librarian to use to build the static library
# library. It is part of the system-specific sub-Makefile because not #
# all librarians accept a simple syntax like : FT_LIBRARIAN := $(AR) -r
#
# librarian library_file {list of object files}
# # This final rule is used to link all object files into a single library.
$(FT_LIBRARY): $(OBJECTS_LIST) # It is part of the system-specific sub-Makefile because not all
-$(DELETE) $@ # librarians accept a simple syntax like:
$(AR) -r $@ $(OBJECTS_LIST) #
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $@
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif endif
# EOF

View File

@ -1,93 +1,93 @@
# #
# This file is used to detect a Win32 host platform. # FreeType 2 configuration file to detect a Win32 host platform.
# #
# Copyright 1996-2000 by
# 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.
# This configuration file to be used depends on the value of the CC # This configuration file to be used depends on the value of the CC
# environment variable. # environment variable which is set below according to the compiler name
# # given as a parameter to make.
#
ifeq ($(PLATFORM),ansi) ifeq ($(PLATFORM),ansi)
################################################################### # Detecting Windows NT is easy, as the OS variable must be defined and
# # contains `Windows_NT'. Untested with Windows 2K, but I guess it should
# Detecting Windows NT or Windows 9x # work...
# #
ifeq ($(OS),Windows_NT)
is_windows := 1
# Detecting Windows NT is easy, as the OS variable must be defined # We test for the COMSPEC environment variable, then run the `ver'
# and contains "Windows_NT". Untested with Windows 2K, but I guess # command-line program to see if its output contains the word `Windows'.
# it should work ... #
# # If this is true, we're running a win32 platform (or an emulation).
ifeq ($(OS),Windows_NT) #
is_windows := 1 else
ifdef COMSPEC
is_windows := $(findstring Windows,$(strip $(shell ver)))
endif
endif #test NT
# We test for the COMSPEC environment variable, then run the 'ver' ifdef is_windows
# command-line program to see if its output contains the word "Windows"
#
# If this is true, we're running a win32 platform (or an emulation)
#
else
ifdef COMSPEC
is_windows := $(findstring Windows,$(strip $(shell ver)))
endif
endif #test NT
#################################################################### PLATFORM := win32
# DELETE := del
# Rules for Win32 COPY := copy
#
ifdef is_windows CONFIG_FILE := w32-gcc.mk # gcc Makefile by default
SEP := /
ifeq ($(CC),cc)
CC := gcc
endif
PLATFORM := win32 ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
DELETE := del CONFIG_FILE := w32-vcc.mk
COPY := copy SEP := $(BACKSLASH)
CC := cl
visualc: setup
endif
CONFIG_FILE := w32-gcc.mk # gcc Makefile by default - aren't we biased ;-) ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
SEP := / CONFIG_FILE := w32-wat.mk
ifeq ($(CC),cc) SEP := $(BACKSLASH)
CC := gcc CC := wcc386
endif watcom: setup
endif
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++ ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-vcc.mk CONFIG_FILE := w32-icc.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := cl CC := icc
visualc: setup visualage: setup
endif endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++ ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-wat.mk CONFIG_FILE := w32-lcc.mk
SEP := $(BACKSLASH) SEP := $(BACKSLASH)
CC := wcc386 CC := lcc
watcom: setup lcc: setup
endif endif
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++ ifneq ($(findstring devel,$(MAKECMDGOALS)),)
CONFIG_FILE := w32-icc.mk CONFIG_FILE := w32-dev.mk
SEP := $(BACKSLASH) CC := gcc
CC := icc SEP := /
visualage: setup devel: setup
endif endif
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32 setup: dos_setup
CONFIG_FILE := w32-lcc.mk
SEP := $(BACKSLASH)
CC := lcc
lcc: setup
endif
ifneq ($(findstring devel,$(MAKECMDGOALS)),) endif # test is_windows
CONFIG_FILE := w32-dev.mk endif # test PLATFORM
CC := gcc
SEP := /
devel: setup
endif
CONFIG_RULES := $(TOP)\config\win32\$(CONFIG_FILE)
setup: dos_setup
endif #test is_windows
endif #test PLATFORM
# EOF

View File

@ -10,11 +10,11 @@ all: exes
# #
ifndef TOP ifndef TOP
TOP := .. TOP := ..
endif endif
ifndef TOP2 ifndef TOP2
TOP2 := $(TOP)/demos TOP2 := $(TOP)/demos
endif endif
###################################################################### ######################################################################
@ -23,7 +23,7 @@ endif
# defined by default as $(TOP)/config.mk # defined by default as $(TOP)/config.mk
# #
ifndef CONFIG_MK ifndef CONFIG_MK
CONFIG_MK := $(TOP)/config.mk CONFIG_MK := $(TOP)/config.mk
endif endif
#################################################################### ####################################################################
@ -32,228 +32,223 @@ endif
# If not, issue a warning message, then stop there.. # If not, issue a warning message, then stop there..
# #
ifeq ($(wildcard $(CONFIG_MK)),) ifeq ($(wildcard $(CONFIG_MK)),)
no_config_mk := 1 no_config_mk := 1
endif endif
ifdef no_config_mk ifdef no_config_mk
exes: exes:
@echo Please compile the library before the demo programs! @echo Please compile the library before the demo programs!
clean distclean: clean distclean:
@echo "I need \`$(TOP)/config.mk' to do that!" @echo "I need \`$(TOP)/config.mk' to do that!"
else else
#################################################################### ####################################################################
# #
# Good, now include the `config.mk' in order to know how to build # Good, now include the `config.mk' in order to know how to build
# object files from sources, as well as other things (compiler flags) # object files from sources, as well as other things (compiler flags)
# #
include $(CONFIG_MK) include $(CONFIG_MK)
####################################################################
#
# Define a few important variables now
#
#
TOP_ := $(TOP)$(SEP)
TOP2_ := $(TOP2)$(SEP)
SRC_ := $(TOP)$(SEP)src$(SEP)
BIN_ := bin$(SEP)
OBJ_ := obj$(SEP)
GRAPH_DIR := graph
ifeq ($(TOP),..)
SRC_DIR := src
else
SRC_DIR := $(TOP2_)src
endif
SRC_DIR_ := $(SRC_DIR)$(SEP)
FT_INCLUDES := $(BUILD) $(TOP_)config $(TOP_)include $(SRC_)base $(SRC_DIR)
TT_INCLUDES := $(SRC_)shared $(SRC_)truetype
T1_INCLUDES := $(SRC_)shared $(SRC_)type1
COMPILE = $(CC) $(CFLAGS) $(INCLUDES:%=$I%)
LINK := $(CC)
FTLIB := $(TOP_)$(LIB_DIR)$(SEP)$(LIBRARY).$A
# the default commands used to link the executables. These can
# be re-defined for platform-specific stuff..
#
LINK = $(CC) $T$@ $< $(FTLIB) $(EFENCE)
COMMON_LINK = $(LINK) $(COMMON_OBJ)
GRAPH_LINK = $(COMMON_LINK) $(GRAPH_LIB)
.PHONY: exes clean distclean ####################################################################
#
# Define a few important variables now
#
TOP_ := $(TOP)$(SEP)
TOP2_ := $(TOP2)$(SEP)
SRC_ := $(TOP)$(SEP)src$(SEP)
################################################################### BIN_ := bin$(SEP)
# OBJ_ := obj$(SEP)
# Include the rules needed to compile the graphics sub-system.
# This will also select which graphics driver to compile to the
# sub-system..
#
include $(GRAPH_DIR)/rules.mk
#################################################################### GRAPH_DIR := graph
#
# Detect DOS-like platforms, currently DOS, Win 3.1, Win32 & OS/2 ifeq ($(TOP),..)
# SRC_DIR := src
# else
ifneq ($(findstring $(PLATFORM),os2 win16 win32 dos),) SRC_DIR := $(TOP2_)src
DOSLIKE := 1 endif
endif
SRC_DIR_ := $(SRC_DIR)$(SEP)
FT_INCLUDES := $(BUILD) $(TOP_)config $(TOP_)include $(SRC_)base $(SRC_DIR)
TT_INCLUDES := $(SRC_)shared $(SRC_)truetype
T1_INCLUDES := $(SRC_)shared $(SRC_)type1
COMPILE = $(CC) $(CFLAGS) $(INCLUDES:%=$I%)
LINK := $(CC)
FTLIB := $(TOP_)$(LIB_DIR)$(SEP)$(LIBRARY).$A
# the default commands used to link the executables. These can
# be re-defined for platform-specific stuff..
#
LINK = $(CC) $T$@ $< $(FTLIB) $(EFENCE)
COMMON_LINK = $(LINK) $(COMMON_OBJ)
GRAPH_LINK = $(COMMON_LINK) $(GRAPH_LIB)
.PHONY: exes clean distclean
###################################################################
#
# Include the rules needed to compile the graphics sub-system.
# This will also select which graphics driver to compile to the
# sub-system..
#
include $(GRAPH_DIR)/rules.mk
####################################################################
#
# Detect DOS-like platforms, currently DOS, Win 3.1, Win32 & OS/2
#
ifneq ($(findstring $(PLATFORM),os2 win16 win32 dos),)
DOSLIKE := 1
endif
################################################################### ###################################################################
# #
# Clean-up rules. Because the `del' command on DOS-like platforms # Clean-up rules. Because the `del' command on DOS-like platforms
# cannot take a long list of arguments, we simply erase the directory # cannot take a long list of arguments, we simply erase the directory
# contents.. # contents.
# #
ifdef DOSLIKE
ifdef DOSLIKE clean_demo:
clean_demo: -del obj\*.$O 2> nul
-del obj\*.$O 2> nul -del $(subst /,\,$(TOP2))\src\*.bak 2> nul
-del $(subst /,\,$(TOP2))\src\*.bak 2> nul
distclean_demo: clean_demo distclean_demo: clean_demo
-del obj\*.lib 2> nul -del obj\*.lib 2> nul
-del bin\*.exe 2> nul -del bin\*.exe 2> nul
else
clean_demo: else
-$(DELETE) $(OBJ_)*.$O
-$(DELETE) $(SRC_)*.bak graph$(SEP)*.bak
-$(DELETE) $(SRC_)*~ graph$(SEP)*~
distclean_demo: clean_demo clean_demo:
-$(DELETE) $(EXES:%=$(BIN_)%$E) -$(DELETE) $(OBJ_)*.$O
-$(DELETE) $(GRAPH_LIB) -$(DELETE) $(SRC_)*.bak graph$(SEP)*.bak
endif -$(DELETE) $(SRC_)*~ graph$(SEP)*~
clean: clean_demo distclean_demo: clean_demo
distclean: distclean_demo -$(DELETE) $(EXES:%=$(BIN_)%$E)
-$(DELETE) $(GRAPH_LIB)
#################################################################### endif
#
# Compute the executable suffix to use, and put it in `E'.
# It is ".exe" on DOS-ish platforms, and nothing otherwise
#
ifdef DOSLIKE
E := .exe
else
E :=
endif
################################################################### clean: clean_demo
# distclean: distclean_demo
# The list of demonstration programs to build.
#
EXES := ftlint ftview fttimer
ifneq ($(findstring $(PLATFORM),os2 unix),) ####################################################################
EXES += ttdebug #
endif # Compute the executable suffix to use, and put it in `E'.
# It is ".exe" on DOS-ish platforms, and nothing otherwise.
#
ifdef DOSLIKE
E := .exe
else
E :=
endif
exes: $(EXES:%=$(BIN_)%$E) ###################################################################
#
# The list of demonstration programs to build.
#
EXES := ftlint ftview fttimer
ifneq ($(findstring $(PLATFORM),os2 unix),)
EXES += ttdebug
endif
exes: $(EXES:%=$(BIN_)%$E)
INCLUDES := $(FT_INCLUDES) INCLUDES := $(FT_INCLUDES)
#################################################################### ####################################################################
# #
# Rules for compiling object files for text-only demos # Rules for compiling object files for text-only demos
# #
COMMON_OBJ := $(OBJ_)common.$O
COMMON_OBJ := $(OBJ_)common.$O $(COMMON_OBJ): $(SRC_DIR_)common.c
$(COMMON_OBJ): $(SRC_DIR_)common.c ifdef DOSLIKE
ifdef DOSLIKE $(COMPILE) $T$@ $< $DEXPAND_WILDCARDS
$(COMPILE) $T$@ $< $DEXPAND_WILDCARDS else
else $(COMPILE) $T$@ $<
$(COMPILE) $T$@ $< endif
endif
$(OBJ_)%.$O: $(SRC_DIR_)%.c $(FTLIB) $(OBJ_)%.$O: $(SRC_DIR_)%.c $(FTLIB)
$(COMPILE) $T$@ $< $(COMPILE) $T$@ $<
$(OBJ_)ftlint.$O: $(SRC_DIR_)ftlint.c $(OBJ_)ftlint.$O: $(SRC_DIR_)ftlint.c
$(COMPILE) $T$@ $< $(COMPILE) $T$@ $<
$(OBJ_)fttry.$O: $(SRC_DIR_)fttry.c $(OBJ_)fttry.$O: $(SRC_DIR_)fttry.c
$(COMPILE) $T$@ $< $(COMPILE) $T$@ $<
$(OBJ_)ftview.$O: $(SRC_DIR_)ftview.c $(GRAPH_LIB) $(OBJ_)ftview.$O: $(SRC_DIR_)ftview.c $(GRAPH_LIB)
$(COMPILE) $(GRAPH_INCLUDES:%=$I%) $T$@ $< $(COMPILE) $(GRAPH_INCLUDES:%=$I%) $T$@ $<
$(OBJ_)fttimer.$O: $(SRC_DIR_)fttimer.c $(GRAPH_LIB) $(OBJ_)fttimer.$O: $(SRC_DIR_)fttimer.c $(GRAPH_LIB)
$(COMPILE) $(GRAPH_INCLUDES:%=$I%) $T$@ $< $(COMPILE) $(GRAPH_INCLUDES:%=$I%) $T$@ $<
#$(OBJ_)ftsbit.$O: $(SRC_DIR)/ftsbit.c $(GRAPH_LIB) # $(OBJ_)ftsbit.$O: $(SRC_DIR)/ftsbit.c $(GRAPH_LIB)
# $(COMPILE) $T$@ $< # $(COMPILE) $T$@ $<
#################################################################### ####################################################################
# #
# Special rule to compile the `t1dump' program as it includes # Special rule to compile the `t1dump' program as it includes
# the Type1 source path # the Type1 source path
# #
$(OBJ_)t1dump.$O: $(SRC_DIR)/t1dump.c $(OBJ_)t1dump.$O: $(SRC_DIR)/t1dump.c
$(COMPILE) $(T1_INCLUDES:%=$I%) $T$@ $< $(COMPILE) $(T1_INCLUDES:%=$I%) $T$@ $<
#################################################################### ####################################################################
# #
# Special rule to compile the `ttdebug' program as it includes # Special rule to compile the `ttdebug' program as it includes
# the TrueType source path and needs extra flags for correct keyboard # the TrueType source path and needs extra flags for correct keyboard
# handling on Unix # handling on Unix
#
# POSIX TERMIOS: Do not define if you use OLD U*ix like 4.2BSD. # POSIX TERMIOS: Do not define if you use OLD U*ix like 4.2BSD.
# #
# detect a Unix system # detect a Unix system
ifeq ($(PLATFORM),unix) ifeq ($(PLATFORM),unix)
EXTRAFLAGS = $DUNIX $DHAVE_POSIX_TERMIOS EXTRAFLAGS = $DUNIX $DHAVE_POSIX_TERMIOS
endif endif
$(OBJ_)ttdebug.$O: $(SRC_DIR)/ttdebug.c $(OBJ_)ttdebug.$O: $(SRC_DIR)/ttdebug.c
$(COMPILE) $(TT_INCLUDES:%=$I%) $T$@ $< $(EXTRAFLAGS) $(COMPILE) $(TT_INCLUDES:%=$I%) $T$@ $< $(EXTRAFLAGS)
#################################################################### ####################################################################
# #
# Rules used to link the executables. Note that they could be # Rules used to link the executables. Note that they could be
# over-ridden by system-specific things.. # over-ridden by system-specific things..
# #
$(BIN_)ftlint$E: $(OBJ_)ftlint.$O $(FTLIB) $(COMMON_OBJ)
$(COMMON_LINK)
$(BIN_)ftlint$E: $(OBJ_)ftlint.$O $(FTLIB) $(COMMON_OBJ) $(BIN_)fttry$E: $(OBJ_)fttry.$O $(FTLIB)
$(COMMON_LINK) $(LINK)
$(BIN_)ftsbit$E: $(OBJ_)ftsbit.$O $(FTLIB)
$(LINK)
$(BIN_)t1dump$E: $(OBJ_)t1dump.$O $(FTLIB)
$(LINK)
$(BIN_)ttdebug$E: $(OBJ_)ttdebug.$O $(FTLIB)
$(LINK)
$(BIN_)fttry$E: $(OBJ_)fttry.$O $(FTLIB) $(BIN_)ftview$E: $(OBJ_)ftview.$O $(FTLIB) $(GRAPH_LIB) $(COMMON_OBJ)
$(LINK) $(GRAPH_LINK)
$(BIN_)fttimer$E: $(OBJ_)fttimer.$O $(FTLIB) $(GRAPH_LIB) $(COMMON_OBJ)
$(BIN_)ftsbit$E: $(OBJ_)ftsbit.$O $(FTLIB) $(GRAPH_LINK)
$(LINK)
$(BIN_)t1dump$E: $(OBJ_)t1dump.$O $(FTLIB)
$(LINK)
$(BIN_)ttdebug$E: $(OBJ_)ttdebug.$O $(FTLIB)
$(LINK)
$(BIN_)ftview$E: $(OBJ_)ftview.$O $(FTLIB) $(GRAPH_LIB) $(COMMON_OBJ)
$(GRAPH_LINK)
$(BIN_)fttimer$E: $(OBJ_)fttimer.$O $(FTLIB) $(GRAPH_LIB) $(COMMON_OBJ)
$(GRAPH_LINK)
endif endif
# EOF

View File

@ -13,23 +13,21 @@
# the current path. # the current path.
# #
ifneq ($(findstring X11R6$(SEP)bin,$(PATH)),) ifneq ($(findstring X11R6$(SEP)bin,$(PATH)),)
xversion := X11R6 xversion := X11R6
else else
ifneq ($(findstring X11R5$(SEP)bin,$(PATH)),)
ifneq ($(findstring X11R5$(SEP)bin,$(PATH)),) xversion := X11R5
xversion := X11R5 else
else ifneq ($(findstring X11$(SEP)bin,$(PATH)),)
xversion := X11
ifneq ($(findstring X11$(SEP)bin,$(PATH)),) endif
xversion := X11 endif
endif
endif
endif endif
ifdef xversion ifdef xversion
X11_PATH := $(subst ;, ,$(PATH)) $(subst :, ,$(PATH)) X11_PATH := $(subst ;, ,$(PATH)) $(subst :, ,$(PATH))
X11_PATH := $(filter %$(xversion)$(SEP)bin,$(X11_PATH)) X11_PATH := $(filter %$(xversion)$(SEP)bin,$(X11_PATH))
X11_PATH := $(X11_PATH:%$(SEP)bin=%) X11_PATH := $(X11_PATH:%$(SEP)bin=%)
endif endif
########################################################################## ##########################################################################
@ -41,41 +39,38 @@ endif
# #
ifneq ($(X11_PATH),) ifneq ($(X11_PATH),)
X11_INCLUDE := $(X11_PATH:%=%$(SEP)include) X11_INCLUDE := $(X11_PATH:%=%$(SEP)include)
X11_LIB := $(X11_PATH:%=%$(SEP)lib) X11_LIB := $(X11_PATH:%=%$(SEP)lib)
# the GRAPH_LINK variable is expanded each time an executable is linked against # the GRAPH_LINK variable is expanded each time an executable is linked
# the graphics library.. # against the graphics library.
# #
GRAPH_LINK += -L$(X11_LIB) -lX11 GRAPH_LINK += $(X11_LIB:%=-L%) -lX11
# Solaris needs a -lsocket in GRAPH_LINK .. # Solaris needs a -lsocket in GRAPH_LINK ..
# #
UNAME := $(shell uname) UNAME := $(shell uname)
ifneq ($(findstring $(UNAME),SunOS Solaris),) ifneq ($(findstring $(UNAME),SunOS Solaris),)
GRAPH_LINK += -lsocket GRAPH_LINK += -lsocket
endif
# add the X11 driver object file to the graphics library
#
GRAPH_OBJS += $(OBJ_)grx11.$O
GR_X11 := $(GRAPH_)x11
GR_X11_ := $(GR_X11)$(SEP)
DEVICES += X11
DEVICE_INCLUDES += $(GR_X11)
# the rule used to compile the X11 driver
#
$(OBJ_)grx11.$O: $(GR_X11_)grx11.c $(GR_X11_)grx11.h
$(CC) $(CFLAGS) $(GRAPH_INCLUDES:%=$I%) $I$(GR_X11) \
$(X11_INCLUDE:%=$I%) $T$@ $<
endif endif
# EOF
# add the X11 driver object file to the graphics library
#
GRAPH_OBJS += $(OBJ_)grx11.$O
GR_X11 := $(GRAPH_)x11
GR_X11_ := $(GR_X11)$(SEP)
DEVICES += X11
DEVICE_INCLUDES += $(GR_X11)
# the rule used to compile the X11 driver
#
$(OBJ_)grx11.$O: $(GR_X11_)grx11.c $(GR_X11_)grx11.h
$(CC) $(CFLAGS) $(GRAPH_INCLUDES:%=$I%) $I$(GR_X11) \
$(X11_INCLUDE:%=$I%) $T$@ $<
endif

View File

@ -44,7 +44,7 @@ typedef enum FT_Frame_Op_
ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ), ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),
ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ), ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),
ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ), ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ), ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 )
} FT_Frame_Op; } FT_Frame_Op;

View File

@ -1,98 +1,61 @@
#**************************************************************************** #
#* * # FreeType 2 base layer configuration rules
#* Base layer Makefile * #
#* *
#* Copyright 1996-1999 by *
#* 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. *
#* *
#****************************************************************************
#**************************************************************************** # Copyright 1996-2000 by
#* * # David Turner, Robert Wilhelm, and Werner Lemberg.
#* IMPORTANT NOTE: This Makefile is intended for GNU Make! * #
#* If you provide Makefiles for other make utilities, * # This file is part of the FreeType project, and may only be used modified
#* please place them in `freetype/lib/arch/<system>.' * # 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
#* This file is to be included by the root FreeType sub-Makefile, usually * # fully.
#* named `freetype/lib/Makefile.lib.' Here is the list of the variables *
#* that must be defined to use it: *
#* * # It sets the following variables, which are used by the master Makefile
#* BASE_DIR: The location of the base layer's directory. This is * # after the call:
#* usually `freetype/lib/base.' * #
#* * # BASE_H: The list of base layer header files on which the rest
#* ARCH_DIR: The location of the architecture-dependent directory. * # of the library (i.e., drivers) rely.
#* This is usually `freetype/lib/arch/<system>.' * #
#* * # BASE_OBJ_S: The single-object base layer.
#* OBJ_DIR: The location where the compiled object(s) file will be * # BASE_OBJ_M: A list of all objects for a multiple-objects build.
#* placed. * # BASE_EXT_OBJ: A list of base layer extensions, i.e., components found
#* * # in `freetype/lib/base' which are not compiled within the
#* FT_CFLAGS: A set of flags used for compilation of object files. * # base layer proper.
#* This contains at least the include paths of the `arch' *
#* and `base' directories + optimization + warnings + *
#* ANSI compliance. *
#* *
#* FT_IFLAGS: The flag used to specify an include path on the compiler *
#* command line. For example, with GCC, this is `-I', while *
#* some other compilers use `/i=' or `-J', etc. *
#* *
#* FT_OBJ: The suffix of an object file for the platform. Can be *
#* `o', `obj', `coff', `tco', etc. *
#* *
#* FT_CC: The C compiler to use. *
#* *
#* *
#* It sets the following variables, which are used by the parent Makefile *
#* after the call: *
#* *
#* BASE_H: The list of base layer header files on which the rest *
#* of the library (i.e., drivers) rely. *
#* *
#* BASE_OBJ_S: The single-object base layer. *
#* BASE_OBJ_M: A list of all objects for a multiple-objects build. *
#* BASE_EXT_OBJ: A list of base layer extensions, i.e., components *
#* found in `freetype/lib/base' which are not compiled *
#* within the base layer proper. *
#* *
#****************************************************************************
INCLUDES += $(SRC_)base INCLUDES += $(SRC_)base
# Base layer sources # Base layer sources
# #
BASE_SRC := $(BASE_)ftstream.c \ BASE_SRC := $(BASE_)ftcalc.c \
$(BASE_)ftcalc.c \
$(BASE_)ftobjs.c \
$(BASE_)ftextend.c \ $(BASE_)ftextend.c \
$(BASE_)ftlist.c $(BASE_)ftlist.c \
$(BASE_)ftobjs.c \
$(BASE_)ftstream.c
# Base layer headers # Base layer headers
# #
BASE_H := $(BASE_)ftcalc.h \ BASE_H := $(BASE_)ftcalc.h \
$(BASE_)ftobjs.h \ $(BASE_)ftdebug.h \
$(BASE_)ftdriver.h \ $(BASE_)ftdriver.h \
$(BASE_)ftextend.h \ $(BASE_)ftextend.h \
$(BASE_)ftlist.h $(BASE_)ftlist.h \
$(BASE_)ftobjs.h \
$(BASE_)ftstream.h
# Base layer `extensions' sources # Base layer `extensions' sources
# #
# An extension is added to the library file (.a or .lib) as a separate # An extension is added to the library file (.a or .lib) as a separate
# object. It will then be linked to the final executable only if one of # object. It will then be linked to the final executable only if one of its
# its symbols is used by the application. # symbols is used by the application.
# #
BASE_EXT_SRC := $(BASE_)ftbbox.c \ BASE_EXT_SRC := $(BASE_)ftbbox.c \
$(BASE_)ftraster.c \ $(BASE_)ftraster.c \
$(BASE_)ftoutln.c $(BASE_)ftoutln.c
# Base layer extensions headers # Base layer extensions headers
# #
BASE_EXT_H := $(BASE_EXT_SRC:%c=%h) BASE_EXT_H := $(BASE_EXT_SRC:%c=%h)
@ -100,11 +63,11 @@ BASE_EXT_H := $(BASE_EXT_SRC:%c=%h)
# Base layer object(s) # Base layer object(s)
# #
# BASE_OBJ_M is used during `multi' builds (each base source file # BASE_OBJ_M is used during `multi' builds (each base source file compiles
# compiles to a single object file). # to a single object file).
# #
# BASE_OBJ_S is used during `single' builds (the whole base layer # BASE_OBJ_S is used during `single' builds (the whole base layer is
# is compiled as a single object file using ftbase.c). # compiled as a single object file using ftbase.c).
# #
BASE_OBJ_M := $(BASE_SRC:$(BASE_)%.c=$(OBJ_)%.$O) BASE_OBJ_M := $(BASE_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
BASE_OBJ_S := $(OBJ_)ftbase.$O BASE_OBJ_S := $(OBJ_)ftbase.$O
@ -132,5 +95,4 @@ $(OBJ_)ft%.$O: $(BASE_)ft%.c $(PUBLIC_H) $(BASE_H)
$(BASE_OBJ_S): $(PUBLIC_H) $(BASE_H) $(BASE_SRC_S) $(BASE_SRC) $(BASE_OBJ_S): $(PUBLIC_H) $(BASE_H) $(BASE_SRC_S) $(BASE_SRC)
$(FT_COMPILE) $T$@ $(BASE_SRC_S) $(FT_COMPILE) $T$@ $(BASE_SRC_S)
# EOF
# END

View File

@ -2,5 +2,6 @@ make_module_list: add_psnames_driver
add_psnames_driver: add_psnames_driver:
$(OPEN_DRIVER)psnames_driver_interface$(CLOSE_DRIVER) $(OPEN_DRIVER)psnames_driver_interface$(CLOSE_DRIVER)
$(ECHO_DRIVER)psnames $(ECHO_DRIVER_DESC) Postscript & Unicode Glyph name handling $(ECHO_DRIVER_DONE) $(ECHO_DRIVER)psnames $(ECHO_DRIVER_DESC)Postscript & Unicode Glyph name handling$(ECHO_DRIVER_DONE)
# EOF

View File

@ -1,89 +1,90 @@
#**************************************************************************** #
#* * # FreeType 2 PSNames driver configuration rules
#* PSNames driver Makefile * #
#* *
#* Copyright 1996-2000 by *
#* David Turner, Robert Wilhelm, and Werner Lemberg. * # Copyright 1996-2000 by
#* * # 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 * # This file is part of the FreeType project, and may only be used modified
#* license, LICENSE.TXT. By continuing to use, modify, or distribute * # and distributed under the terms of the FreeType project license,
#* this file you indicate that you have read the license and * # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* understand and accept it fully. * # indicate that you have read the license and understand and accept it
#* * # fully.
#****************************************************************************
ifndef PSNAMES_INCLUDE ifndef PSNAMES_INCLUDE
PSNAMES_INCLUDED := 1 PSNAMES_INCLUDED := 1
include $(SRC_)shared/rules.mk include $(SRC_)shared/rules.mk
# PSNAMES driver directory # PSNAMES driver directory
# #
PSNAMES_DIR := $(SRC_)psnames PSNAMES_DIR := $(SRC_)psnames
PSNAMES_DIR_ := $(PSNAMES_DIR)$(SEP) PSNAMES_DIR_ := $(PSNAMES_DIR)$(SEP)
# additional include flags used when compiling the driver # additional include flags used when compiling the driver
# #
PSNAMES_INCLUDE := $(SHARED) $(PSNAMES_DIR) PSNAMES_INCLUDE := $(SHARED) $(PSNAMES_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
PSNAMES_CFLAGS := $(PSNAMES_INCLUDE:%=$I%) PSNAMES_CFLAGS := $(PSNAMES_INCLUDE:%=$I%)
PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS) PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS)
# TrueType driver sources (i.e., C files) # driver sources (i.e., C files)
# #
PSNAMES_DRV_SRC := $(PSNAMES_DIR_)psdriver.c PSNAMES_DRV_SRC := $(PSNAMES_DIR_)psdriver.c
# TrueType driver headers # driver headers
# #
PSNAMES_DRV_H := $(SHARED_H) \ PSNAMES_DRV_H := $(SHARED_H) \
$(PSNAMES_DIR_)psdriver.h \ $(PSNAMES_DIR_)psdriver.h \
$(PSNAMES_DIR_)pstables.h $(PSNAMES_DIR_)pstables.h
# driver object(s) # driver object(s)
# #
# PSNAMES_DRV_OBJ_M is used during `debug' builds # PSNAMES_DRV_OBJ_M is used during `debug' builds
# PSNAMES_DRV_OBJ_S is used during `release' builds # PSNAMES_DRV_OBJ_S is used during `release' builds
# #
PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR_)%.c=$(OBJ_)%.$O) PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR_)%.c=$(OBJ_)%.$O)
PSNAMES_DRV_OBJ_S := $(OBJ_)psnames.$O PSNAMES_DRV_OBJ_S := $(OBJ_)psnames.$O
# driver root source file(s) # driver source file(s)
# #
PSNAMES_DRV_SRC_M := $(PSNAMES_DRV_SRC) PSNAMES_DRV_SRC_M := $(PSNAMES_DRV_SRC)
PSNAMES_DRV_SRC_S := $(PSNAMES_DIR_)psdriver.c PSNAMES_DRV_SRC_S := $(PSNAMES_DIR_)psdriver.c
# driver - single object # driver - single object
# #
# the driver is recompiled if any of the header or source files is changed # the driver is recompiled if any of the header or source files is
# as well as any of the shared source files found in `shared/sfnt' # changed as well as any of the shared source files found in
# # `shared'
$(PSNAMES_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H) $(PSNAMES_DRV_SRC) $(PSNAMES_DRV_SRC_S) #
$(PSNAMES_COMPILE) $T$@ $(PSNAMES_DRV_SRC_S) $(PSNAMES_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H) \
$(PSNAMES_DRV_SRC) $(PSNAMES_DRV_SRC_S)
$(PSNAMES_COMPILE) $T$@ $(PSNAMES_DRV_SRC_S)
# driver - multiple objects
# driver - multiple objects #
# # All objects are recompiled if any of the header files is changed.
# All objects are recompiled if any of the header files is changed #
# $(OBJ_)ps%.$O: $(PSNAMES_DIR_)ps%.c $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H)
$(OBJ_)ps%.$O: $(PSNAMES_DIR_)ps%.c $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H) $(PSNAMES_COMPILE) $T$@ $<
$(PSNAMES_COMPILE) $T$@ $<
# update main driver object lists # update main driver object lists
# #
DRV_OBJS_S += $(PSNAMES_DRV_OBJ_S) DRV_OBJS_S += $(PSNAMES_DRV_OBJ_S)
DRV_OBJS_M += $(PSNAMES_DRV_OBJ_M) DRV_OBJS_M += $(PSNAMES_DRV_OBJ_M)
endif endif
# END
# EOF

View File

@ -2,5 +2,6 @@ make_module_list: add_sfnt_driver
add_sfnt_driver: add_sfnt_driver:
$(OPEN_DRIVER)sfnt_driver_interface$(CLOSE_DRIVER) $(OPEN_DRIVER)sfnt_driver_interface$(CLOSE_DRIVER)
$(ECHO_DRIVER)sfnt $(ECHO_DRIVER_DESC) pseudo-driver for TrueType & OpenType formats $(ECHO_DRIVER_DONE) $(ECHO_DRIVER)sfnt $(ECHO_DRIVER_DESC)pseudo-driver for TrueType & OpenType formats$(ECHO_DRIVER_DONE)
# EOF

View File

@ -1,165 +1,100 @@
#**************************************************************************** #
#* * # FreeType 2 DFNT driver configuration rules
#* SFNT driver Makefile * #
#* *
#* Copyright 1996-1999 by *
#* 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. *
#* *
#****************************************************************************
#**************************************************************************** # Copyright 1996-2000 by
#* * # David Turner, Robert Wilhelm, and Werner Lemberg.
#* IMPORTANT NOTE: This Makefile is intended for GNU Make! * #
#* If you provide Makefiles for other make utilities, * # This file is part of the FreeType project, and may only be used modified
#* please place them in `freetype/lib/arch/<system>'. * # 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
#* This file is to be included by the FreeType Makefile.lib, located in * # fully.
#* the `freetype/lib' directory. Here is the list of the variables that *
#* must be defined to use it: *
#* *
#* *
#* BASE_DIR: The location of the base layer's directory. This is *
#* usually `freetype/lib/base'. *
#* *
#* ARCH_DIR: The location of the architecture-dependent directory. *
#* This is usually `freetype/lib/arch/<system>'. *
#* *
#* DRIVERS_DIR: The location of the font driver sub-dirs, usually *
#* `freetype/lib/drivers'. *
#* *
#* OBJ_DIR: The location where the compiled object(s) file will be *
#* placed. *
#* *
#* BASE_H: A list of pathnames to the base layer's header files on *
#* which the driver depends. *
#* *
#* FT_CFLAGS: A set of flags used for compilation of object files. *
#* This contains at least the include paths of the arch *
#* and base directories + optimization + warnings + ANSI *
#* compliance. *
#* *
#* FT_IFLAG: The flag used to specify an include path on the *
#* compiler command line. For example, with GCC, this is *
#* `-I', while some other compilers use `/i=' or `-J', *
#* etc. *
#* *
#* FT_OBJ: The suffix of an object file for the platform; can be *
#* `o', `obj', `coff', `tco', etc. depending on the *
#* platform. *
#* *
#* *
#* It also updates the following variables defined and used in the main *
#* Makefile: *
#* *
#* DRV_OBJ_S: The list of driver object files in *
#* single-object mode. *
#* *
#* DRV_OBJ_M: The list of driver object files in *
#* multiple-objects mode. *
#* *
#* FTINIT_DRIVER_PATHS: The list of include paths used to compile the *
#* `ftinit' component which registers all font *
#* drivers in the FT_Init_FreeType() function. *
#* *
#* FTINIT_DRIVER_H: The list of header dependencies used to *
#* compile the `ftinit' component. *
#* *
#* FTINIT_DRIVER_MACROS: The list of macros to be defined when *
#* compiling the `ftinit' component. *
#* *
#* `Single-object compilation' means that each font driver is compiled *
#* into a single object file. This is useful to get rid of all *
#* driver-specific entries. *
#* *
#****************************************************************************
ifndef SFNT_INCLUDE ifndef SFNT_INCLUDE
SFNT_INCLUDED := 1 SFNT_INCLUDED := 1
include $(SRC_)shared/rules.mk include $(SRC_)shared/rules.mk
# SFNT driver directory # SFNT driver directory
# #
SFNT_DIR := $(SRC_)sfnt SFNT_DIR := $(SRC_)sfnt
SFNT_DIR_ := $(SFNT_DIR)$(SEP) SFNT_DIR_ := $(SFNT_DIR)$(SEP)
# additional include flags used when compiling the driver # additional include flags used when compiling the driver
# #
SFNT_INCLUDE := $(SHARED) $(SFNT_DIR) SFNT_INCLUDE := $(SHARED) $(SFNT_DIR)
# compilation flags for the driver # compilation flags for the driver
# #
SFNT_CFLAGS := $(SFNT_INCLUDE:%=$I%) SFNT_CFLAGS := $(SFNT_INCLUDE:%=$I%)
SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS) SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS)
# TrueType driver sources (i.e., C files) # driver sources (i.e., C files)
# #
SFNT_DRV_SRC := $(SFNT_DIR_)ttload.c \ SFNT_DRV_SRC := $(SFNT_DIR_)ttload.c \
$(SFNT_DIR_)ttcmap.c \ $(SFNT_DIR_)ttcmap.c \
$(SFNT_DIR_)ttsbit.c \ $(SFNT_DIR_)ttsbit.c \
$(SFNT_DIR_)ttpost.c \ $(SFNT_DIR_)ttpost.c \
$(SFNT_DIR_)sfdriver.c \ $(SFNT_DIR_)sfdriver.c
# TrueType driver headers # driver headers
# #
SFNT_DRV_H := $(SHARED_H) \ SFNT_DRV_H := $(SHARED_H) \
$(SFNT_DIR_)sfconfig.h \ $(SFNT_DIR_)sfconfig.h \
$(SFNT_DIR_)ttload.h \ $(SFNT_DIR_)ttload.h \
$(SFNT_DIR_)ttsbit.h \ $(SFNT_DIR_)ttsbit.h \
$(SFNT_DIR_)ttcmap.h \ $(SFNT_DIR_)ttcmap.h \
$(SFNT_DIR_)ttpost.h $(SFNT_DIR_)ttpost.h
# driver object(s) # driver object(s)
# #
# SFNT_DRV_OBJ_M is used during `debug' builds # SFNT_DRV_OBJ_M is used during `debug' builds
# SFNT_DRV_OBJ_S is used during `release' builds # SFNT_DRV_OBJ_S is used during `release' builds
# #
SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR_)%.c=$(OBJ_)%.$O) SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR_)%.c=$(OBJ_)%.$O)
SFNT_DRV_OBJ_S := $(OBJ_)sfnt.$O SFNT_DRV_OBJ_S := $(OBJ_)sfnt.$O
# driver root source file(s) # driver source file(s)
# #
SFNT_DRV_SRC_M := $(SFNT_DRV_SRC) SFNT_DRV_SRC_M := $(SFNT_DRV_SRC)
SFNT_DRV_SRC_S := $(SFNT_DIR_)sfnt.c SFNT_DRV_SRC_S := $(SFNT_DIR_)sfnt.c
# driver - single object # driver - single object
# #
# the driver is recompiled if any of the header or source files is changed # the driver is recompiled if any of the header or source files is
# as well as any of the shared source files found in `shared/sfnt' # changed as well as any of the shared source files found in
# # `shared'
$(SFNT_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(SFNT_DRV_H) $(SFNT_DRV_SRC) $(SFNT_DRV_SRC_S) #
$(SFNT_COMPILE) $T$@ $(SFNT_DRV_SRC_S) $(SFNT_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(SFNT_DRV_H) \
$(SFNT_DRV_SRC) $(SFNT_DRV_SRC_S)
$(SFNT_COMPILE) $T$@ $(SFNT_DRV_SRC_S)
# driver - multiple objects
#
# All objects are recompiled if any of the header files is changed
#
$(OBJ_)tt%.$O: $(SFNT_DIR_)tt%.c $(BASE_H) $(SHARED_H) $(SFNT_DRV_H)
$(SFNT_COMPILE) $T$@ $<
# driver - multiple objects $(OBJ_)sf%.$O: $(SFNT_DIR_)sf%.c $(BASE_H) $(SHARED_H) $(SFNT_DRV_H)
# $(SFNT_COMPILE) $T$@ $<
# All objects are recompiled if any of the header files is changed
#
$(OBJ_)tt%.$O: $(SFNT_DIR_)tt%.c $(BASE_H) $(SHARED_H) $(SFNT_DRV_H)
$(SFNT_COMPILE) $T$@ $<
$(OBJ_)sf%.$O: $(SFNT_DIR_)sf%.c $(BASE_H) $(SHARED_H) $(SFNT_DRV_H)
$(SFNT_COMPILE) $T$@ $<
# update main driver object lists # update main driver object lists
# #
DRV_OBJS_S += $(SFNT_DRV_OBJ_S) DRV_OBJS_S += $(SFNT_DRV_OBJ_S)
DRV_OBJS_M += $(SFNT_DRV_OBJ_M) DRV_OBJS_M += $(SFNT_DRV_OBJ_M)
endif endif
# END
# EOF

View File

@ -1,27 +1,27 @@
#**************************************************************************** #
#* * # FreeType 2 shared files configuration rules
#* shared files Makefile * #
#* *
#* Copyright 1996-2000 by *
#* David Turner, Robert Wilhelm, and Werner Lemberg. * # Copyright 1996-2000 by
#* * # 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 * # This file is part of the FreeType project, and may only be used modified
#* license, LICENSE.TXT. By continuing to use, modify, or distribute * # and distributed under the terms of the FreeType project license,
#* this file you indicate that you have read the license and * # LICENSE.TXT. By continuing to use, modify, or distribute this file you
#* understand and accept it fully. * # indicate that you have read the license and understand and accept it
#* * # fully.
#****************************************************************************
ifndef SHARED_RULES ifndef SHARED_RULES
SHARED_RULES := 1 SHARED_RULES := 1
SHARED := $(SRC_)shared SHARED := $(SRC_)shared
SHARED_ := $(SHARED)$(SEP) SHARED_ := $(SHARED)$(SEP)
SHARED_H := $(wildcard $(SHARED_)*.h) SHARED_H := $(wildcard $(SHARED_)*.h)
SHARED_SRC := $(wildcard $(SHARED_)*.c) SHARED_SRC := $(wildcard $(SHARED_)*.c)
endif endif
# END # EOF

View File

@ -2,5 +2,6 @@ make_module_list: add_truetype_driver
add_truetype_driver: add_truetype_driver:
$(OPEN_DRIVER)tt_driver_interface$(CLOSE_DRIVER) $(OPEN_DRIVER)tt_driver_interface$(CLOSE_DRIVER)
$(ECHO_DRIVER)truetype $(ECHO_DRIVER_DESC) Windows/Mac font files with extension *.ttf or *.ttc $(ECHO_DRIVER_DONE) $(ECHO_DRIVER)truetype $(ECHO_DRIVER_DESC)Windows/Mac font files with extension *.ttf or *.ttc$(ECHO_DRIVER_DONE)
# EOF

View File

@ -1,88 +1,20 @@
#**************************************************************************** #
#* * # FreeType 2 PSNames driver configuration rules
#* TrueType driver Makefile * #
#* *
#* Copyright 1996-1999 by *
#* 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. *
#* *
#****************************************************************************
#**************************************************************************** # Copyright 1996-2000 by
#* * # David Turner, Robert Wilhelm, and Werner Lemberg.
#* IMPORTANT NOTE: This Makefile is intended for GNU Make! * #
#* If you provide Makefiles for other make utilities, * # This file is part of the FreeType project, and may only be used modified
#* please place them in `freetype/lib/arch/<system>'. * # 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
#* This file is to be included by the FreeType Makefile.lib, located in * # fully.
#* the `freetype/lib' directory. Here is the list of the variables that *
#* must be defined to use it: *
#* *
#* *
#* BASE_DIR: The location of the base layer's directory. This is *
#* usually `freetype/lib/base'. *
#* *
#* ARCH_DIR: The location of the architecture-dependent directory. *
#* This is usually `freetype/lib/arch/<system>'. *
#* *
#* DRIVERS_DIR: The location of the font driver sub-dirs, usually *
#* `freetype/lib/drivers'. *
#* *
#* OBJ_DIR: The location where the compiled object(s) file will be *
#* placed. *
#* *
#* BASE_H: A list of pathnames to the base layer's header files on *
#* which the driver depends. *
#* *
#* FT_CFLAGS: A set of flags used for compilation of object files. *
#* This contains at least the include paths of the arch *
#* and base directories + optimization + warnings + ANSI *
#* compliance. *
#* *
#* FT_IFLAG: The flag used to specify an include path on the *
#* compiler command line. For example, with GCC, this is *
#* `-I', while some other compilers use `/i=' or `-J', *
#* etc. *
#* *
#* FT_OBJ: The suffix of an object file for the platform; can be *
#* `o', `obj', `coff', `tco', etc. depending on the *
#* platform. *
#* *
#* *
#* It also updates the following variables defined and used in the main *
#* Makefile: *
#* *
#* DRV_OBJ_S: The list of driver object files in *
#* single-object mode. *
#* *
#* DRV_OBJ_M: The list of driver object files in *
#* multiple-objects mode. *
#* *
#* FTINIT_DRIVER_PATHS: The list of include paths used to compile the *
#* `ftinit' component which registers all font *
#* drivers in the FT_Init_FreeType() function. *
#* *
#* FTINIT_DRIVER_H: The list of header dependencies used to *
#* compile the `ftinit' component. *
#* *
#* FTINIT_DRIVER_MACROS: The list of macros to be defined when *
#* compiling the `ftinit' component. *
#* *
#* `Single-object compilation' means that each font driver is compiled *
#* into a single object file. This is useful to get rid of all *
#* driver-specific entries. *
#* *
#****************************************************************************
# include the rules defined for the SFNT driver, which is heavily used
# by the TrueType one.. # Include the rules defined for the SFNT driver, which is heavily used
# by the TrueType one.
# #
include $(SRC_)sfnt/rules.mk include $(SRC_)sfnt/rules.mk
@ -109,23 +41,22 @@ TT_CFLAGS := $(TT_INCLUDE:%=$I%)
TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS) TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS)
# TrueType driver sources (i.e., C files) # driver sources (i.e., C files)
# #
TT_DRV_SRC := $(TT_DIR_)ttobjs.c \ TT_DRV_SRC := $(TT_DIR_)ttobjs.c \
$(TT_DIR_)ttpload.c \ $(TT_DIR_)ttpload.c \
$(TT_DIR_)ttgload.c \ $(TT_DIR_)ttgload.c \
$(TT_DIR_)ttinterp.c \ $(TT_DIR_)ttinterp.c \
$(TT_DIR_)ttdriver.c $(TT_DIR_)ttdriver.c
# driver headers
# TrueType driver headers
# #
TT_DRV_H := $(SFNT_H) \ TT_DRV_H := $(SFNT_H) \
$(TT_DIR_)ttconfig.h \ $(TT_DIR_)ttconfig.h \
$(TT_DRV_SRC:%.c=%.h) $(TT_DRV_SRC:%.c=%.h)
# default TrueType extensions sources # default extensions sources
# #
TT_EXT_SRC := $(TT_EXT_DIR_)ttxkern.c \ TT_EXT_SRC := $(TT_EXT_DIR_)ttxkern.c \
$(TT_EXT_DIR_)ttxgasp.c \ $(TT_EXT_DIR_)ttxgasp.c \
@ -133,8 +64,7 @@ TT_EXT_SRC := $(TT_EXT_DIR_)ttxkern.c \
$(TT_EXT_DIR_)ttxcmap.c \ $(TT_EXT_DIR_)ttxcmap.c \
$(TT_EXT_DIR_)ttxwidth.c $(TT_EXT_DIR_)ttxwidth.c
# default extensions headers
# default TrueType extensions headers
# #
TT_EXT_H := $(TT_EXT_SRC:.c=.h) TT_EXT_H := $(TT_EXT_SRC:.c=.h)
@ -153,8 +83,7 @@ TT_DRV_OBJ_S := $(OBJ_)truetype.$O
TT_EXT_OBJ := $(TT_EXT_SRC:$(TT_EXT_DIR_)%.c=$(OBJ_)%.$O) TT_EXT_OBJ := $(TT_EXT_SRC:$(TT_EXT_DIR_)%.c=$(OBJ_)%.$O)
# driver source file(s)
# driver root source file(s)
# #
TT_DRV_SRC_M := $(TT_DRV_SRC) $(SFNT_SRC) TT_DRV_SRC_M := $(TT_DRV_SRC) $(SFNT_SRC)
TT_DRV_SRC_S := $(TT_DIR_)truetype.c TT_DRV_SRC_S := $(TT_DIR_)truetype.c
@ -184,15 +113,9 @@ $(OBJ_)tt%.$O: $(SFNT_DIR_)tt%.c $(BASE_H) $(SFNT_H)
$(TT_COMPILE) $T$@ $< $(TT_COMPILE) $T$@ $<
# treat `ttpload' as a special case, as it includes C files
#
$(OBJ_)ttpload.$O: $(TT_DIR_)ttpload.c $(BASE_H) $(SFNT_SRC) $(TT_DRV_H)
$(TT_COMPILE) $T$@ $<
# update main driver object lists # update main driver object lists
# #
DRV_OBJS_S += $(TT_DRV_OBJ_S) DRV_OBJS_S += $(TT_DRV_OBJ_S)
DRV_OBJS_M += $(TT_DRV_OBJ_M) DRV_OBJS_M += $(TT_DRV_OBJ_M)
# END # EOF

View File

@ -2,5 +2,6 @@ make_module_list: add_type1z_driver
add_type1z_driver: add_type1z_driver:
$(OPEN_DRIVER)t1z_driver_interface$(CLOSE_DRIVER) $(OPEN_DRIVER)t1z_driver_interface$(CLOSE_DRIVER)
$(ECHO_DRIVER)type1z $(ECHO_DRIVER_DESC) Postscript font files with extension *.pfa or *.pfb $(ECHO_DRIVER_DONE) $(ECHO_DRIVER)type1z $(ECHO_DRIVER_DESC)Postscript font files with extension *.pfa or *.pfb$(ECHO_DRIVER_DONE)
# EOF

View File

@ -1,96 +1,31 @@
#
# FreeType 2 driver configuration rules
#
# Copyright 1996-2000 by
# 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.
#**************************************************************************** #****************************************************************************
#* * #* *
#* Type1z driver Makefile *
#* *
#* Copyright 1996-1999 by *
#* 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 "Type1z" driver is an experimental replacement for the current * #* The "Type1z" driver is an experimental replacement for the current *
#* Type 1 driver. It features a very different loading mechanism that * #* Type 1 driver. It features a very different loading mechanism that *
#* is much faster than the one used by the "normal" driver, and also * #* is much faster than the one used by the `normal' driver, and also *
#* deals nicely with nearly broken Type 1 font files.. It is also * #* deals nicely with nearly broken Type 1 font files. It is also *
#* much smaller.. * #* much smaller... *
#* * #* *
#* Note that it may become a permanent replacement of the current * #* Note that it may become a permanent replacement of the current *
#* "src/type1" driver in the future.. * #* "src/type1" driver in the future.. *
#* * #* *
#**************************************************************************** #****************************************************************************
#****************************************************************************
#* *
#* IMPORTANT NOTE: This Makefile is intended for GNU Make! *
#* If you provide Makefiles for other make utilities, *
#* please place them in `freetype/lib/arch/<system>'. *
#* *
#* *
#* This file is to be included by the FreeType Makefile.lib, located in *
#* the `freetype/lib' directory. Here is the list of the variables that *
#* must be defined to use it: *
#* *
#* *
#* BASE_DIR: The location of the base layer's directory. This is *
#* usually `freetype/lib/base'. *
#* *
#* ARCH_DIR: The location of the architecture-dependent directory. *
#* This is usually `freetype/lib/arch/<system>'. *
#* *
#* DRIVERS_DIR: The location of the font driver sub-dirs, usually *
#* `freetype/lib/drivers'. *
#* *
#* OBJ_DIR: The location where the compiled object(s) file will be *
#* placed. *
#* *
#* BASE_H: A list of pathnames to the base layer's header files on *
#* which the driver depends. *
#* *
#* FT_CFLAGS: A set of flags used for compilation of object files. *
#* This contains at least the include paths of the arch *
#* and base directories + optimization + warnings + ANSI *
#* compliance. *
#* *
#* FT_IFLAG: The flag used to specify an include path on the *
#* compiler command line. For example, with GCC, this is *
#* `-I', while some other compilers use `/i=' or `-J', *
#* etc. *
#* *
#* FT_OBJ: The suffix of an object file for the platform; can be *
#* `o', `obj', `coff', `tco', etc. depending on the *
#* platform. *
#* *
#* *
#* It also updates the following variables defined and used in the main *
#* Makefile: *
#* *
#* DRV_OBJ_S: The list of driver object files in *
#* single-object mode. *
#* *
#* DRV_OBJ_M: The list of driver object files in *
#* multiple-objects mode. *
#* *
#* FTINIT_DRIVER_PATHS: The list of include paths used to compile the *
#* `ftinit' component which registers all font *
#* drivers in the FT_Init_FreeType() function. *
#* *
#* FTINIT_DRIVER_H: The list of header dependencies used to *
#* compile the `ftinit' component. *
#* *
#* FTINIT_DRIVER_MACROS: The list of macros to be defined when *
#* compiling the `ftinit' component. *
#* *
#* `Single-object compilation' means that each font driver is compiled *
#* into a single object file. This is useful to get rid of all *
#* driver-specific entries. *
#* *
#****************************************************************************
# Type1z driver directory # Type1z driver directory
# #
T1Z_DIR := $(SRC_)type1z T1Z_DIR := $(SRC_)type1z
@ -105,18 +40,17 @@ T1Z_COMPILE := $(FT_COMPILE) $(T1Z_INCLUDE:%=$I%)
# Type1 driver sources (i.e., C files) # Type1 driver sources (i.e., C files)
# #
T1Z_DRV_SRC := $(T1Z_DIR_)t1parse.c \ T1Z_DRV_SRC := $(T1Z_DIR_)t1parse.c \
$(T1Z_DIR_)t1load.c \ $(T1Z_DIR_)t1load.c \
$(T1Z_DIR_)t1driver.c \ $(T1Z_DIR_)t1driver.c \
$(T1Z_DIR_)t1afm.c \ $(T1Z_DIR_)t1afm.c \
$(T1Z_DIR_)t1gload.c $(T1Z_DIR_)t1gload.c
# Type1 driver headers # Type1 driver headers
# #
T1Z_DRV_H := $(T1Z_DIR_)t1errors.h \ T1Z_DRV_H := $(T1Z_DIR_)t1errors.h \
$(T1Z_DIR_)t1config.h \ $(T1Z_DIR_)t1config.h \
$(T1SHARED_H) \ $(T1SHARED_H) \
$(T1Z_DRV_SRC:%.c=%.h) $(T1Z_DRV_SRC:%.c=%.h)
@ -130,8 +64,7 @@ T1Z_DRV_OBJ_M := $(T1Z_DRV_SRC:$(T1Z_DIR_)%.c=$(OBJ_)%.$O) \
T1Z_DRV_OBJ_S := $(OBJ_)type1z.$O T1Z_DRV_OBJ_S := $(OBJ_)type1z.$O
# driver source file(s)
# driver root source file(s)
# #
T1Z_DRV_SRC_M := $(T1Z_DRV_SRC) $(T1SHARED_SRC) T1Z_DRV_SRC_M := $(T1Z_DRV_SRC) $(T1SHARED_SRC)
T1Z_DRV_SRC_S := $(T1Z_DIR_)type1z.c T1Z_DRV_SRC_S := $(T1Z_DIR_)type1z.c
@ -145,7 +78,6 @@ $(T1Z_DRV_OBJ_S): $(BASE_H) $(T1Z_DRV_H) $(T1Z_DRV_SRC) $(T1Z_DRV_SRC_S)
$(T1Z_COMPILE) $T$@ $(T1Z_DRV_SRC_S) $(T1Z_COMPILE) $T$@ $(T1Z_DRV_SRC_S)
# driver - multiple objects # driver - multiple objects
# #
# All objects are recompiled if any of the header files is changed # All objects are recompiled if any of the header files is changed
@ -162,4 +94,4 @@ $(OBJ_)t1%.$O: $(T1SHARED_DIR_)t1%.c $(BASE_H) $(T1SHARED_H)
DRV_OBJS_S += $(T1Z_DRV_OBJ_S) DRV_OBJS_S += $(T1Z_DRV_OBJ_S)
DRV_OBJS_M += $(T1Z_DRV_OBJ_M) DRV_OBJS_M += $(T1Z_DRV_OBJ_M)
# END # EOF