• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Process this file with automake to produce Makefile.in
2
3NULL =
4SUBDIRS =
5DIST_SUBDIRS =
6BUILT_SOURCES =
7EXTRA_DIST =
8CLEANFILES =
9DISTCLEANFILES =
10MAINTAINERCLEANFILES =
11DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
12
13# The following warning options are useful for debugging: -Wpadded
14#AM_CXXFLAGS =
15
16lib_LTLIBRARIES = libharfbuzz.la
17
18HBCFLAGS =
19HBLIBS =
20HBSOURCES =  \
21	hb-atomic-private.hh \
22	hb-blob.cc \
23	hb-buffer-deserialize-json.hh \
24	hb-buffer-deserialize-text.hh \
25	hb-buffer-private.hh \
26	hb-buffer-serialize.cc \
27	hb-buffer.cc \
28	hb-cache-private.hh \
29	hb-common.cc \
30	hb-fallback-shape.cc \
31	hb-font-private.hh \
32	hb-font.cc \
33	hb-mutex-private.hh \
34	hb-object-private.hh \
35	hb-open-file-private.hh \
36	hb-open-type-private.hh \
37	hb-ot-head-table.hh \
38	hb-ot-hhea-table.hh \
39	hb-ot-hmtx-table.hh \
40	hb-ot-maxp-table.hh \
41	hb-ot-name-table.hh \
42	hb-ot-tag.cc \
43	hb-private.hh \
44	hb-set-private.hh \
45	hb-set.cc \
46	hb-shape.cc \
47	hb-shape-plan-private.hh \
48	hb-shape-plan.cc \
49	hb-shaper-list.hh \
50	hb-shaper-impl-private.hh \
51	hb-shaper-private.hh \
52	hb-shaper.cc \
53	hb-tt-font.cc \
54	hb-unicode-private.hh \
55	hb-unicode.cc \
56	hb-utf-private.hh \
57	hb-warning.cc \
58	$(NULL)
59HBHEADERS = \
60	hb.h \
61	hb-blob.h \
62	hb-buffer.h \
63	hb-common.h \
64	hb-font.h \
65	hb-set.h \
66	hb-shape.h \
67	hb-shape-plan.h \
68	hb-unicode.h \
69	$(NULL)
70HBNODISTHEADERS = \
71	hb-version.h \
72	$(NULL)
73
74if HAVE_OT
75HBSOURCES += \
76	hb-ot-layout.cc \
77	hb-ot-layout-common-private.hh \
78	hb-ot-layout-gdef-table.hh \
79	hb-ot-layout-gpos-table.hh \
80	hb-ot-layout-gsubgpos-private.hh \
81	hb-ot-layout-gsub-table.hh \
82	hb-ot-layout-private.hh \
83	hb-ot-map.cc \
84	hb-ot-map-private.hh \
85	hb-ot-shape.cc \
86	hb-ot-shape-complex-arabic.cc \
87	hb-ot-shape-complex-arabic-fallback.hh \
88	hb-ot-shape-complex-arabic-table.hh \
89	hb-ot-shape-complex-default.cc \
90	hb-ot-shape-complex-indic.cc \
91	hb-ot-shape-complex-indic-machine.hh \
92	hb-ot-shape-complex-indic-private.hh \
93	hb-ot-shape-complex-indic-table.cc \
94	hb-ot-shape-complex-myanmar.cc \
95	hb-ot-shape-complex-myanmar-machine.hh \
96	hb-ot-shape-complex-sea.cc \
97	hb-ot-shape-complex-sea-machine.hh \
98	hb-ot-shape-complex-thai.cc \
99	hb-ot-shape-complex-private.hh \
100	hb-ot-shape-normalize-private.hh \
101	hb-ot-shape-normalize.cc \
102	hb-ot-shape-fallback-private.hh \
103	hb-ot-shape-fallback.cc \
104	hb-ot-shape-private.hh \
105	$(NULL)
106HBHEADERS += \
107	hb-ot.h \
108	hb-ot-layout.h \
109	hb-ot-tag.h \
110	$(NULL)
111endif
112
113if HAVE_PTHREAD
114HBCFLAGS += $(PTHREAD_CFLAGS)
115HBLIBS   += $(PTHREAD_LIBS)
116endif
117
118if HAVE_GLIB
119HBCFLAGS += $(GLIB_CFLAGS)
120HBLIBS   += $(GLIB_LIBS)
121HBSOURCES += hb-glib.cc
122HBHEADERS += hb-glib.h
123endif
124
125if HAVE_GOBJECT
126HBCFLAGS += $(GOBJECT_CFLAGS)
127HBLIBS   += $(GOBJECT_LIBS)
128HBSOURCES += hb-gobject-structs.cc
129nodist_HBSOURCES = hb-gobject-enums.cc
130HBHEADERS += hb-gobject.h
131BUILT_SOURCES += hb-gobject-enums.cc
132EXTRA_DIST += hb-gobject-enums.cc.tmpl
133DISTCLEANFILES += hb-gobject-enums.cc
134
135hb-gobject-enums.cc: hb-gobject-enums.cc.tmpl $(HBHEADERS)
136	$(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > "$@.tmp" && \
137	mv "$@.tmp" "$@" || ( $(RM) "@.tmp" && false )
138endif
139
140if HAVE_ICU
141HBCFLAGS += $(ICU_CFLAGS)
142HBLIBS   += $(ICU_LIBS)
143HBSOURCES += hb-icu.cc
144HBHEADERS += hb-icu.h
145endif
146
147if HAVE_FREETYPE
148HBCFLAGS += $(FREETYPE_CFLAGS)
149HBLIBS   += $(FREETYPE_LIBS)
150HBSOURCES += hb-ft.cc
151HBHEADERS += hb-ft.h
152endif
153
154if HAVE_GRAPHITE2
155HBCFLAGS += $(GRAPHITE2_CFLAGS)
156HBLIBS   += $(GRAPHITE2_LIBS)
157HBSOURCES += hb-graphite2.cc
158HBHEADERS += hb-graphite2.h
159endif
160
161if HAVE_UNISCRIBE
162HBCFLAGS += $(UNISCRIBE_CFLAGS)
163HBLIBS   += $(UNISCRIBE_LIBS)
164HBSOURCES += hb-uniscribe.cc
165HBHEADERS += hb-uniscribe.h
166endif
167
168if HAVE_CORETEXT
169HBCFLAGS += $(CORETEXT_CFLAGS)
170HBLIBS   += $(CORETEXT_LIBS)
171HBSOURCES += hb-coretext.cc
172HBHEADERS += hb-coretext.h
173endif
174
175if HAVE_HB_OLD
176SUBDIRS += hb-old
177HBCFLAGS += -I$(srcdir)/hb-old
178HBLIBS   += hb-old/libhb-old.la
179HBSOURCES += hb-old.cc
180endif
181DIST_SUBDIRS += hb-old
182
183if HAVE_ICU_LE
184SUBDIRS += hb-icu-le
185HBCFLAGS += -I$(srcdir)/hb-icu-le
186HBLIBS   += hb-icu-le/libhb-icu-le.la
187HBSOURCES += hb-icu-le.cc
188endif
189DIST_SUBDIRS += hb-icu-le
190
191if HAVE_UCDN
192SUBDIRS += hb-ucdn
193HBCFLAGS += -I$(srcdir)/hb-ucdn
194HBLIBS   += hb-ucdn/libhb-ucdn.la
195HBSOURCES += hb-ucdn.cc
196endif
197DIST_SUBDIRS += hb-ucdn
198
199
200# Put the library together
201
202if OS_WIN32
203export_symbols = -export-symbols harfbuzz.def
204harfbuzz_def_dependency = harfbuzz.def
205libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
206else
207if HAVE_ICU
208libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
209else
210# Use a C linker for GCC, not C++; Don't link to libstdc++
211if HAVE_GCC
212libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS)
213else
214libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
215endif
216endif
217endif
218
219libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) $(HBNODISTHEADERS)
220nodist_libharfbuzz_la_SOURCES = $(nodist_HBSOURCES)
221libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
222libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) $(export_symbols) -no-undefined
223libharfbuzz_la_LIBADD = $(HBLIBS)
224EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
225pkginclude_HEADERS = $(HBHEADERS)
226nodist_pkginclude_HEADERS = $(HBNODISTHEADERS)
227
228CLEANFILES += harfbuzz.def
229harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS)
230	$(AM_V_GEN) (echo EXPORTS; \
231	(cat $^ || echo 'hb_ERROR ()' ) | \
232	$(EGREP) '^hb_.* \(' | \
233	sed -e 's/ (.*//' | \
234	LANG=C sort; \
235	echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \
236	) >"$@.tmp"
237	@ ! grep -q hb_ERROR "$@.tmp" && mv "$@.tmp" "$@" || ($(RM) "$@"; false)
238
239
240GENERATORS = \
241	gen-arabic-table.py \
242	gen-indic-table.py \
243	$(NULL)
244
245EXTRA_DIST += $(GENERATORS)
246
247unicode-tables: arabic-table indic-table
248
249indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt
250	$(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc.tmp && \
251	mv hb-ot-shape-complex-indic-table.cc.tmp $(srcdir)/hb-ot-shape-complex-indic-table.cc || \
252	($(RM) hb-ot-shape-complex-indic-table.cc.tmp; false)
253
254arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
255	$(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \
256	mv hb-ot-shape-complex-arabic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-arabic-table.hh || \
257	($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false)
258
259
260.PHONY: unicode-tables arabic-table indic-table
261
262BUILT_SOURCES += \
263	hb-buffer-deserialize-json.hh \
264	hb-buffer-deserialize-text.hh \
265	hb-ot-shape-complex-indic-machine.hh \
266	hb-ot-shape-complex-myanmar-machine.hh \
267	hb-ot-shape-complex-sea-machine.hh \
268	$(NULL)
269EXTRA_DIST += \
270	hb-buffer-deserialize-json.rl \
271	hb-buffer-deserialize-text.rl \
272	hb-ot-shape-complex-indic-machine.rl \
273	hb-ot-shape-complex-myanmar-machine.rl \
274	hb-ot-shape-complex-sea-machine.rl \
275	$(NULL)
276%.hh: %.rl
277	$(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \
278	mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false )
279
280noinst_PROGRAMS = \
281	main \
282	test \
283	test-buffer-serialize \
284	test-size-params \
285	test-would-substitute \
286	$(NULL)
287bin_PROGRAMS =
288
289main_SOURCES = main.cc
290main_CPPFLAGS = $(HBCFLAGS)
291main_LDADD = libharfbuzz.la $(HBLIBS)
292
293test_SOURCES = test.cc
294test_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
295test_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
296
297test_would_substitute_SOURCES = test-would-substitute.cc
298test_would_substitute_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
299test_would_substitute_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
300
301test_size_params_SOURCES = test-size-params.cc
302test_size_params_CPPFLAGS = $(HBCFLAGS)
303test_size_params_LDADD = libharfbuzz.la $(HBLIBS)
304
305test_buffer_serialize_SOURCES = test-buffer-serialize.cc
306test_buffer_serialize_CPPFLAGS = $(HBCFLAGS)
307test_buffer_serialize_LDADD = libharfbuzz.la $(HBLIBS)
308
309dist_check_SCRIPTS = \
310	check-c-linkage-decls.sh \
311	check-header-guards.sh \
312	check-includes.sh \
313	check-symbols.sh \
314	$(NULL)
315
316if HAVE_ICU
317else
318dist_check_SCRIPTS += check-libstdc++.sh
319endif
320
321if HAVE_ICU_LE
322else
323dist_check_SCRIPTS += check-static-inits.sh
324endif
325
326TESTS = $(dist_check_SCRIPTS)
327TESTS_ENVIRONMENT = \
328	srcdir="$(srcdir)" \
329	MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
330	HBSOURCES="$(HBSOURCES)" \
331	HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \
332	$(NULL)
333
334#-include $(INTROSPECTION_MAKEFILE)
335#INTROSPECTION_GIRS = hb-1.0.gir
336#INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_
337#INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
338#
339#if HAVE_INTROSPECTION
340#
341#hb-1.0.gir: libharfbuzz.la
342#hb_1_0_gir_INCLUDES = GObject-2.0
343#hb_1_0_gir_CFLAGS = $(INCLUDES) $(HBCFLAGS) -DHB_H -DHB_H_IN -DHB_OT_H -DHB_OT_H_IN
344#hb_1_0_gir_LIBS = libharfbuzz.la
345#hb_1_0_gir_FILES = $(HBHEADERS) $(HBNODISTHEADERS)
346#
347#girdir = $(datadir)/gir-1.0
348#gir_DATA = $(INTROSPECTION_GIRS)
349#
350#typelibdir = $(libdir)/girepository-1.0
351#typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
352#
353#CLEANFILES += $(gir_DATA) $(typelib_DATA)
354#endif
355
356-include $(top_srcdir)/git.mk
357