re-added the "freetype.mk" that was mistakenly deleted
This commit is contained in:
parent
a9c251c457
commit
787183ea64
231
config/freetype.mk
Normal file
231
config/freetype.mk
Normal file
@ -0,0 +1,231 @@
|
||||
#
|
||||
# FreeType 2 library sub-Makefile
|
||||
#
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
# default target -- build objects and library
|
||||
#
|
||||
build_freetype: objects library
|
||||
|
||||
# `multi' target -- build multiple objects and library
|
||||
#
|
||||
multi: objects library
|
||||
|
||||
|
||||
# The FreeType source directory.
|
||||
#
|
||||
SRC := $(TOP)$(SEP)src
|
||||
|
||||
|
||||
# The directory where the base layer components are placed. By default,
|
||||
# this is `freetype/src/base'.
|
||||
#
|
||||
BASE_DIR := $(SRC)$(SEP)base
|
||||
|
||||
|
||||
# A few short-cuts in order to avoid typing $(SEP) all the time for the
|
||||
# directory separator.
|
||||
#
|
||||
# For example: SRC_ equals to `./src/' where `.' is $(TOP).
|
||||
#
|
||||
#
|
||||
SRC_ := $(SRC)$(SEP)
|
||||
BASE_ := $(BASE_DIR)$(SEP)
|
||||
OBJ_ := $(OBJ_DIR)$(SEP)
|
||||
LIB_ := $(LIB_DIR)$(SEP)
|
||||
PUBLIC_ := $(TOP)$(SEP)include$(SEP)freetype$(SEP)
|
||||
INTERNAL_ := $(PUBLIC_)$(SEP)internal$(SEP)
|
||||
CONFIG_ := $(PUBLIC_)$(SEP)config$(SEP)
|
||||
|
||||
|
||||
# The name of the final library file.
|
||||
#
|
||||
FT_LIBRARY := $(LIB_)$(LIBRARY).$A
|
||||
|
||||
|
||||
# include paths
|
||||
#
|
||||
# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
|
||||
# in front of the include list. Porters are then able to
|
||||
# put their own version of some of the FreeType components
|
||||
# in the `freetype/config/<system>' directory, as these
|
||||
# files will override the default sources.
|
||||
#
|
||||
INCLUDES := $(BUILD) $(TOP)$(SEP)include $(INCLUDES)
|
||||
|
||||
INCLUDE_FLAGS = $(INCLUDES:%=$I%)
|
||||
|
||||
|
||||
# C flags used for the compilation of an object file. This must include at
|
||||
# least the paths for the `base' and `config/<system>' directories,
|
||||
# debug/optimization/warning flags + ansi compliance if needed.
|
||||
#
|
||||
FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
|
||||
FT_CC = $(CC) $(FT_CFLAGS)
|
||||
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
|
||||
|
||||
|
||||
# include the `modules' rules file
|
||||
#
|
||||
include $(TOP)/config/modules.mk
|
||||
|
||||
|
||||
# Free the lists of driver objects.
|
||||
#
|
||||
COMPONENTS_LIST :=
|
||||
DRIVERS_LIST :=
|
||||
OBJECTS_LIST :=
|
||||
|
||||
# Define $(PUBLIC_H) as the list of all public header files located in
|
||||
# `$(TOP)/include'.
|
||||
#
|
||||
PUBLIC_H := $(wildcard $(PUBLIC_)*.h)
|
||||
BASE_H := $(wildcard $(INTERNAL_)*.h)
|
||||
|
||||
# System-specific component -- this must be defined in this Makefile for
|
||||
# easy updates. The default ANSI ftsystem.c is located in
|
||||
# `freetype/config/ftsystem.c'. However, some system-specific configuration
|
||||
# might define $(FTSYS_SRC) to fetch it in other places, like
|
||||
# `freetype/config/<system>/ftsystem.c'.
|
||||
#
|
||||
# $(BASE_H) is defined in `src/base/rules.mk' and contains the list of all
|
||||
# base layer header files.
|
||||
#
|
||||
ifndef FTSYS_SRC
|
||||
FTSYS_SRC = $(BASE_)ftsystem.c
|
||||
endif
|
||||
FTSYS_OBJ = $(OBJ_)ftsystem.$O
|
||||
|
||||
OBJECTS_LIST += $(FTSYS_OBJ)
|
||||
|
||||
$(FTSYS_OBJ): $(FTSYS_SRC) $(BASE_H)
|
||||
$(FT_COMPILE) $T$@ $<
|
||||
|
||||
|
||||
# ftdebug component
|
||||
#
|
||||
# FTDebug contains code used to print traces and errors. It is normally
|
||||
# empty for a release build (see ftoption.h).
|
||||
#
|
||||
FTDEBUG_SRC = $(BASE_)ftdebug.c
|
||||
FTDEBUG_OBJ = $(OBJ_)ftdebug.$O
|
||||
|
||||
OBJECTS_LIST += $(FTDEBUG_OBJ)
|
||||
|
||||
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(BASE_H)
|
||||
$(FT_COMPILE) $T$@ $<
|
||||
|
||||
|
||||
|
||||
|
||||
# Include all rule files from FreeType components.
|
||||
#
|
||||
include $(wildcard $(SRC)/*/rules.mk)
|
||||
|
||||
|
||||
# FTInit file
|
||||
#
|
||||
# The C source `ftinit.c' contains the FreeType initialization routines.
|
||||
# It is able to automatically register one or more drivers when the API
|
||||
# function FT_Init_FreeType() is called.
|
||||
#
|
||||
# The set of initial drivers is determined by the driver Makefiles
|
||||
# includes above. Each driver Makefile updates the FTINIT_xxxx lists
|
||||
# which contain additional include paths and macros used to compile the
|
||||
# single `ftinit.c' source.
|
||||
#
|
||||
FTINIT_SRC := $(BASE_)ftinit.c
|
||||
FTINIT_OBJ := $(OBJ_)ftinit.$O
|
||||
|
||||
OBJECTS_LIST += $(FTINIT_OBJ)
|
||||
|
||||
$(FTINIT_OBJ): $(FTINIT_SRC) $(PUBLIC_H) $(FT_MODULE_LIST)
|
||||
$(FT_COMPILE) $T$@ $<
|
||||
|
||||
|
||||
# All FreeType library objects
|
||||
#
|
||||
# By default, we include the base layer extensions. These could be
|
||||
# omitted on builds which do not want them.
|
||||
#
|
||||
OBJ_M = $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M)
|
||||
OBJ_S = $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S)
|
||||
|
||||
|
||||
# The target `multi' on the Make command line indicates that we want to
|
||||
# compile each source file independently.
|
||||
#
|
||||
# Otherwise, each module/driver is compiled in a single object file through
|
||||
# source file inclusion (see `src/base/ftbase.c' or
|
||||
# `src/truetype/truetype.c' for examples).
|
||||
#
|
||||
BASE_OBJECTS := $(OBJECTS_LIST)
|
||||
|
||||
ifneq ($(findstring multi,$(MAKECMDGOALS)),)
|
||||
OBJECTS_LIST += $(OBJ_M)
|
||||
else
|
||||
OBJECTS_LIST += $(OBJ_S)
|
||||
endif
|
||||
|
||||
objects: $(OBJECTS_LIST)
|
||||
|
||||
library: $(FT_LIBRARY)
|
||||
|
||||
.c.$O:
|
||||
$(FT_COMPILE) $T$@ $<
|
||||
|
||||
|
||||
# Standard cleaning and distclean rules. These are not accepted
|
||||
# on all systems though.
|
||||
#
|
||||
clean_freetype_std:
|
||||
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
|
||||
|
||||
distclean_freetype_std: clean_freetype_std
|
||||
-$(DELETE) $(FT_LIBRARY)
|
||||
-$(DELETE) *.orig *~ core *.core
|
||||
|
||||
# The Dos command shell does not support very long list of arguments, so
|
||||
# we are stuck with wildcards.
|
||||
#
|
||||
clean_freetype_dos:
|
||||
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O 2> nul
|
||||
|
||||
distclean_freetype_dos: clean_freetype_dos
|
||||
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
|
||||
|
||||
# Remove configuration file (used for distclean).
|
||||
#
|
||||
remove_config_mk:
|
||||
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK))
|
||||
|
||||
|
||||
# The `config.mk' file must define `clean_freetype' and
|
||||
# `distclean_freetype'. Implementations may use to relay these to either
|
||||
# the `std' or `dos' versions, or simply provide their own implementation.
|
||||
#
|
||||
clean: clean_freetype
|
||||
distclean: distclean_freetype remove_config_mk
|
||||
|
||||
# EOF
|
||||
|
||||
|
@ -1,186 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftconfig.h */
|
||||
/* */
|
||||
/* ANSI-specific configuration file (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. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This header file contains a number of macro definitions that are used */
|
||||
/* by the rest of the engine. Most of the macros here are automatically */
|
||||
/* determined at compile time, and you should not need to change it to */
|
||||
/* port FreeType, except to compile the library with a non ANSI compiler */
|
||||
/* */
|
||||
/* Note however that if some specific modifications are needed, we */
|
||||
/* advise you to place a modified copy in your build directory. */
|
||||
/* */
|
||||
/* The build directory is usually "freetype/config/<system>", and */
|
||||
/* contains system-specific files that are always included first when */
|
||||
/* building the library.. */
|
||||
/* */
|
||||
/* This ANSI version should stay in "freetype/config" */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef FTCONFIG_H
|
||||
#define FTCONFIG_H
|
||||
|
||||
/* Include the header file containing all developer build options */
|
||||
#include <ftoption.h>
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
|
||||
/* */
|
||||
/* These macros can be toggled to suit a specific system. The current */
|
||||
/* ones are defaults used to compile FreeType in an ANSI C environment */
|
||||
/* (16bit compilers are also supported). Copy this file to your own */
|
||||
/* `freetype/arch/<system>' directory, and edit it to port the engine. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* We use <limits.h> values to know the sizes of the types. */
|
||||
#include <limits.h>
|
||||
|
||||
/* The number of bytes in an `int' type. */
|
||||
#if UINT_MAX == 0xFFFFFFFF
|
||||
#define SIZEOF_INT 4
|
||||
#elif UINT_MAX == 0xFFFF
|
||||
#define SIZEOF_INT 2
|
||||
#elif UINT_MAX > 0xFFFFFFFF && UINT_MAX == 0xFFFFFFFFFFFFFFFF
|
||||
#define SIZEOF_INT 8
|
||||
#else
|
||||
#error "Unsupported number of bytes in `int' type!"
|
||||
#endif
|
||||
|
||||
/* The number of bytes in a `long' type. */
|
||||
#if ULONG_MAX == 0xFFFFFFFF
|
||||
#define SIZEOF_LONG 4
|
||||
#elif ULONG_MAX > 0xFFFFFFFF && ULONG_MAX == 0xFFFFFFFFFFFFFFFF
|
||||
#define SIZEOF_LONG 8
|
||||
#else
|
||||
#error "Unsupported number of bytes in `long' type!"
|
||||
#endif
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 0
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 0
|
||||
|
||||
|
||||
/* Preferred alignment of data */
|
||||
#define FT_ALIGNMENT 8
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* AUTOMATIC CONFIGURATION MACROS */
|
||||
/* */
|
||||
/* These macros are computed from the ones defined above. Don't touch */
|
||||
/* their definition, unless you know precisely what you're doing. No */
|
||||
/* porter should need to mess with them. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* IntN types */
|
||||
/* */
|
||||
/* Used to guarantee the size of some specific integers. */
|
||||
/* */
|
||||
typedef signed short FT_Int16;
|
||||
typedef unsigned short FT_Word16;
|
||||
|
||||
#if SIZEOF_INT == 4
|
||||
|
||||
typedef signed int FT_Int32;
|
||||
typedef unsigned int FT_Word32;
|
||||
|
||||
#elif SIZEOF_LONG == 4
|
||||
|
||||
typedef signed long FT_Int32;
|
||||
typedef unsigned long FT_Word32;
|
||||
|
||||
#else
|
||||
#error "no 32bit type found - please check your configuration files"
|
||||
#endif
|
||||
|
||||
#if SIZEOF_LONG == 8
|
||||
|
||||
/* LONG64 must be defined when a 64-bit type is available */
|
||||
#define LONG64
|
||||
#define INT64 long
|
||||
|
||||
#else
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* many compilers provide the non-ANSI 'long long' 64-bit type. You can */
|
||||
/* activate it by defining the FTCALC_USE_LONG_LONG macro in `ftoption.h'*/
|
||||
/* Note that this will produce many -ansi warnings during library */
|
||||
/* compilation, and that in many cases, the generated code will not be */
|
||||
/* smaller or faster !! */
|
||||
/* */
|
||||
#ifdef FTCALC_USE_LONG_LONG
|
||||
|
||||
#define LONG64
|
||||
#define INT64 long long
|
||||
|
||||
#endif /* FTCALC_USE_LONG_LONG */
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
|
||||
#define LOCAL_DEF static
|
||||
#define LOCAL_FUNC static
|
||||
#else
|
||||
#define LOCAL_DEF extern
|
||||
#define LOCAL_FUNC /* nothing */
|
||||
#endif
|
||||
|
||||
#ifdef FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT
|
||||
#define BASE_DEF LOCAL_DEF
|
||||
#define BASE_FUNC LOCAL_FUNC
|
||||
#else
|
||||
#define BASE_DEF extern
|
||||
#define BASE_FUNC /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef EXPORT_DEF
|
||||
#define EXPORT_DEF extern
|
||||
#endif
|
||||
|
||||
#ifndef EXPORT_FUNC
|
||||
#define EXPORT_FUNC /* nothing */
|
||||
#endif
|
||||
|
||||
#endif /* FTCONFIG_H */
|
||||
|
||||
|
||||
/* END */
|
Loading…
Reference in New Issue
Block a user