summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-04-20 18:13:48 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-04-20 18:13:48 +0000
commite5786f530f9555469c01435f86039b06aa53feba (patch)
treec868e8d32282422d7d445b729db95c3fcdafb6d0 /Build/source/texk/web2c/xetexdir
parentebaa1768b43c8606d923d2e861b5286b74207b3e (diff)
new build system: build icu libs and xetex plus misc updates
git-svn-id: svn://tug.org/texlive/trunk@12759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontMgr_Mac.cpp13
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.am208
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.mk205
3 files changed, 402 insertions, 24 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontMgr_Mac.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontMgr_Mac.cpp
new file mode 100644
index 00000000000..8da48ac0f43
--- /dev/null
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontMgr_Mac.cpp
@@ -0,0 +1,13 @@
+/****************************************************************************\
+ Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+
+ This file is free software; the copyright holder
+ gives unlimited permission to copy and/or distribute it,
+ with or without modifications, as long as this notice is preserved.
+
+ Automake (1.10.2) does not generate a rule to compile
+ the Objective C++ file XeTeXFontMgr_Mac.mm.
+ Since that file is to be compiled with '$(CXX) -ObjC++' we provide
+ this C++ wrapper XeTeXFontMgr_Mac.cpp including the Objective C++ file.
+\****************************************************************************/
+#include "XeTeXFontMgr_Mac.mm"
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.am b/Build/source/texk/web2c/xetexdir/am/xetex.am
index 62aff84e37c..9c4cb58a0f2 100644
--- a/Build/source/texk/web2c/xetexdir/am/xetex.am
+++ b/Build/source/texk/web2c/xetexdir/am/xetex.am
@@ -2,24 +2,140 @@
## XeTeX
##
+if XETEX
+bin_PROGRAMS += xetex
+endif XETEX
+EXTRA_PROGRAMS += xetex
+
+## Force Automake to use CXXLD for linking
+nodist_EXTRA_xetex_SOURCES = dummy.cxx
+
+libxetex = libxetex.a
+
+xetex_cppflags = -DLE_USE_CMEMORY -I$(srcdir)/xetexdir
+xetex_cppflags += $(ICU_INCLUDES) $(TECKIT_INCLUDES)
+xetex_ldadd = $(libxetex) $(ICU_LIBS) $(TECKIT_LIBS)
+xetex_dependencies = $(proglib)
+xetex_dependencies += $(ICU_DEPEND) $(TECKIT_DEPEND)
+
+if XETEX_MACOSX
+
+xetex_cppflags += -DXETEX_MAC
+xetex_LDFLAGS = -framework Carbon -framework Cocoa -framework QuickTime
+
+## Extra library for the Objective C++ file xetexdir/XeTeXFontMgr_Mac.mm.
+libxetex += libxetexmm.a
+
+else !XETEX_MACOSX
+
+xetex_cppflags += -DXETEX_OTHER
+xetex_cppflags += $(FONTCONFIG_INCLUDES) $(XPDF_INCLUDES) $(LIBPNG_INCLUDES)
+xetex_ldadd += $(FONTCONFIG_LIBS) $(XPDF_LIBS) $(LIBPNG_LIBS)
+xetex_dependencies += $(XPDF_DEPEND) $(LIBPNG_DEPEND)
+
+endif !XETEX_MACOSX
+
+if XETEX_GRAPHITE
+
+xetex_cppflags += -DXETEX_GRAPHITE $(GRAPHITE_INCLUDES)
+xetex_ldadd += $(GRAPHITE_LIBS)
+xetex_dependencies += $(GRAPHITE_DEPEND)
+
+endif XETEX_GRAPHITE
+
+xetex_cppflags += $(FREETYPE2_INCLUDES) $(ZLIB_INCLUDES)
+xetex_ldadd += $(FREETYPE2_LIBS) $(ZLIB_LIBS)
+xetex_dependencies += $(FREETYPE2_DEPEND) $(ZLIB_DEPEND)
+
+xetex_CPPFLAGS = $(xetex_cppflags)
+
+## With --enable-ipc, XeTeX may need to link with -lsocket.
+xetex_LDADD = $(xetex_ldadd) $(LDADD) $(ipc_socketlibs)
+
+xetex_DEPENDENCIES = $(xetex_dependencies) $(libxetex)
+
+## XeTeX C sources
+xetex_c_h = xetexini.c xetex0.c xetex1.c xetex2.c xetexcoerce.h xetexd.h
+nodist_xetex_SOURCES = $(xetex_c_h) xetex_pool.c xetexextra.c xetexdir/xetexextra.h
+
+$(xetex_c_h): xetex-web2c
+xetex-web2c: xetex.p $(web2c_texmf) xetexdir/xetex.defines
+ $(web2c) xetex
+ : $(synctex_convert_xetex)
+ echo timestamp >$@
+ touch $(xetex_c_h)
+
+xetex_pool.c: xetex.pool xetexd.h
+ perl $(srcdir)/xetexdir/pool2c.pl $< $@
+
+xetexextra.c: xetexdir/xetexextra.h lib/texmfmp.c xetexd.h
+ sed s/TEX-OR-MF-OR-MP/xetex/ $(srcdir)/lib/texmfmp.c >$@
+
+xetexdir/xetexextra.h: xetexdir/xetexextra.in xetexdir/xetex.version xetexdir/etex.version
+ $(mkdir_p) xetexdir
+ sed -e s/XETEX-VERSION/`cat xetexdir/xetex.version`/ \
+ -e s/ETEX-VERSION/`cat xetexdir/etex.version`/ \
+ $(srcdir)/xetexdir/xetexextra.in >$@
+
+## Tangling XeTeX
+xetex.p xetex.pool: xetex-tangle
+xetex-tangle: ./otangle$(EXEEXT) xetex.web
+ $(otangle) xetex
+ echo timestamp >$@
+ touch xetex.p xetex.pool
+
+## Extract etex version
+xetexdir/etex.version: etexdir/etex.ch
+ $(mkdir_p) xetexdir
+ grep '^@d eTeX_version_string==' $(srcdir)/etexdir/etex.ch \
+ | sed "s/^.*'-//;s/'.*$$//" >$@
+
+## Extract xetex version
+xetexdir/xetex.version: xetexdir/xetex.ch
+ $(mkdir_p) xetexdir
+ grep '^@d XeTeX_version_string==' $(srcdir)/xetexdir/xetex.ch \
+ | sed "s/^.*'-//;s/'.*$$//" >$@
+
+## Generate xetex.web
+xetex.web: $(TIE) $(xetex_web_srcs)
+ $(tie) -m xetex.web $(xetex_web_srcs)
+
+xetex_web_srcs = \
+ tex.web \
+ etexdir/etex.ch \
+ etexdir/tex.ch0 \
+ tex.ch \
+ etexdir/tex.ch1 \
+ etexdir/tex.ech \
+ $(xetex_ch_synctex) \
+ xetexdir/xetex.ch \
+ $(xetex_post_ch_synctex)
+##
+EXTRA_DIST += $(xetex_web_srcs) xetexdir/xetex.defines xetexdir/xetexextra.in
+
+DISTCLEANFILES += $(nodist_xetex_SOURCES) xetex.web xetex-web2c \
+ xetex.p xetex.pool xetex-tangle xetexdir/etex.version xetexdir/xetex.version
+
EXTRA_DIST += \
+ xetexdir/pool2c.pl \
+ xetexdir/unicode-char-prep.pl
+
+## libxetex
+##
+EXTRA_LIBRARIES += libxetex.a
+
+libxetex_a_CPPFLAGS = $(xetex_cppflags)
+
+libxetex_a_SOURCES = \
+ xetexdir/MathTable.h \
xetexdir/FontTableCache.cpp \
xetexdir/FontTableCache.h \
- xetexdir/MathTable.h \
xetexdir/XeTeXFontInst.cpp \
xetexdir/XeTeXFontInst.h \
xetexdir/XeTeXFontInst_FT2.cpp \
xetexdir/XeTeXFontInst_FT2.h \
- xetexdir/XeTeXFontInst_Mac.cpp \
- xetexdir/XeTeXFontInst_Mac.h \
xetexdir/XeTeXFontMgr.cpp \
xetexdir/XeTeXFontMgr.h \
- xetexdir/XeTeXFontMgr_FC.cpp \
- xetexdir/XeTeXFontMgr_FC.h \
- xetexdir/XeTeXFontMgr_Mac.h \
- xetexdir/XeTeXFontMgr_Mac.mm \
- xetexdir/XeTeXGrLayout.cpp \
- xetexdir/XeTeXGrLayout.h \
xetexdir/XeTeXLayoutInterface.cpp \
xetexdir/XeTeXLayoutInterface.h \
xetexdir/XeTeXOTLayoutEngine.cpp \
@@ -28,14 +144,32 @@ EXTRA_DIST += \
xetexdir/XeTeXOTMath.h \
xetexdir/XeTeX_ext.c \
xetexdir/XeTeX_ext.h \
- xetexdir/XeTeX_mac.c \
- xetexdir/XeTeX_pic.c \
xetexdir/XeTeXswap.h \
- xetexdir/appleGlyphNames.c \
- xetexdir/bmpimage.c \
- xetexdir/bmpimage.h \
xetexdir/cmaps.cpp \
xetexdir/cmaps.h \
+ xetexdir/sfnt.h \
+ xetexdir/trans.c \
+ xetexdir/trans.h \
+ xetexdir/xetex.h
+
+## included by xetexdir/XeTeXLayoutInterface.cpp
+EXTRA_DIST += xetexdir/appleGlyphNames.c
+
+if XETEX_MACOSX
+
+libxetex_a_SOURCES += \
+ xetexdir/XeTeXFontInst_Mac.cpp \
+ xetexdir/XeTeXFontInst_Mac.h \
+ xetexdir/XeTeX_mac.c
+
+else !XETEX_MACOSX
+
+libxetex_a_SOURCES += \
+ xetexdir/XeTeXFontMgr_FC.cpp \
+ xetexdir/XeTeXFontMgr_FC.h \
+ xetexdir/XeTeX_pic.c \
+ xetexdir/bmpimage.c \
+ xetexdir/bmpimage.h \
xetexdir/jpegimage.c \
xetexdir/jpegimage.h \
xetexdir/mfileio.c \
@@ -45,16 +179,41 @@ EXTRA_DIST += \
xetexdir/pdfimage.cpp \
xetexdir/pdfimage.h \
xetexdir/pngimage.c \
- xetexdir/pngimage.h \
- xetexdir/pool2c.pl \
- xetexdir/sfnt.h \
- xetexdir/trans.c \
- xetexdir/trans.h \
- xetexdir/unicode-char-prep.pl \
- xetexdir/xetex.ch \
- xetexdir/xetex.defines \
- xetexdir/xetex.h \
- xetexdir/xetexextra.in
+ xetexdir/pngimage.h
+
+endif !XETEX_MACOSX
+
+if XETEX_GRAPHITE
+
+libxetex_a_SOURCES += \
+ xetexdir/XeTeXGrLayout.cpp \
+ xetexdir/XeTeXGrLayout.h
+
+endif XETEX_GRAPHITE
+
+## We must create xetexd.h before building the libxetex_a_OBJECTS.
+$(libxetex_a_OBJECTS): xetexd.h
+
+## libxetexmm (Mac OS X only)
+##
+## Automake (1.10.2) does not generate a rule to compile
+## the Objective C++ file xetexdir/XeTeXFontMgr_Mac.mm.
+## Since this file is to be compiled with '$(CXX) -ObjC++' we provide a
+## C++ wrapper xetexdir/XeTeXFontMgr_Mac.cpp including the Objective C++ file.
+## Since Automake does not allow to specify CXXFLAGS for inividual objects,
+## we use an additional library libxetexmm.a.
+EXTRA_LIBRARIES += libxetexmm.a
+
+libxetexmm_a_CPPFLAGS = $(xetex_cppflags)
+
+libxetexmm_a_CXXFLAGS = -ObjC++
+
+libxetexmm_a_SOURCES = \
+ xetexdir/XeTeXFontMgr_Mac.cpp \
+ xetexdir/XeTeXFontMgr_Mac.h
+
+## included by xetexdir/XeTeXFontMgr_Mac.cpp
+EXTRA_DIST += xetexdir/XeTeXFontMgr_Mac.mm
## Not used
##
@@ -65,6 +224,7 @@ EXTRA_DIST += \
##
EXTRA_DIST += \
xetexdir/acx_pthread.m4 \
+ xetexdir/am/xetex.mk \
xetexdir/tests.ac \
xetexdir/withenable.ac \
xetexdir/xetex.mk
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.mk b/Build/source/texk/web2c/xetexdir/am/xetex.mk
new file mode 100644
index 00000000000..94c9a75727d
--- /dev/null
+++ b/Build/source/texk/web2c/xetexdir/am/xetex.mk
@@ -0,0 +1,205 @@
+# Makefile fragment for XeTeX and web2c. -- Jonathan Kew -- Public domain.
+# This fragment contains the parts of the makefile that are most likely to
+# differ between releases of XeTeX.
+
+Makefile: $(srcdir)/xetexdir/xetex.mk
+
+# this should probably move to common.mk some day,
+# but need to check possible effect on other programs
+ALL_CXXFLAGS = @CXXFLAGS@
+
+# We build xetex unless configure decides to skip it
+xetex = @XETEX@ xetex
+
+### Platform-specific defines and files to be built
+
+# On Mac OS X:
+@XETEX_MACOSX@ xetex_platform_o = XeTeXFontMgr_Mac.o
+
+# On non-Mac platforms:
+
+@XETEX_GENERIC@ EXTRADEPS = @LIBXPDFDEP@ @LIBPNGDEP@
+
+### is Graphite support included?
+
+@XETEX_GRAPHITE@ GRAPHITEDIR = ../../libs/graphite-engine
+@XETEX_GRAPHITE@ GRAPHITESRCDIR = $(srcdir)/$(GRAPHITEDIR)
+
+@XETEX_GRAPHITE@ GRAPHITEFLAGS = @GRAPHITECPPFLAGS@
+@XETEX_GRAPHITE@ LDGRAPHITE = @LDGRAPHITE@
+@XETEX_GRAPHITE@ GRAPHITEDEP = @GRAPHITEDEP@
+
+### end of platform-specific setup
+
+LDLIBXPDF=@LDLIBXPDF@
+LIBXPDFCPPFLAGS=@LIBXPDFCPPFLAGS@
+LIBXPDFDEP=@LIBXPDFDEP@
+
+LIBXPDFDIR=../../libs/xpdf
+LIBXPDFSRCDIR=$(srcdir)/$(LIBXPDFDIR)
+
+LDLIBPNG=@LDLIBPNG@
+LIBPNGCPPFLAGS=@LIBPNGCPPFLAGS@
+LIBPNGDEP=@LIBPNGDEP@
+
+LIBPNGDIR=../../libs/libpng
+LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR)
+
+LDFREETYPE2 = @LDFREETYPE2@
+FTFLAGS = @FREETYPE2CPPFLAGS@
+FREETYPE2DEP = @FREETYPE2DEP@
+
+FREETYPE2DIR = ../../libs/freetype2
+FREETYPE2SRCDIR = $(srcdir)/$(FREETYPE2DIR)
+
+TECKITFLAGS = @TECKITCPPFLAGS@
+LDTECKIT = @LDTECKIT@
+TECKITDEP = @TECKITDEP@
+
+TECKITDIR=../../libs/teckit
+TECKITSRCDIR=$(srcdir)/$(TECKITDIR)
+
+ICUFLAGS = @ICUCPPFLAGS@
+LDICU = @LDICU@
+ICUDEP = @ICUDEP@
+
+ICUDIR=../../libs/icu-xetex
+ICUSRCDIR=$(srcdir)/$(ICUDIR)
+
+ICUCFLAGS = @ICUCPPFLAGS@ -DLE_USE_CMEMORY
+
+ZLIBCPPFLAGS = @ZLIBCPPFLAGS@
+LDZLIB = @LDZLIB@
+
+ZLIBDIR = ../../libs/zlib
+ZLIBSRCDIR = $(srcdir)/$(ZLIBDIR)
+
+FONTCONFIGCPPFLAGS = @FONTCONFIGCPPFLAGS@
+FONTCONFIGLDFLAGS = @FONTCONFIGLDFLAGS@
+
+xetexlibs = $(LDICU) $(LDTECKIT) $(LDFREETYPE2) $(LDGRAPHITE) $(LDZLIB)
+
+# Font-related headers
+XeTeXFontHdrs = \
+ $(srcdir)/xetexdir/XeTeXFontMgr_Mac.h
+
+
+# The C sources.
+xetex_c = xetexini.c xetex0.c xetex1.c xetex2.c
+xetex_o = xetexini.o xetex0.o xetex1.o xetex2.o xetexextra.o
+xetex_add_o = xetex_pool.o $(xetex_platform_o)
+
+# these compilations require the path to TECkit headers;
+# just setting it in XCFLAGS doesn't seem to work when we're called
+# recursively from "make world" etc
+xetexini.o: xetexini.c $(srcdir)/xetexdir/XeTeX_ext.h
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+xetex0.o: xetex0.c $(srcdir)/xetexdir/XeTeX_ext.h
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+xetex1.o: xetex1.c $(srcdir)/xetexdir/XeTeX_ext.h
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+xetex2.o: xetex2.c $(srcdir)/xetexdir/XeTeX_ext.h
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+xetexextra.o: xetexextra.c $(srcdir)/xetexdir/XeTeX_ext.h
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+xetex_pool.o: xetex_pool.c $(srcdir)/xetexdir/XeTeX_ext.h
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+# image support
+mfileio.o: $(srcdir)/xetexdir/mfileio.c $(srcdir)/xetexdir/mfileio.h
+ $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
+
+numbers.o: $(srcdir)/xetexdir/numbers.c $(srcdir)/xetexdir/numbers.h
+ $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
+
+bmpimage.o: $(srcdir)/xetexdir/bmpimage.c $(srcdir)/xetexdir/bmpimage.h
+ $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
+
+jpegimage.o: $(srcdir)/xetexdir/jpegimage.c $(srcdir)/xetexdir/jpegimage.h
+ $(compile) $(ALL_CFLAGS) $(FTFLAGS) -c $< -o $@
+
+pngimage.o: $(srcdir)/xetexdir/pngimage.c $(srcdir)/xetexdir/pngimage.h
+ $(compile) $(ALL_CFLAGS) $(FTFLAGS) $(LIBPNGCPPFLAGS) $(ZLIBCPPFLAGS) -c $< -o $@
+
+pdfimage.o: $(srcdir)/xetexdir/pdfimage.cpp $(srcdir)/xetexdir/pdfimage.h
+ $(CXX) $(ALL_CFLAGS) $(FTFLAGS) $(LIBXPDFCPPFLAGS) -c $< -o $@
+
+XeTeX_pic.o: $(srcdir)/xetexdir/XeTeX_pic.c $(srcdir)/xetexdir/XeTeX_ext.h $(XeTeXImageHdrs)
+ $(compile) $(TECKITFLAGS) $(FTFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+# Layout library
+xetex_ot_layout_o = \
+ $(xetex_platform_layout_o)
+
+XeTeXLayoutInterface.o: $(srcdir)/xetexdir/XeTeXLayoutInterface.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(GRAPHITEFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) $(XETEX_GRAPHITE) -c $< -o $@
+XeTeXOTLayoutEngine.o: $(srcdir)/xetexdir/XeTeXOTLayoutEngine.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+XeTeXFontMgr.o: $(srcdir)/xetexdir/XeTeXFontMgr.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+XeTeXFontMgr_FC.o: $(srcdir)/xetexdir/XeTeXFontMgr_FC.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+XeTeXFontMgr_Mac.o: $(srcdir)/xetexdir/XeTeXFontMgr_Mac.mm $(XeTeXFontHdrs)
+ $(CXX) -ObjC++ $(ICUCFLAGS) $(FTFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+cmaps.o: $(srcdir)/xetexdir/cmaps.cpp
+ $(CXX) $(ICUCFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+FontTableCache.o: $(srcdir)/xetexdir/FontTableCache.cpp
+ $(CXX) $(ICUCFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+XeTeXFontInst.o: $(srcdir)/xetexdir/XeTeXFontInst.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+XeTeXFontInst_Mac.o: $(srcdir)/xetexdir/XeTeXFontInst_Mac.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+XeTeXFontInst_FT2.o: $(srcdir)/xetexdir/XeTeXFontInst_FT2.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+XeTeXOTMath.o: $(srcdir)/xetexdir/XeTeXOTMath.cpp $(XeTeXFontHdrs)
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+XeTeXGrLayout.o: $(srcdir)/xetexdir/XeTeXGrLayout.cpp $(srcdir)/xetexdir/XeTeXGrLayout.h \
+ $(XeTeXFontHdrs) $(GRAPHITESRCDIR)/include/graphite/Font.h
+ $(CXX) $(ICUCFLAGS) $(FTFLAGS) $(FONTCONFIGCPPFLAGS) $(GRAPHITEFLAGS) $(ALL_CXXFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+# special rules for files that need the TECkit headers as well
+XeTeX_ext.o: $(srcdir)/xetexdir/XeTeX_ext.c xetexd.h
+ $(compile) $(ICUCFLAGS) $(FTFLAGS) $(TECKITFLAGS) $(LIBPNGCPPFLAGS) $(LIBXPDFCPPFLAGS) $(ZLIBCPPFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) $(XETEX_GRAPHITE) -c $< -o $@
+XeTeX_mac.o: $(srcdir)/xetexdir/XeTeX_mac.c xetexd.h
+ $(compile) $(ICUCFLAGS) $(TECKITFLAGS) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+trans.o: $(srcdir)/xetexdir/trans.c
+ $(compile) $(ALL_CFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+# sync
+synctex-xe.o: synctex-xe.c
+ $(compile) $(ALL_CFLAGS) $(TECKITFLAGS) $(FTFLAGS) $(XETEX_DEFINES) -c $< -o $@
+
+# Making xetex.
+xetex: $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) \
+ $(GRAPHITEDEP) $(TECKITDEP) $(FREETYPE2DEP) $(ICUDEP) $(EXTRADEPS)
+ @CXXHACKLINK@ $(xetex_o) $(xetex_add_o) $(xetex_images_o) $(xetex_ot_layout_o) \
+ $(FONTCONFIGLDFLAGS) $(socketlibs) $(xetexlibs) $(EXTRALIBS) \
+ @CXXHACKLDLIBS@ @CXXLDEXTRA@ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
+
+
+
+# Dumps
+all_xefmts = xetex.fmt $(xefmts)
+
+dumps: @XETEX@ xefmts
+xefmts: $(all_xefmts)
+
+xefmtdir = $(web2cdir)/xetex
+$(xefmtdir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs ${DESTDIR}$(xefmtdir)
+
+xetex.fmt: xetex
+ $(dumpenv) $(MAKE) progname=xetex files="xetex.ini unicode-letters.tex plain.tex cmr10.tfm" prereq-check
+ $(dumpenv) ./xetex --progname=xetex --jobname=xetex --ini \*\\input xetex.ini \\dump </dev/null
+
+xelatex.fmt: xetex
+ $(dumpenv) $(MAKE) progname=xelatex files="xelatex.ini unicode-letters.tex latex.ltx" prereq-check
+ $(dumpenv) ./xetex --progname=xelatex --jobname=xelatex --ini \*\\input xelatex.ini </dev/null
+