* *.mk: Added lots of `.PHONY' targets.

* *.mk: Implemented `platform' target to disable auto-detection.


Added support for clipped direct rendering in the smooth renderer.
This should not break binary compatibility of existing applications.
* include/freetype/fttypes.h, include/freetype/ftimage.h: Move
definition of the FT_BBox structure from the former to the latter.
* include/freetype/ftimage.h: Add `ft_raster_flag_clip' value to
FT_Raster_Flag enumeration.
Add `clip_box' element to FT_Raster_Params structure.
* src/smooth/ftgrays.c (grays_convert_glyph): Implement it.

* src/raster/ftraster.c (ft_black_render): Test for unsupported
direct rendering before testing arguments.
This commit is contained in:
Werner Lemberg 2000-12-20 22:09:41 +00:00
parent 5a2fdc0cbc
commit 594f0c965d
19 changed files with 358 additions and 285 deletions

View File

@ -1,3 +1,11 @@
2000-12-17 Werner Lemberg <wl@gnu.org>
* *.mk: Added lots of `.PHONY' targets.
2000-12-17 Karsten Fleischer <kfleisc1@ford.com>
* *.mk: Implemented `platform' target to disable auto-detection.
2000-12-14 Werner Lemberg <wl@gnu.org>
* docs/design/modules.html: Removed. Covered by design-*.html.
@ -6,15 +14,23 @@
2000-12-14 David Turner <david.turner@freetype.org>
* include/freetype/ftimage.h, include/freetype/fttypes.h,
src/smooth/ftgrays.c: Added support for clipped direct rendering in
the smooth renderer. This should not break binary compatibility of
existing applications.
Added support for clipped direct rendering in the smooth renderer.
This should not break binary compatibility of existing applications.
* include/freetype/fttypes.h, include/freetype/ftimage.h: Move
definition of the FT_BBox structure from the former to the latter.
* include/freetype/ftimage.h: Add `ft_raster_flag_clip' value to
FT_Raster_Flag enumeration.
Add `clip_box' element to FT_Raster_Params structure.
* src/smooth/ftgrays.c (grays_convert_glyph): Implement it.
* INSTALL: Updated installation instructions on Win32, listing the
new "make setup list" target used to list supported
compilers/targets.
* src/raster/ftraster.c (ft_black_render): Test for unsupported
direct rendering before testing arguments.
2000-12-13 David Turner <david.turner@freetype.org>
* include/freetype/config/ft2build.h,

View File

@ -93,6 +93,8 @@ ANSIFLAGS :=
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -70,17 +70,39 @@ CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
#
BACKSLASH := $(strip \ )
# Find all auto-detectable platforms.
#
PLATFORMS_ := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG_)*/detect.mk)))
.PHONY: $(PLATFORMS_) ansi
# Filter out platform specified as setup target.
#
PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS_)))
# If no setup target platform was specified, enable auto-detection/
# default platform.
#
ifeq ($(PLATFORM),)
PLATFORM := ansi
endif
# If the user has explicitly asked for `ansi' on the command line,
# disable auto-detection.
#
ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
# Now, include all detection rule files found in the `builds/<system>'
# directories. Note that the calling order of the various `detect.mk' files
# isn't predictable.
# directories. Note that the calling order of the various `detect.mk'
# files isn't predictable.
#
include $(wildcard $(BUILD_CONFIG_)*/detect.mk)
endif
# In case no detection rule file was successful, use the default.
#
ifndef CONFIG_FILE
CONFIG_FILE := ansi.mk
setup: std_setup
.PHONY: setup
endif
# The following targets are equivalent, with the exception that they use

View File

@ -13,43 +13,24 @@
# fully.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
# Test for DJGPP by checking the DJGPP environment variable, which must be
# set in order to use the system (ie. it will always be present when the
# `make' utility is run).
#
ifeq ($(PLATFORM),ansi)
ifdef DJGPP
# We are definitely using DJGPP
PLATFORM := dos
DELETE := del
COPY := copy
CONFIG_FILE := dos-gcc.mk
SEP := /
ifndef CC
CC := gcc
endif # test CC
setup : dos_setup
endif # test DJGPP
endif # test PLATFORM
# 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)
ifdef DJGPP
PLATFORM := dos
else
ifdef COMSPEC
#
# We try to recognize a Cygwin session, in which case we're
# certainly not running on DOS!
#
ifneq ($(OSTYPE),cygwin)
is_dos := $(findstring Dos,$(shell ver))
# We try to recognize a Dos session under OS/2. The `ver' command
@ -61,12 +42,17 @@ ifeq ($(PLATFORM),ansi)
ifeq ($(is_dos),)
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
endif
endif # test Cygwin
endif # test COMSPEC
ifneq ($(is_dos),)
PLATFORM := dos
endif # test Dos
endif # test DJGPP
endif # test PLATFORM ansi
ifeq ($(PLATFORM),dos)
DELETE := del
COPY := copy
@ -84,6 +70,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := dos-tcc.mk
SEP := $(BACKSLASH)
CC := tcc
turboc: setup
.PHONY: turboc
endif
@ -91,6 +78,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := dos-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
.PHONY: watcom
endif
@ -98,6 +86,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH)
CC := bcc
borlandc16: setup
.PHONY: borlandc16
endif
@ -105,12 +94,12 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
borlandc: setup
.PHONY: borlandc
endif
setup: dos_setup
endif # test Dos
endif # test PLATFORM
endif # test PLATFORM dos
# EOF

View File

@ -58,6 +58,8 @@ NO_OUTPUT = &> nul
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -70,7 +70,7 @@
# The targets `objects' and `library' are defined at the end of this
# Makefile after all other rules have been included.
#
.PHONY: single objects library
.PHONY: single multi objects library
# default target -- build single objects and library
#
@ -255,6 +255,8 @@ library: $(PROJECT_LIBRARY)
$(FT_COMPILE) $T$@ $<
.PHONY: clean_project_std distclean_project_std
# Standard cleaning and distclean rules. These are not accepted
# on all systems though.
#
@ -265,6 +267,9 @@ distclean_project_std: clean_project_std
-$(DELETE) $(PROJECT_LIBRARY)
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
.PHONY: clean_project_dos distclean_project_dos
# The Dos command shell does not support very long list of arguments, so
# we are stuck with wildcards.
#
@ -276,12 +281,17 @@ distclean_project_dos: clean_project_dos
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY)) \
$(DISTCLEAN) $(NO_OUTPUT)
.PHONY: remove_config_mk
# Remove configuration file (used for distclean).
#
remove_config_mk:
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) $(NO_OUTPUT)
.PHONY: clean distclean
# The `config.mk' file must define `clean_freetype' and
# `distclean_freetype'. Implementations may use to relay these to either
# the `std' or `dos' versions from above, or simply provide their own

View File

@ -15,6 +15,8 @@
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -15,6 +15,8 @@
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -20,7 +20,7 @@
# This file is in charge of handling the generation of the modules list
# file.
.PHONY: make_module_list clean_module_list remake_module_list
.PHONY: make_module_list clean_module_list
# MODULE_LIST, as its name suggests, indicates where the modules list
# resides. For now, it is in `include/freetype/config/ftmodule.h'.

View File

@ -13,11 +13,20 @@
# fully.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
ifdef OS2_SHELL
PLATFORM := os2
endif # test OS2_SHELL
endif
ifeq ($(PLATFORM),os2)
COPY := copy
DELETE := del
@ -31,6 +40,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := os2-icc.mk
SEP := $(BACKSLASH)
CC := icc
visualage: setup
.PHONY: visualage
endif
@ -38,6 +48,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := os2-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
.PHONY: watcom
endif
@ -45,6 +56,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := os2-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
borlandc: setup
.PHONY: borlandc
endif
@ -53,11 +65,11 @@ ifeq ($(PLATFORM),ansi)
CC := gcc
SEP := /
devel: setup
.PHONY: devel
endif
setup: dos_setup
endif # test OS2_SHELL
endif # test PLATFORM
endif # test PLATFORM os2
# EOF

View File

@ -58,6 +58,8 @@ NO_OUTPUT = 2> nul
ifdef BUILD_LIBRARY
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -109,6 +109,8 @@ ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
.PHONY: clean_freetype distclean_freetype
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -108,6 +108,8 @@ ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
.PHONY: clean_freetype distclean_freetype
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -34,7 +34,7 @@
# details on host platform detection and library builds.
.PHONY: setup distclean
.PHONY: all setup distclean modules
# The `space' variable is used to avoid trailing spaces in defining the
# `T' variable later.
@ -71,6 +71,8 @@ endif
#
ifdef check_platform
# This is the first rule `make' sees.
#
all: setup
ifdef USE_MODULES
@ -92,7 +94,8 @@ ifdef check_platform
# This rule makes sense for Unix only to remove files created by a run
# of the configure script which hasn't been successful (so that no
# `config.mk' has been created). It uses the built-in $(RM) command of
# GNU make.
# GNU make. Similarly, `nul' is created if e.g. `make setup win32' has
# been erroneously used.
#
distclean:
$(RM) builds/unix/config.cache
@ -100,6 +103,7 @@ ifdef check_platform
$(RM) builds/unix/config.status
$(RM) builds/unix/unix-def.mk
$(RM) builds/unix/unix-cc.mk
$(RM) nul
# IMPORTANT:
#

View File

@ -12,7 +12,7 @@
# indicate that you have read the license and understand and accept it
# fully.
.PHONY: devel lcc setup unix
.PHONY: setup
ifeq ($(PLATFORM),ansi)
@ -20,10 +20,14 @@ ifeq ($(PLATFORM),ansi)
ifneq ($(has_init),)
PLATFORM := unix
endif # test has_init
endif # test PLATFORM ansi
ifeq ($(PLATFORM),unix)
COPY := cp
DELETE := rm -f
# If `devel' is the requested target, we use a special configuration
# file named `unix-dev.mk'. It disables optimization and libtool.
#
@ -31,16 +35,19 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := unix-dev.mk
CC := gcc
devel: setup
.PHONY: devel
else
# If `lccl' is the requested target, we use a special configuration
# file named `unix-lcc.mk'. It disables libtool for LCC
# If `lcc' is the requested target, we use a special configuration
# file named `unix-lcc.mk'. It disables libtool for LCC.
#
ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-lcc.mk
CC := lcc
lcc: setup
.PHONY: lcc
else
# If a Unix platform is detected, the configure script is called and
# `unix-def.mk' together with `unix-cc.mk' is created.
#
@ -57,6 +64,7 @@ ifeq ($(PLATFORM),ansi)
CONFIG_FILE := unix.mk
setup: unix-def.mk
unix: setup
.PHONY: unix
endif
endif
@ -65,7 +73,6 @@ ifeq ($(PLATFORM),ansi)
unix-def.mk: $(TOP)/builds/unix/unix-def.in
cd builds/unix; ./configure $(CFG)
endif # test Unix
endif # test PLATFORM
endif # test PLATFORM unix
# EOF

View File

@ -13,6 +13,8 @@
# fully.
.PHONY: install uninstall
# Unix installation and deinstallation targets.
install: $(PROJECT_LIBRARY)
$(MKINSTALLDIRS) $(libdir) \
@ -52,6 +54,8 @@ uninstall:
-$(DELETE) $(bindir)/freetype-config
.PHONY: clean_project_unix distclean_project_unix
# Unix cleaning and distclean rules.
#
clean_project_unix:

View File

@ -18,6 +18,8 @@ include $(TOP)/builds/unix/unix-cc.mk
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#

View File

@ -13,6 +13,9 @@
# fully.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
# Detecting Windows NT is easy, as the OS variable must be defined and
@ -21,11 +24,7 @@ ifeq ($(PLATFORM),ansi)
#
ifeq ($(OS),Windows_NT)
# Check if we are running on a CygWin system by checking the OSTYPE
# variable.
ifneq ($(OSTYPE),cygwin)
is_windows := 1
endif
# We test for the COMSPEC environment variable, then run the `ver'
# command-line program to see if its output contains the word `Windows'.
@ -33,24 +32,31 @@ ifeq ($(PLATFORM),ansi)
# If this is true, we are running a win32 platform (or an emulation).
#
else
ifneq ($(OSTYPE),cygwin)
ifdef COMSPEC
is_windows := $(findstring Windows,$(strip $(shell ver)))
endif
endif # test CygWin
endif # test NT
ifdef is_windows
PLATFORM := win32
endif
endif # test PLATFORM ansi
ifeq ($(PLATFORM),win32)
DELETE := del
COPY := copy
CONFIG_FILE := none
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
SEP := /
ifeq ($(firstword $(CC)),cc)
CC := gcc
endif
ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target
.PHONY: dump_target_list setup list
dump_target_list:
@echo ÿ
@echo $(PROJECT_TITLE) build system -- supported compilers
@ -65,14 +71,9 @@ ifeq ($(PLATFORM),ansi)
@echo ÿ
setup: dump_target_list
else # test "list"
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
SEP := /
ifeq ($(firstword $(CC)),cc)
CC := gcc
.PHONY: dump_target_list list
else
setup: dos_setup
endif
# additionally, we provide hooks for various other compilers
@ -82,38 +83,7 @@ ifeq ($(PLATFORM),ansi)
SEP := $(BACKSLASH)
CC := cl
visualc: setup
endif
ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
CONFIG_FILE := w32-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
bcc32: setup
endif
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-lcc.mk
SEP := $(BACKSLASH)
CC := lcc
lcc: setup
endif
ifneq ($(findstring intelc,$(MAKECMDGOALS)),) # Intel C/C++
CONFIG_FILE := w32-intl.mk
SEP := $(BACKSLASH)
CC := icl
intelc: setup
endif
#
# The following build targets are not officially supported for now
#
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
SEP := $(BACKSLASH)
CC := icc
visualage: setup
.PHONY: visualc
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
@ -121,34 +91,57 @@ ifeq ($(PLATFORM),ansi)
SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
.PHONY: watcom
endif
ifneq ($(findstring cygwin,$(MAKECMDGOALS)),) # Cygwin
CONFIG_FILE := w32-cygw.mk
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
SEP := $(BACKSLASH)
CC := icc
visualage: setup
.PHONY: visualage
endif
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-lcc.mk
SEP := $(BACKSLASH)
CC := lcc
lcc: setup
.PHONY: lcc
endif
ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32
CONFIG_FILE := w32-mingw32.mk
SEP := $(BACKSLASH)
CC := gcc
cygwin: setup
mingw32: setup
.PHONY: mingw32
endif
ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
CONFIG_FILE := w32-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
bcc32: setup
.PHONY: bcc32
endif
ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-bccd.mk
CC := bcc32
SEP := /
devel: setup
devel-bcc: setup
.PHONY: devel-bcc
endif
ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-dev.mk
CC := gcc
SEP := /
devel: setup
devel-gcc: setup
.PHONY: devel-gcc
endif
setup: dos_setup
endif # test "list"
endif # test is_windows
endif # test PLATFORM
endif # test PLATFORM win32
# EOF