1 ## texk/web2c/xetexdir/am/xetex.am: Makefile fragment for XeTeX.
3 ## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
11 EXTRA_PROGRAMS += xetex
13 # Force Automake to use CXXLD for linking
14 nodist_EXTRA_xetex_SOURCES = dummy.cxx
16 xe_tangle = WEBINPUTS=.:$(srcdir)/xetexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(OTANGLE)
20 xetex_cppflags = $(AM_CPPFLAGS) -I$(srcdir)/xetexdir
21 ## Must add icu first to avoid an installed version.
22 xetex_cppflags += $(ICU_INCLUDES)
23 ## Must add freetype2 includes early to avoid
24 ## freetype1/freetype2 confusion -- what a mess.
25 xetex_cppflags += $(FREETYPE2_INCLUDES)
26 xetex_cppflags += $(TECKIT_INCLUDES)
27 xetex_cppflags += $(HARFBUZZ_INCLUDES)
28 xetex_cppflags += $(GRAPHITE2_INCLUDES)
29 xetex_cppflags += $(POPPLER_INCLUDES)
30 xetex_cppflags += $(LIBPNG_INCLUDES)
31 xetex_cppflags += $(ZLIB_INCLUDES)
32 xetex_ldadd = $(libxetex)
33 xetex_ldadd += $(HARFBUZZ_LIBS)
34 xetex_ldadd += $(GRAPHITE2_LIBS)
35 xetex_ldadd += $(ICU_LIBS)
36 xetex_ldadd += $(TECKIT_LIBS)
37 xetex_ldadd += $(POPPLER_LIBS)
38 xetex_ldadd += $(LIBPNG_LIBS)
39 xetex_ldadd += $(FREETYPE2_LIBS)
40 xetex_ldadd += $(ZLIB_LIBS)
41 xetex_dependencies = $(proglib)
42 xetex_dependencies += $(KPATHSEA_DEPEND)
43 xetex_dependencies += $(ICU_DEPEND)
44 xetex_dependencies += $(TECKIT_DEPEND)
45 xetex_dependencies += $(HARFBUZZ_DEPEND)
46 xetex_dependencies += $(GRAPHITE2_DEPEND)
47 xetex_dependencies += $(POPPLER_DEPEND)
48 xetex_dependencies += $(LIBPNG_DEPEND)
49 xetex_dependencies += $(FREETYPE2_DEPEND)
50 xetex_dependencies += $(ZLIB_DEPEND)
54 xetex_cppflags += -DXETEX_MAC
55 xetex_LDFLAGS = -framework ApplicationServices -framework Cocoa
59 xetex_cppflags += $(FONTCONFIG_INCLUDES)
60 xetex_ldadd += $(FONTCONFIG_LIBS)
65 xetex_CPPFLAGS = $(xetex_cppflags)
66 xetex_CFLAGS = # $(WARNING_CFLAGS)
67 xetex_CXXFLAGS = # $(WARNING_CXXFLAGS)
69 ## With --enable-ipc, XeTeX may need to link with -lsocket.
70 xetex_LDADD = $(xetex_ldadd) $(LDADD) $(ipc_socketlibs)
72 # We must create libxetex.a etc before building the xetex_OBJECTS
73 xetex_prereq = $(libxetex) xetexdir/etex_version.h xetexdir/xetex_version.h
74 $(xetex_OBJECTS): $(xetex_prereq)
77 xetex_c_h = xetexini.c xetex0.c xetexcoerce.h xetexd.h
78 nodist_xetex_SOURCES = $(xetex_c_h) xetex-pool.c
79 dist_xetex_SOURCES = xetexdir/xetexextra.c xetexdir/xetexextra.h \
80 xetexdir/etex_version.h xetexdir/xetex_version.h
82 $(xetex_c_h): xetex-web2c
84 xetex-web2c: xetex.p $(web2c_texmf) xetexdir/xetex.defines
87 xetex-pool.c: xetex.pool xetexd.h $(makecpool_stamp)
88 $(makecpool) xetex >$@ || rm -f $@
91 xetex.p xetex.pool: xetex-tangle
92 @$(xe_tangle) xetex xetex
93 xetex-tangle: otangle$(EXEEXT) xetexdir/xetex.web xetex.ch tangle-sh
94 @$(xe_tangle) xetex xetex
96 # Extract etex version
97 $(srcdir)/xetexdir/etex_version.h: @MAINTAINER_MODE_TRUE@ xetexdir/xetex.web
98 $(AM_V_GEN)grep '^@d eTeX_version_string==' $(srcdir)/xetexdir/xetex.web \
99 | sed "s/^.*'-/#define ETEX_VERSION \"/;s/'.*$$/\"/" >$@
101 ## Extract xetex version
102 $(srcdir)/xetexdir/xetex_version.h: @MAINTAINER_MODE_TRUE@ xetexdir/xetex.web
103 $(AM_V_GEN)grep '^@d XeTeX_version_string==' $(srcdir)/xetexdir/xetex.web \
104 | sed "s/^.*'-/#define XETEX_VERSION \"/;s/'.*$$/\"/" >$@
107 xetex.ch: tie$(EXEEXT) $(xetex_ch_srcs)
108 $(tie_c) $(xetex_ch_srcs)
113 $(xetex_ch_synctex) \
115 $(xetex_post_ch_synctex) \
119 EXTRA_DIST += $(xetex_web_srcs) $(xetex_ch_srcs) xetexdir/xetex.defines
121 DISTCLEANFILES += $(nodist_xetex_SOURCES) xetex.web xetex.ch xetex-web2c \
122 xetex.p xetex.pool xetex-tangle
127 EXTRA_LIBRARIES += libxetex.a
129 libxetex_a_CPPFLAGS = $(xetex_cppflags)
130 libxetex_a_CFLAGS = # $(WARNING_CFLAGS)
131 libxetex_a_CXXFLAGS = # $(WARNING_CXXFLAGS)
132 libxetex_a_OBJCXXFLAGS = # $(WARNING_OBJCXXFLAGS)
134 libxetex_a_SOURCES = \
135 xetexdir/MathTable.h \
136 xetexdir/XeTeXFontInst.cpp \
137 xetexdir/XeTeXFontInst.h \
138 xetexdir/XeTeXFontMgr.cpp \
139 xetexdir/XeTeXFontMgr.h \
140 xetexdir/XeTeXLayoutInterface.cpp \
141 xetexdir/XeTeXLayoutInterface.h \
142 xetexdir/XeTeXOTMath.cpp \
143 xetexdir/XeTeXOTMath.h \
144 xetexdir/XeTeX_ext.c \
145 xetexdir/XeTeX_ext.h \
146 xetexdir/XeTeX_pic.c \
147 xetexdir/XeTeX_web.h \
148 xetexdir/XeTeXswap.h \
153 xetexdir/pdfimage.cpp \
154 xetexdir/pdfimage.h \
155 xetexdir/image/bmpimage.c \
156 xetexdir/image/bmpimage.h \
157 xetexdir/image/jpegimage.c \
158 xetexdir/image/jpegimage.h \
159 xetexdir/image/mfileio.c \
160 xetexdir/image/mfileio.h \
161 xetexdir/image/numbers.c \
162 xetexdir/image/numbers.h \
163 xetexdir/image/pngimage.c \
164 xetexdir/image/pngimage.h
168 libxetex_a_SOURCES += \
169 xetexdir/XeTeXFontInst_Mac.cpp \
170 xetexdir/XeTeXFontInst_Mac.h \
171 xetexdir/XeTeXFontMgr_Mac.mm \
172 xetexdir/XeTeXFontMgr_Mac.h \
177 libxetex_a_SOURCES += \
178 xetexdir/XeTeXFontMgr_FC.cpp \
179 xetexdir/XeTeXFontMgr_FC.h
183 # We must create xetexd.h etc. before building the libxetex_a_OBJECTS.
184 libxetex_prereq = xetexd.h $(xetex_dependencies)
185 $(libxetex_a_OBJECTS): $(libxetex_prereq)
191 xetexdir/image/README \
192 xetexdir/unicode-char-prep.pl \
193 xetexdir/xewebmac.tex
198 xetexdir/xetex-bug73.test \
201 EXTRA_DIST += $(xetex_tests)
204 TESTS += $(xetex_tests)
208 EXTRA_DIST += xetexdir/tests/bug73.log xetexdir/tests/bug73.tex
209 DISTCLEANFILES += bug73.fmt bug73.log bug73.out bug73.tex