• 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
16# Convenience targets:
17lib: libharfbuzz.la
18
19lib_LTLIBRARIES = libharfbuzz.la
20
21HBCFLAGS =
22HBLIBS =
23HBSOURCES =  \
24	hb-atomic-private.hh \
25	hb-blob.cc \
26	hb-buffer-deserialize-json.hh \
27	hb-buffer-deserialize-text.hh \
28	hb-buffer-private.hh \
29	hb-buffer-serialize.cc \
30	hb-buffer.cc \
31	hb-cache-private.hh \
32	hb-common.cc \
33	hb-face-private.hh \
34	hb-face.cc \
35	hb-font-private.hh \
36	hb-font.cc \
37	hb-mutex-private.hh \
38	hb-object-private.hh \
39	hb-open-file-private.hh \
40	hb-open-type-private.hh \
41	hb-ot-cmap-table.hh \
42	hb-ot-head-table.hh \
43	hb-ot-hhea-table.hh \
44	hb-ot-hmtx-table.hh \
45	hb-ot-maxp-table.hh \
46	hb-ot-name-table.hh \
47	hb-ot-tag.cc \
48	hb-private.hh \
49	hb-set-private.hh \
50	hb-set.cc \
51	hb-shape.cc \
52	hb-shape-plan-private.hh \
53	hb-shape-plan.cc \
54	hb-shaper-list.hh \
55	hb-shaper-impl-private.hh \
56	hb-shaper-private.hh \
57	hb-shaper.cc \
58	hb-unicode-private.hh \
59	hb-unicode.cc \
60	hb-utf-private.hh \
61	hb-warning.cc \
62	$(NULL)
63HBHEADERS = \
64	hb.h \
65	hb-blob.h \
66	hb-buffer.h \
67	hb-common.h \
68	hb-deprecated.h \
69	hb-face.h \
70	hb-font.h \
71	hb-set.h \
72	hb-shape.h \
73	hb-shape-plan.h \
74	hb-unicode.h \
75	$(NULL)
76HBNODISTHEADERS = \
77	hb-version.h \
78	$(NULL)
79
80if HAVE_OT
81HBSOURCES += \
82	hb-ot-font.cc \
83	hb-ot-layout.cc \
84	hb-ot-layout-common-private.hh \
85	hb-ot-layout-gdef-table.hh \
86	hb-ot-layout-gpos-table.hh \
87	hb-ot-layout-gsubgpos-private.hh \
88	hb-ot-layout-gsub-table.hh \
89	hb-ot-layout-jstf-table.hh \
90	hb-ot-layout-private.hh \
91	hb-ot-map.cc \
92	hb-ot-map-private.hh \
93	hb-ot-shape.cc \
94	hb-ot-shape-complex-arabic.cc \
95	hb-ot-shape-complex-arabic-fallback.hh \
96	hb-ot-shape-complex-arabic-table.hh \
97	hb-ot-shape-complex-arabic-win1256.hh \
98	hb-ot-shape-complex-default.cc \
99	hb-ot-shape-complex-hangul.cc \
100	hb-ot-shape-complex-hebrew.cc \
101	hb-ot-shape-complex-indic.cc \
102	hb-ot-shape-complex-indic-machine.hh \
103	hb-ot-shape-complex-indic-private.hh \
104	hb-ot-shape-complex-indic-table.cc \
105	hb-ot-shape-complex-myanmar.cc \
106	hb-ot-shape-complex-myanmar-machine.hh \
107	hb-ot-shape-complex-sea.cc \
108	hb-ot-shape-complex-sea-machine.hh \
109	hb-ot-shape-complex-thai.cc \
110	hb-ot-shape-complex-tibetan.cc \
111	hb-ot-shape-complex-private.hh \
112	hb-ot-shape-normalize-private.hh \
113	hb-ot-shape-normalize.cc \
114	hb-ot-shape-fallback-private.hh \
115	hb-ot-shape-fallback.cc \
116	hb-ot-shape-private.hh \
117	$(NULL)
118HBHEADERS += \
119	hb-ot.h \
120	hb-ot-font.h \
121	hb-ot-layout.h \
122	hb-ot-shape.h \
123	hb-ot-tag.h \
124	$(NULL)
125endif
126
127if HAVE_FALLBACK
128HBSOURCES += hb-fallback-shape.cc
129endif
130
131if HAVE_PTHREAD
132HBCFLAGS += $(PTHREAD_CFLAGS)
133HBLIBS   += $(PTHREAD_LIBS)
134endif
135
136if HAVE_GLIB
137HBCFLAGS += $(GLIB_CFLAGS)
138HBLIBS   += $(GLIB_LIBS)
139HBSOURCES += hb-glib.cc
140HBHEADERS += hb-glib.h
141endif
142
143if HAVE_FREETYPE
144HBCFLAGS += $(FREETYPE_CFLAGS)
145HBLIBS   += $(FREETYPE_LIBS)
146HBSOURCES += hb-ft.cc
147HBHEADERS += hb-ft.h
148endif
149
150if HAVE_GRAPHITE2
151HBCFLAGS += $(GRAPHITE2_CFLAGS)
152HBLIBS   += $(GRAPHITE2_LIBS)
153HBSOURCES += hb-graphite2.cc
154HBHEADERS += hb-graphite2.h
155endif
156
157if HAVE_UNISCRIBE
158HBCFLAGS += $(UNISCRIBE_CFLAGS)
159HBLIBS   += $(UNISCRIBE_LIBS)
160HBSOURCES += hb-uniscribe.cc
161HBHEADERS += hb-uniscribe.h
162endif
163
164if HAVE_CORETEXT
165HBCFLAGS += $(CORETEXT_CFLAGS)
166HBLIBS   += $(CORETEXT_LIBS)
167HBSOURCES += hb-coretext.cc
168HBHEADERS += hb-coretext.h
169endif
170
171if HAVE_UCDN
172SUBDIRS += hb-ucdn
173HBCFLAGS += -I$(srcdir)/hb-ucdn
174HBLIBS   += hb-ucdn/libhb-ucdn.la
175HBSOURCES += hb-ucdn.cc
176endif
177DIST_SUBDIRS += hb-ucdn
178
179
180# Put the library together
181
182if OS_WIN32
183export_symbols = -export-symbols harfbuzz.def
184harfbuzz_def_dependency = harfbuzz.def
185libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
186else
187# Use a C linker for GCC, not C++; Don't link to libstdc++
188if HAVE_GCC
189libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS)
190else
191libharfbuzz_la_LINK = $(CXXLINK) $(libharfbuzz_la_LDFLAGS)
192endif
193endif
194
195libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) $(HBNODISTHEADERS)
196libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
197libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) $(export_symbols) -no-undefined
198libharfbuzz_la_LIBADD = $(HBLIBS)
199EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
200pkginclude_HEADERS = $(HBHEADERS)
201nodist_pkginclude_HEADERS = $(HBNODISTHEADERS)
202pkgconfigdir = $(libdir)/pkgconfig
203pkgconfig_DATA = harfbuzz.pc
204EXTRA_DIST += harfbuzz.pc.in
205
206if HAVE_ICU
207lib_LTLIBRARIES += libharfbuzz-icu.la
208libharfbuzz_icu_la_SOURCES = hb-icu.cc
209libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS)
210libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
211libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la
212pkginclude_HEADERS += hb-icu.h
213pkgconfig_DATA += harfbuzz-icu.pc
214endif
215EXTRA_DIST += harfbuzz-icu.pc.in
216
217if HAVE_GOBJECT
218lib_LTLIBRARIES += libharfbuzz-gobject.la
219libharfbuzz_gobject_la_SOURCES = hb-gobject-structs.cc
220nodist_libharfbuzz_gobject_la_SOURCES = hb-gobject-enums.cc
221libharfbuzz_gobject_la_CPPFLAGS = $(GOBJECT_CFLAGS)
222libharfbuzz_gobject_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
223libharfbuzz_gobject_la_LIBADD = $(GOBJECT_LIBS) libharfbuzz.la
224pkginclude_HEADERS += hb-gobject.h hb-gobject-structs.h
225nodist_pkginclude_HEADERS += hb-gobject-enums.h
226pkgconfig_DATA += harfbuzz-gobject.pc
227
228BUILT_SOURCES += \
229	hb-gobject-enums.cc \
230	hb-gobject-enums.h \
231	$(NULL)
232DISTCLEANFILES += \
233	hb-gobject-enums.cc \
234	hb-gobject-enums.h \
235	$(NULL)
236hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS)
237	$(AM_V_GEN) $(GLIB_MKENUMS) \
238		--identifier-prefix hb_ --symbol-prefix hb_gobject \
239		--template $^ | \
240	sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \
241	|| ($(RM) "$@"; false)
242endif
243EXTRA_DIST += \
244	harfbuzz-gobject.pc.in \
245	hb-gobject-enums.cc.tmpl \
246	hb-gobject-enums.h.tmpl \
247	$(NULL)
248
249
250%.pc: %.pc.in $(top_builddir)/config.status
251	$(AM_V_GEN) \
252	$(SED)	-e 's@%prefix%@$(prefix)@g' \
253		-e 's@%exec_prefix%@$(exec_prefix)@g' \
254		-e 's@%libdir%@$(libdir)@g' \
255		-e 's@%includedir%@$(includedir)@g' \
256		-e 's@%VERSION%@$(VERSION)@g' \
257	"$<" > "$@" \
258	|| ($(RM) "$@"; false)
259
260CLEANFILES += $(pkgconfig_DATA)
261
262
263CLEANFILES += harfbuzz.def
264harfbuzz.def: $(HBHEADERS) $(HBNODISTHEADERS)
265	$(AM_V_GEN) (echo EXPORTS; \
266	(cat $^ || echo 'hb_ERROR ()' ) | \
267	$(EGREP) '^hb_.* \(' | \
268	sed -e 's/ (.*//' | \
269	LANG=C sort; \
270	echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \
271	) >"$@"
272	@ ! grep -q hb_ERROR "$@" \
273	|| ($(RM) "$@"; false)
274
275
276GENERATORS = \
277	gen-arabic-table.py \
278	gen-indic-table.py \
279	$(NULL)
280EXTRA_DIST += $(GENERATORS)
281
282unicode-tables: arabic-table indic-table
283
284indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt
285	$(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.cc \
286	|| ($(RM) hb-ot-shape-complex-indic-table.cc; false)
287
288arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt
289	$(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh \
290	|| ($(RM) hb-ot-shape-complex-arabic-table.hh; false)
291
292built-sources: $(BUILT_SOURCES)
293
294.PHONY: unicode-tables arabic-table indic-table built-sources
295
296RAGEL_GENERATED = \
297	$(srcdir)/hb-buffer-deserialize-json.hh \
298	$(srcdir)/hb-buffer-deserialize-text.hh \
299	$(srcdir)/hb-ot-shape-complex-indic-machine.hh \
300	$(srcdir)/hb-ot-shape-complex-myanmar-machine.hh \
301	$(srcdir)/hb-ot-shape-complex-sea-machine.hh \
302	$(NULL)
303BUILT_SOURCES += $(RAGEL_GENERATED)
304EXTRA_DIST += \
305	hb-buffer-deserialize-json.rl \
306	hb-buffer-deserialize-text.rl \
307	hb-ot-shape-complex-indic-machine.rl \
308	hb-ot-shape-complex-myanmar-machine.rl \
309	hb-ot-shape-complex-sea-machine.rl \
310	$(NULL)
311MAINTAINERCLEANFILES += $(RAGEL_GENERATED)
312$(srcdir)/%.hh: $(srcdir)/%.rl
313	$(AM_V_GEN)(cd $(srcdir) && $(RAGEL) -e -F1 -o "$*.hh" "$*.rl") \
314	|| ($(RM) "$@"; false)
315
316noinst_PROGRAMS = \
317	main \
318	test \
319	test-buffer-serialize \
320	test-size-params \
321	test-would-substitute \
322	$(NULL)
323bin_PROGRAMS =
324
325main_SOURCES = main.cc
326main_CPPFLAGS = $(HBCFLAGS)
327main_LDADD = libharfbuzz.la $(HBLIBS)
328
329test_SOURCES = test.cc
330test_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
331test_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
332
333test_would_substitute_SOURCES = test-would-substitute.cc
334test_would_substitute_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
335test_would_substitute_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
336
337test_size_params_SOURCES = test-size-params.cc
338test_size_params_CPPFLAGS = $(HBCFLAGS)
339test_size_params_LDADD = libharfbuzz.la $(HBLIBS)
340
341test_buffer_serialize_SOURCES = test-buffer-serialize.cc
342test_buffer_serialize_CPPFLAGS = $(HBCFLAGS)
343test_buffer_serialize_LDADD = libharfbuzz.la $(HBLIBS)
344
345dist_check_SCRIPTS = \
346	check-c-linkage-decls.sh \
347	check-defs.sh \
348	check-header-guards.sh \
349	check-includes.sh \
350	check-libstdc++.sh \
351	check-static-inits.sh \
352	check-symbols.sh \
353	$(NULL)
354
355TESTS = $(dist_check_SCRIPTS)
356TESTS_ENVIRONMENT = \
357	srcdir="$(srcdir)" \
358	MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
359	HBSOURCES="$(HBSOURCES)" \
360	HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \
361	$(NULL)
362
363if HAVE_INTROSPECTION
364
365-include $(INTROSPECTION_MAKEFILE)
366INTROSPECTION_GIRS = HarfBuzz-$(HB_VERSION_MAJOR).0.gir # What does the 0 mean anyway?!
367INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_ --warn-all
368INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
369INTROSPECTION_SCANNER_ENV = CC="$(CC)"
370
371HarfBuzz-0.0.gir: libharfbuzz.la libharfbuzz-gobject.la
372HarfBuzz_0_0_gir_INCLUDES = GObject-2.0
373HarfBuzz_0_0_gir_CFLAGS = \
374	$(INCLUDES) \
375	$(HBCFLAGS) \
376	-DHB_H \
377	-DHB_H_IN \
378	-DHB_OT_H \
379	-DHB_OT_H_IN \
380	-DHB_GOBJECT_H \
381	-DHB_GOBJECT_H_IN \
382	$(NULL)
383HarfBuzz_0_0_gir_LIBS = \
384	libharfbuzz.la \
385	libharfbuzz-gobject.la \
386	$(NULL)
387HarfBuzz_0_0_gir_FILES = \
388	$(HBHEADERS) \
389	$(HBNODISTHEADERS) \
390	$(HBSOURCES) \
391	hb-gobject-enums.cc \
392	hb-gobject-enums.h \
393	hb-gobject-structs.cc \
394	hb-gobject-structs.h \
395	$(NULL)
396
397girdir = $(datadir)/gir-1.0
398gir_DATA = $(INTROSPECTION_GIRS)
399
400typelibdir = $(libdir)/girepository-1.0
401typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
402
403CLEANFILES += $(gir_DATA) $(typelib_DATA)
404
405endif
406
407-include $(top_srcdir)/git.mk
408