
XCOMM Imakefile created for the Freetype TrueType renderer.
XCOMM Mark Leisher <mleisher@crl.nmsu.edu>
XCOMM Juliusz Chroboczek <jec@dcs.ed.ac.uk>

#include <Server.tmpl>

/* The variable `HasUsableFileMmap' should be defined if mmap(2) can
   reliably be used to access regular files.  Ideally, this should be
   done in the platform-specific `*.cf' files; however, we define it
   here for a few common architectures. */
/* mmap(2) use is optional in FreeType, so no harm is done if we miss
   a few architectures. */

#ifdef SunArchitecture
#ifndef AmoebaArchitecture
#if OSMajorVersion>=4
#define HasUsableFileMmap
#endif
#endif /* SunArchitecture */
/* SVR4? */
#endif /* SunArchitecture */
#ifdef NetBSDArchitecture       /* Defined for OpenBSD too */
#define HasUsableFileMmap
#endif /* NetBSDArchitecture */
#ifdef FreeBSDArchitecture
#define HasUsableFileMmap
#endif /* FreeBSDArchitecture */
/* BSDI? */
#ifdef BSDArchitecture
#if OSMajorVersion==4 && OSMinorVersion>=2
#define HasUsableFileMmap
#endif
#endif /* BSDArchitecture */
#ifdef LinuxArchitecture
#if OSMajorVersion>=2           /* what's the exact version? */
#define HasUsableFileMmap
#endif
#endif /* LinuxArchitecture */

#ifdef HasUsableFileMmap
XCOMM Using mmap for reading font files
DEFINES = -DTT_MAKE_OPTION_SINGLE_OBJECT=1 -DHAVE_MMAP=1
#else
XCOMM Avoiding mmap
DEFINES = -DTT_MAKE_OPTION_SINGLE_OBJECT=1
#endif

/* Note that lib is *not* defined as a subdir in the Imakefile, just
 * as an includes directory in the Makefile. */

INCLUDES = -I$(FONTINCSRC) -I. -I../include -I./lib
SRCS = ftfuncs.c ftenc.c ftencparse.c ftutil.c freetype.c ftxcmap.c
OBJS = ftfuncs.o ftenc.o ftencparse.o ftutil.o freetype.o ftxcmap.o

SubdirLibraryRule($(OBJS))

XCOMM freetype.c includes all the files in the `lib/' directory
SpecialObjectRule(freetype.o, freetype.c lib/?*.c, $(_NOOP_))

NormalLibraryObjectRule()
NormalLintTarget($(SRCS))

DependTarget()
