Commit 10038668 authored by David Turner's avatar David Turner
Browse files

* include/freetype/config/ft2build.h,

	include/freetype/internal/internal.h: fixed header inclusion macros
	to use direct definitions. This is the only way to do these things
	in a portable way :-( The rest of the code should follow shortly
	though everything compiles now..

	* builds/compiler/intelc.mk, builds/compiler/watcom.mk,
	builds/win32/detect.mk: added support for the Intel C/C++ compiler,
	as well as _preliminary_ (read: doesn't work !!) support for Watcom.
	Also added a new setup target. Type "make setup list" for a list
	of supported command-line compilers on Win32..
parent b8eca207
2000-12-13 David Turner <david.turner@freetype.org>
* include/freetype/config/ft2build.h,
include/freetype/internal/internal.h: fixed header inclusion macros
to use direct definitions. This is the only way to do these things
in a portable way :-( The rest of the code should follow shortly
though everything compiles now..
* builds/compiler/intelc.mk, builds/compiler/watcom.mk,
builds/win32/detect.mk: added support for the Intel C/C++ compiler,
as well as _preliminary_ (read: doesn't work !!) support for Watcom.
Also added a new setup target. Type "make setup list" for a list
of supported command-line compilers on Win32..
2000-12-13 Werner Lemberg <wl@gnu.org>
* builds/unix/ftsystem.c: Fixed typos. Fixed inclusion of wrong
......
#
# FreeType 2 Intel C/C++ definitions (VC++ compatibility mode)
#
# 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.
# compiler command line name
#
CC := icl
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := obj
SO := obj
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := lib
SA := lib
# Path inclusion flag. Some compilers use a different flag than `-I' to
# specify an additional include path. Examples are `/i=' or `-J'.
#
I := /I
# C flag used to define a macro before the compilation of a given source
# object. Usually it is `-D' like in `-DDEBUG'.
#
D := /D
# 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 := /Fl
# Target flag.
#
T := /Fo
# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
# Note that the Intel C/C++ compiler version 4.5 complains about
# the use of FT_FIELD_OFFSET with "value must be arithmetic type !!"
# this really looks like a bug in the compiler because the macro
# _does_ compute an arithmetic value, so we disable this warning
# with "/Qwd32" !!
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /W3 /Qwd32
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := /Qansi /Za
# Library linking
#
#CLEAN_LIBRARY =
LINK_LIBRARY = lib /nologo /out:$@ $(OBJECTS_LIST)
# EOF
#
# FreeType 2 Watcom-specific definitions
#
# 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.
# Compiler command line name
#
CC := wcc386
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := obj
SO := obj
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := lib
SA := lib
# Path inclusion flag. Some compilers use a different flag than `-I' to
# specify an additional include path. Examples are `/i=' or `-J'.
#
I := -I=
# C flag used to define a macro before the compilation of a given source
# object. Usually it is `-D' like in `-DDEBUG'.
#
D := -D
# 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 := -FO=
# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -zq
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -za
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY)) \
$(NO_OUTPUT)
endif
LINK_LIBRARY = wlib -q -o = $@ $(OBJECTS_LIST)
# EOF
......@@ -42,76 +42,110 @@ ifeq ($(PLATFORM),ansi)
ifdef is_windows
PLATFORM := win32
DELETE := del
COPY := copy
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
SEP := /
ifeq ($(firstword $(CC)),cc)
CC := gcc
endif
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
CONFIG_FILE := w32-vcc.mk
SEP := $(BACKSLASH)
CC := cl
visualc: setup
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := w32-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
endif
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
SEP := $(BACKSLASH)
CC := icc
visualage: setup
endif
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-lcc.mk
SEP := $(BACKSLASH)
CC := lcc
lcc: setup
endif
ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32
CONFIG_FILE := w32-mingw32.mk
SEP := $(BACKSLASH)
CC := gcc
mingw32: setup
endif
ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
CONFIG_FILE := w32-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
bcc32: setup
endif
ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-bccd.mk
CC := bcc32
PLATFORM := win32
DELETE := del
COPY := copy
CONFIG_FILE := none
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
@echo
@echo Several command-line compilers are supported on Win32:
@echo
@echo make setupgcc (with Mingw)
@echo make setup visualcMicrosoft Visual C++
@echo make setup bcc32Borland C/C++
@echo make setup lccWin32-LCC
@echo make setup intelcIntel C/C++
@echo
setup: dump_target_list
else # test "list"
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
SEP := /
devel: setup
endif
ifeq ($(firstword $(CC)),cc)
CC := gcc
endif
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
CONFIG_FILE := w32-vcc.mk
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 officialy supported for now
#
ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-dev.mk
CC := gcc
SEP := /
devel: setup
endif
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
SEP := $(BACKSLASH)
CC := icc
visualage: setup
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := w32-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
endif
ifneq ($(findstring cygwin,$(MAKECMDGOALS)),) # Cygwin
CONFIG_FILE := w32-cygw.mk
SEP := $(BACKSLASH)
CC := gcc
cygwin: setup
endif
ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-bccd.mk
CC := bcc32
SEP := /
devel: setup
endif
ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-dev.mk
CC := gcc
SEP := /
devel: setup
endif
setup: dos_setup
setup: dos_setup
endif # test "list"
endif # test is_windows
endif # test PLATFORM
......
#
# FreeType 2 Intel C/C++ on Win32
#
# 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.
SEP := /
include $(TOP)/builds/win32/win32-def.mk
include $(TOP)/builds/compiler/intelc.mk
# include linking instructions
include $(TOP)/builds/link_dos.mk
# EOF
#
# FreeType 2 configuration rules for Watcom C/C++
#
# 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.
SEP := /
ISEP := $(strip \ )
include $(TOP)/builds/win32/win32-def.mk
include $(TOP)/builds/compiler/watcom.mk
# include linking instructions
include $(TOP)/builds/link_dos.mk
# EOF
......@@ -29,9 +29,8 @@
/* #ifndef __FT2_BUILD_UNIX_H__ */
/* #define __FT2_BUILD_UNIX_H__ */
/* */
/* #define FT2_PUBLIC_FILE( x ) <freetype2/ ## x ## > */
/* #define FT2_CONFIG_FILE( x ) <freetype2/config/ ## x ## > */
/* #define FT2_INTERNAL_FILE( x ) <freetype2/internal/ ## x ## > */
/* #define FT2_ROOT freetype2 */
/* #include <freetype2/config/ft2build.h> */
/* */
/* #include FT2_CONFIG_FILE( ft2build.h ) */
/* */
......@@ -47,41 +46,77 @@
#define __FT2_BUILD_H__
/* We use `##' around some arguments to eliminate leading and trailing */
/* spaces. */
/* this macro is used to enclose its argument in brackets */
#define FT2_ENCLOSE(x) <x>
/* this macro is used to join a path and a file name */
#define FT2_JOINPATH(d,x) d/x
/* this macro is used to format a path in "<d/x>" format easily */
#define FT2_PUBLIC_PATH(d,x) FT2_ENCLOSE(d/x)
/*************************************************************************/
/* */
/* The macro FT2_PUBLIC_FILE is used to include a FreeType 2 public */
/* file. Its parameter is the file pathname, relative to the public */
/* root of a given header file. */
/* The macro FT2_ROOT is used to define the root of all public header */
/* files for FreeType 2. By default, it is set to "freetype", which */
/* means that all public files should be included with a line like: */
/* */
#ifndef FT2_PUBLIC_FILE
#define FT2_PUBLIC_FILE( x ) <freetype/ ## x ## >
/* #include <freetype/...> */
/* */
/* Redefine it to something different if necessary, depending where the */
/* library is installed on the particular system. */
/* */
#ifndef FT2_ROOT
#define FT2_ROOT freetype
#endif
/*************************************************************************/
/* */
/* The macro FT2_CONFIG_FILE is used to include a FreeType 2 config */
/* file. Its parameter is the file pathname, relative to the */
/* configuration root directory of a given header file. */
/* The macro FT2_CONFIG_ROOT is used to define the root of all */
/* configuration header files for FreeType 2. By default, it is set to */
/* "freetype/config", which means that all config files should be */
/* include with a line like: */
/* */
/* #include <freetype/config/...> */
/* */
/* Redefine it to something different, depending where the library is */
/* installed on the particular system. */
/* */
#ifndef FT2_CONFIG_FILE
#define FT2_CONFIG_FILE( x ) <freetype/config/ ## x ## >
#ifndef FT2_CONFIG_ROOT
#define FT2_CONFIG_ROOT FT2_JOINPATH(FT2_ROOT,config)
#endif
#define FT2_INTERNAL_ROOT FT2_JOINPATH(FT2_ROOT,internal)
/*************************************************************************/
/* */
/* The macro FT2_PUBLIC_FILE is used to include a FreeType 2 public file.*/
/* Its parameter is the file pathname, relative to the public root of a */
/* given header file. */
/* */
#define FT2_PUBLIC_FILE( x ) FT2_PUBLIC_PATH(FT2_ROOT,x)
/*************************************************************************/
/* */
/* The macro FT2_CONFIG_FILE is used to include a FreeType 2 config file.*/
/* Its parameter is the file pathname, relative to the configuration */
/* root directory of a given header file. */
/* */
#define FT2_CONFIG_FILE( x ) FT2_PUBLIC_PATH(FT2_CONFIG_ROOT,x)
/*************************************************************************/
/* */
/* The macro FT2_INTERNAL_FILE is used to include a FreeType 2 internal */
/* file. Its parameter is the file pathname, relative to the */
/* configuration root directory of a given header file. */
/* */
#ifndef FT2_INTERNAL_FILE
#define FT2_INTERNAL_FILE( x ) <freetype/internal/ ## x ## >
#endif
#define FT2_INTERNAL_FILE( x ) FT2_ENCLOSE(FT2_ROOT/internal/x)
/*************************************************************************/
......@@ -103,7 +138,7 @@
#ifdef FT_FLAT_COMPILATION
#define FT_SOURCE_FILE( d, x ) #x
#else
#define FT_SOURCE_FILE( d, x ) < ## d ## / ## x ## >
#define FT_SOURCE_FILE( d, x ) FT2_PUBLIC_PATH(d,x)
#endif
#endif /* !FT_SOURCE_FILE */
......@@ -153,44 +188,44 @@
/* configuration files */
#ifndef FT_CONFIG_CONFIG_H
#define FT_CONFIG_CONFIG_H FT2_CONFIG_FILE( ftconfig.h )
#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h>
#endif
#ifndef FT_CONFIG_OPTIONS_H
#define FT_CONFIG_OPTIONS_H FT2_CONFIG_FILE( ftoption.h )
#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
#endif
#ifndef FT_CONFIG_MODULES_H
#define FT_CONFIG_MODULES_H FT2_CONFIG_FILE( ftmodule.h )
#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
#endif
/* public headers */
#define FT_ERRORS_H FT2_PUBLIC_FILE( fterrors.h )
#define FT_SYSTEM_H FT2_PUBLIC_FILE( ftsystem.h )
#define FT_IMAGE_H FT2_PUBLIC_FILE( ftimage.h )
#define FT_TYPES_H FT2_PUBLIC_FILE( fttypes.h )
#define FT_FREETYPE_H FT2_PUBLIC_FILE( freetype.h )
#define FT_GLYPH_H FT2_PUBLIC_FILE( ftglyph.h )
#define FT_BBOX_H FT2_PUBLIC_FILE( ftbbox.h )
#define FT_CACHE_H FT2_PUBLIC_FILE( ftcache.h )
#define FT_LIST_H FT2_PUBLIC_FILE( ftlist.h )
#define FT_MAC_H FT2_PUBLIC_FILE( ftmac.h )
#define FT_MULTIPLE_MASTERS_H FT2_PUBLIC_FILE( ftmm.h )
#define FT_MODULE_H FT2_PUBLIC_FILE( ftmodule.h )
#define FT_NAMES_H FT2_PUBLIC_FILE( ftnames.h )
#define FT_OUTLINE_H FT2_PUBLIC_FILE( ftoutln.h )
#define FT_RENDER_H FT2_PUBLIC_FILE( ftrender.h )
#define FT_SYNTHESIS_H FT2_PUBLIC_FILE( ftsynth.h )
#define FT_TYPE1_TABLES_H FT2_PUBLIC_FILE( t1tables.h )
#define FT_TRUETYPE_NAMES_H FT2_PUBLIC_FILE( ttnameid.h )
#define FT_TRUETYPE_TABLES_H FT2_PUBLIC_FILE( tttables.h )
#define FT_TRUETYPE_TAGS_H FT2_PUBLIC_FILE( tttags.h )
#define FT_ERRORS_H <freetype/fterrors.h>
#define FT_SYSTEM_H <freetype/ftsystem.h>
#define FT_IMAGE_H <freetype/ftimage.h>
#define FT_TYPES_H <freetype/fttypes.h>
#define FT_FREETYPE_H <freetype/freetype.h>
#define FT_GLYPH_H <freetype/ftglyph.h>
#define FT_BBOX_H <freetype/ftbbox.h>
#define FT_CACHE_H <freetype/ftcache.h>
#define FT_LIST_H <freetype/ftlist.h>
#define FT_MAC_H <freetype/ftmac.h>
#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h>
#define FT_MODULE_H <freetype/ftmodule.h>
#define FT_NAMES_H <freetype/ftnames.h>
#define FT_OUTLINE_H <freetype/ftoutln.h>
#define FT_RENDER_H <freetype/ftrender.h>
#define FT_SYNTHESIS_H <freetype/ftsynth.h>
#define FT_TYPE1_TABLES_H <freetype/t1tables.h>
#define FT_TRUETYPE_NAMES_H <freetype/ttnameid.h>
#define FT_TRUETYPE_TABLES_H <freetype/tttables.h>
#define FT_TRUETYPE_TAGS_H <freetype/tttags.h>
/* now include internal headers definitions from <freetype/internal/...> */
#include FT2_INTERNAL_FILE( internal.h )
#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
#endif /* __FT2_BUILD_H__ */
......
/***************************************************************************/
/* */
/* cfftypes.h */
/* */
/* Basic OpenType/CFF type definitions and interface (specification */
/* only). */
/* */
/* 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. */
/* */
/***************************************************************************/
#ifndef __CFFTYPES_H__
#define __CFFTYPES_H__
#include <ft2build.h>
#include FT_FREETYPE_H
FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
/* CFF_Index */
/* */
/* <Description> */
/* A structure used to model a CFF Index table. */
/* */
/* <Fields> */
/* stream :: source input stream */