Bug 1883518 - Remove a bunch of unused ServoBindings.toml entries. r=firefox-style...
[gecko.git] / gfx / harfbuzz / src / Makefile.am
blobff6a6d6f3708bd027ee21200e2dff6c78460f615
1 # Process this file with automake to produce Makefile.in
3 NULL =
4 SUBDIRS =
5 DIST_SUBDIRS =
6 BUILT_SOURCES =
7 EXTRA_DIST =
8 CLEANFILES =
9 DISTCLEANFILES =
10 MAINTAINERCLEANFILES =
11 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
12 TESTS =
13 check_PROGRAMS =
15 EXTRA_DIST += harfbuzz.cc harfbuzz-subset.cc
16 EXTRA_DIST += meson.build
17 EXTRA_DIST += fix_get_types.py relative_to.py
19 # Convenience targets:
20 lib: $(BUILT_SOURCES) libharfbuzz.la
21 libs: $(BUILT_SOURCES) $(lib_LTLIBRARIES)
22 tiny:
23         $(MAKE) $(AM_MAKEFLAGS) CPPFLAGS="-Os -DHB_TINY $(CPPFLAGS)" libs
24 tinyz:
25         $(MAKE) $(AM_MAKEFLAGS) CPPFLAGS="-Oz -DHB_TINY $(CPPFLAGS)" libs
27 lib_LTLIBRARIES = libharfbuzz.la
29 include Makefile.sources
31 HBCFLAGS =
32 HBLIBS =
33 HBNONPCLIBS =
34 HBDEPS =
35 HBSOURCES =  $(HB_BASE_sources)
36 HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources)
37 HBHEADERS = $(HB_BASE_headers)
39 if HAVE_PTHREAD
40 HBCFLAGS += $(PTHREAD_CFLAGS)
41 HBNONPCLIBS += $(PTHREAD_LIBS)
42 endif
44 if HAVE_GLIB
45 HBCFLAGS += $(GLIB_CFLAGS)
46 HBLIBS   += $(GLIB_LIBS)
47 HBDEPS   += $(GLIB_DEPS)
48 HBSOURCES += $(HB_GLIB_sources)
49 HBHEADERS += $(HB_GLIB_headers)
50 HB_HAS_GLIB_DEF = define HB_HAS_GLIB 1
51 else
52 HB_HAS_GLIB_DEF = undef HB_HAS_GLIB
53 endif
55 if HAVE_FREETYPE
56 HBCFLAGS += $(FREETYPE_CFLAGS)
57 HBLIBS   += $(FREETYPE_LIBS)
58 HBDEPS   += $(FREETYPE_DEPS)
59 HBSOURCES += $(HB_FT_sources)
60 HBHEADERS += $(HB_FT_headers)
61 HB_HAS_FREETYPE_DEF = define HB_HAS_FREETYPE 1
62 else
63 HB_HAS_FREETYPE_DEF = undef HB_HAS_FREETYPE
64 endif
66 if HAVE_GRAPHITE2
67 HBCFLAGS += $(GRAPHITE2_CFLAGS)
68 HBLIBS   += $(GRAPHITE2_LIBS)
69 HBDEPS   += $(GRAPHITE2_DEPS)
70 HBSOURCES += $(HB_GRAPHITE2_sources)
71 HBHEADERS += $(HB_GRAPHITE2_headers)
72 HB_HAS_GRAPHITE_DEF = define HB_HAS_GRAPHITE 1
73 else
74 HB_HAS_GRAPHITE_DEF = undef HB_HAS_GRAPHITE
75 endif
77 if HAVE_UNISCRIBE
78 HBCFLAGS += $(UNISCRIBE_CFLAGS)
79 HBNONPCLIBS += $(UNISCRIBE_LIBS)
80 HBSOURCES += $(HB_UNISCRIBE_sources)
81 HBHEADERS += $(HB_UNISCRIBE_headers)
82 HB_HAS_UNISCRIBE_DEF = define HB_HAS_UNISCRIBE 1
83 else
84 HB_HAS_UNISCRIBE_DEF = undef HB_HAS_UNISCRIBE
85 endif
87 if HAVE_DIRECTWRITE
88 HBCFLAGS += $(DIRECTWRITE_CXXFLAGS)
89 HBNONPCLIBS += $(DIRECTWRITE_LIBS)
90 HBSOURCES += $(HB_DIRECTWRITE_sources)
91 HBHEADERS += $(HB_DIRECTWRITE_headers)
92 HB_HAS_DIRECTWRITE_DEF = define HB_HAS_DIRECTWRITE 1
93 else
94 HB_HAS_DIRECTWRITE_DEF = undef HB_HAS_DIRECTWRITE
95 endif
97 if HAVE_GDI
98 HBCFLAGS += $(GDI_CXXFLAGS)
99 HBNONPCLIBS += $(GDI_LIBS)
100 HBSOURCES += $(HB_GDI_sources)
101 HBHEADERS += $(HB_GDI_headers)
102 HB_HAS_GDI_DEF = define HB_HAS_GDI 1
103 else
104 HB_HAS_GDI_DEF = undef HB_HAS_GDI
105 endif
107 if HAVE_CORETEXT
108 HBCFLAGS += $(CORETEXT_CFLAGS)
109 HBNONPCLIBS += $(CORETEXT_LIBS)
110 HBSOURCES += $(HB_CORETEXT_sources)
111 HBHEADERS += $(HB_CORETEXT_headers)
112 HB_HAS_CORETEXT_DEF = define HB_HAS_CORETEXT 1
113 else
114 HB_HAS_CORETEXT_DEF = undef HB_HAS_CORETEXT
115 endif
117 if HAVE_WASM
118 HBCFLAGS += $(WASM_CFLAGS)
119 HBNONPCLIBS += $(WASM_LIBS)
120 HBSOURCES += $(HB_WASM_sources)
121 HBHEADERS += $(HB_WASM_headers)
122 HB_HAS_WASM_DEF = define HB_HAS_WASM 1
123 else
124 HB_HAS_WASM_DEF = undef HB_HAS_WASM
125 endif
128 BUILT_SOURCES += \
129         hb-version.h
131 $(srcdir)/hb-version.h: hb-version.h.in $(top_srcdir)/configure.ac
132         $(AM_V_GEN) $(SED) \
133                 -e 's/[@]HB_VERSION_MAJOR@/$(HB_VERSION_MAJOR)/' \
134                 -e 's/[@]HB_VERSION_MINOR@/$(HB_VERSION_MINOR)/' \
135                 -e 's/[@]HB_VERSION_MICRO@/$(HB_VERSION_MICRO)/' \
136                 -e 's/[@]HB_VERSION@/$(HB_VERSION)/' \
137                 "$<" > "$@" || ($(RM) "$@"; false)
139 # Put the library together
141 HBLIBS += $(HBNONPCLIBS)
143 if OS_WIN32
144 export_symbols = -export-symbols harfbuzz.def
145 harfbuzz_def_dependency = harfbuzz.def
146 export_symbols_subset = -export-symbols harfbuzz-subset.def
147 harfbuzz_subset_def_dependency = harfbuzz-subset.def
148 export_symbols_cairo = -export-symbols harfbuzz-cairo.def
149 harfbuzz_cairo_def_dependency = harfbuzz-cairo.def
150 export_symbols_icu = -export-symbols harfbuzz-icu.def
151 harfbuzz_icu_def_dependency = harfbuzz-icu.def
152 export_symbols_gobject = -export-symbols harfbuzz-gobject.def
153 harfbuzz_gobject_def_dependency = harfbuzz-gobject.def
154 chosen_linker = $(CXXLINK)
155 else
156 if WITH_LIBSTDCXX
157 chosen_linker = $(CXXLINK)
158 else
159 if HAVE_GCC
160 # Use a C linker for GCC, not C++; Don't link to libstdc++
161 chosen_linker = $(LINK)
162 else
163 chosen_linker = $(CXXLINK)
164 endif
165 endif
166 endif
168 @CODE_COVERAGE_RULES@
170 base_link_flags = $(AM_LDFLAGS) -lm -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
171 libharfbuzz_la_LINK = $(chosen_linker) $(libharfbuzz_la_LDFLAGS)
172 libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
173 libharfbuzz_la_CPPFLAGS = $(HBCFLAGS) $(CODE_COVERAGE_CFLAGS)
174 libharfbuzz_la_LDFLAGS = $(base_link_flags) $(export_symbols) $(CODE_COVERAGE_LDFLAGS)
175 libharfbuzz_la_LIBADD = $(HBLIBS)
176 EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency)
177 pkginclude_HEADERS = $(HBHEADERS)
178 nodist_pkginclude_HEADERS =
179 pkgconfigdir = $(libdir)/pkgconfig
180 pkgconfig_DATA = harfbuzz.pc
181 cmakedir = $(libdir)/cmake/harfbuzz
182 cmake_DATA = harfbuzz-config.cmake
183 EXTRA_DIST += hb-version.h.in hb-features.h.in harfbuzz.pc.in harfbuzz-config.cmake.in
185 lib_LTLIBRARIES += libharfbuzz-subset.la
186 libharfbuzz_subset_la_LINK = $(chosen_linker) $(libharfbuzz_subset_la_LDFLAGS)
187 libharfbuzz_subset_la_SOURCES = $(HB_SUBSET_sources)
188 libharfbuzz_subset_la_CPPFLAGS = $(HBCFLAGS) $(CODE_COVERAGE_CFLAGS)
189 libharfbuzz_subset_la_LDFLAGS = $(base_link_flags) $(export_symbols_subset) $(CODE_COVERAGE_LDFLAGS)
190 libharfbuzz_subset_la_LIBADD = libharfbuzz.la
191 EXTRA_libharfbuzz_subset_la_DEPENDENCIES = $(harfbuzz_subset_def_dependency)
192 pkginclude_HEADERS += $(HB_SUBSET_headers)
193 pkgconfig_DATA += harfbuzz-subset.pc
194 EXTRA_DIST += harfbuzz-subset.pc.in
196 harfbuzz-subset.cc: Makefile.sources
197         $(AM_V_GEN) \
198         LANG=C; \
199         for f in \
200                 $(HB_BASE_sources) \
201                 $(HB_SUBSET_sources) \
202                 ; do echo '#include "'$$f'"'; done | \
203         sort -u | \
204         grep '[.]cc"' > $(srcdir)/harfbuzz-subset.cc \
205         || ($(RM) $(srcdir)/harfbuzz-subset.cc; false)
206 BUILT_SOURCES += harfbuzz-subset.cc
208 lib_LTLIBRARIES += libharfbuzz-cairo.la
209 libharfbuzz_cairo_la_LINK = $(chosen_linker) $(libharfbuzz_cairo_la_LDFLAGS)
210 libharfbuzz_cairo_la_SOURCES = $(HB_CAIRO_sources)
211 libharfbuzz_cairo_la_CPPFLAGS = $(HBCFLAGS) $(CAIRO_CFLAGS) $(CODE_COVERAGE_CFLAGS)
212 libharfbuzz_cairo_la_LDFLAGS = $(base_link_flags) $(export_symbols_cairo) $(CODE_COVERAGE_LDFLAGS)
213 libharfbuzz_cairo_la_LIBADD = $(CAIRO_LIBS) libharfbuzz.la
214 EXTRA_libharfbuzz_cairo_la_DEPENDENCIES = $(harfbuzz_cairo_def_dependency)
215 pkginclude_HEADERS += $(HB_CAIRO_headers)
216 pkgconfig_DATA += harfbuzz-cairo.pc
217 EXTRA_DIST += harfbuzz-cairo.pc.in
219 if HAVE_ICU
220 if HAVE_ICU_BUILTIN
221 HBCFLAGS += $(ICU_CFLAGS)
222 HBLIBS += $(ICU_LIBS)
223 HBSOURCES += $(HB_ICU_sources)
224 HBHEADERS += $(HB_ICU_headers)
225 HB_HAS_ICU_DEF = define HB_HAS_ICU 1
226 else
227 lib_LTLIBRARIES += libharfbuzz-icu.la
228 libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources)
229 libharfbuzz_icu_la_CPPFLAGS = $(HBCFLAGS) $(ICU_CFLAGS) $(CODE_COVERAGE_CFLAGS)
230 libharfbuzz_icu_la_LDFLAGS = $(base_link_flags) $(export_symbols_icu) $(CODE_COVERAGE_LDFLAGS)
231 libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la
232 EXTRA_libharfbuzz_icu_la_DEPENDENCIES = $(harfbuzz_icu_def_dependency)
233 pkginclude_HEADERS += $(HB_ICU_headers)
234 pkgconfig_DATA += harfbuzz-icu.pc
235 HB_HAS_ICU_DEF = undef HB_HAS_ICU
236 endif
237 endif
238 EXTRA_DIST += harfbuzz-icu.pc.in
240 if HAVE_GOBJECT
241 lib_LTLIBRARIES += libharfbuzz-gobject.la
242 libharfbuzz_gobject_la_LINK = $(chosen_linker) $(libharfbuzz_gobject_la_LDFLAGS)
243 libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_DIST_sources)
244 nodist_libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_NODIST_sources)
245 libharfbuzz_gobject_la_CPPFLAGS = $(HBCFLAGS) $(GOBJECT_CFLAGS) $(CODE_COVERAGE_CFLAGS)
246 libharfbuzz_gobject_la_LDFLAGS = $(base_link_flags) $(CODE_COVERAGE_LDFLAGS)
247 libharfbuzz_gobject_la_LIBADD = $(GOBJECT_LIBS) libharfbuzz.la
248 EXTRA_libharfbuzz_gobject_la_DEPENDENCIES = $(harfbuzz_gobject_def_dependency)
249 pkginclude_HEADERS += $(HB_GOBJECT_DIST_headers)
250 nodist_pkginclude_HEADERS += $(HB_GOBJECT_NODIST_headers)
251 pkgconfig_DATA += harfbuzz-gobject.pc
253 BUILT_SOURCES += \
254         $(HB_GOBJECT_ENUM_sources) \
255         $(HB_GOBJECT_ENUM_headers) \
256         $(NULL)
257 DISTCLEANFILES += \
258         $(HB_GOBJECT_ENUM_sources) \
259         $(HB_GOBJECT_ENUM_headers) \
260         $(NULL)
261 hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS)
262         $(AM_V_GEN) PYTHONIOENCODING=UTF-8 $(GLIB_MKENUMS) \
263                 --identifier-prefix hb_ --symbol-prefix hb_gobject \
264                 --template $^ | \
265         sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \
266         || ($(RM) "$@"; false)
267 HB_HAS_GOBJECT_DEF = define HB_HAS_GOBJECT 1
268 else
269 HB_HAS_GOBJECT_DEF = undef HB_HAS_GOBJECT
270 endif
271 EXTRA_DIST += \
272         harfbuzz-gobject.pc.in \
273         hb-gobject-enums.cc.tmpl \
274         hb-gobject-enums.h.tmpl \
275         $(NULL)
278 BUILT_SOURCES += \
279         hb-features.h
280 DISTCLEANFILES += \
281         hb-features.h
283 hb-features.h: hb-features.h.in $(top_builddir)/config.status
284         $(AM_V_GEN) $(SED) \
285                 -e 's/mesondefine HB_HAS_CAIRO/$(HB_HAS_CAIRO_DEF)/' \
286                 -e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \
287                 -e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \
288                 -e 's/mesondefine HB_HAS_FREETYPE/$(HB_HAS_FREETYPE_DEF)/' \
289                 -e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \
290                 -e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \
291                 -e 's/mesondefine HB_HAS_GLIB/$(HB_HAS_GLIB_DEF)/' \
292                 -e 's/mesondefine HB_HAS_GOBJECT/$(HB_HAS_GOBJECT_DEF)/' \
293                 -e 's/mesondefine HB_HAS_GRAPHITE/$(HB_HAS_GRAPHITE_DEF)/' \
294                 -e 's/mesondefine HB_HAS_ICU/$(HB_HAS_ICU_DEF)/' \
295                 -e 's/mesondefine HB_HAS_UNISCRIBE/$(HB_HAS_UNISCRIBE_DEF)/' \
296                 -e 's/mesondefine HB_HAS_WASM/$(HB_HAS_WASM_DEF)/' \
297                 "$<" > "$@" || ($(RM) "$@"; false)
300 %.pc: %.pc.in $(top_builddir)/config.status
301         $(AM_V_GEN) \
302         $(SED)  -e 's@%prefix%@$(prefix)@g' \
303                 -e 's@%exec_prefix%@$(exec_prefix)@g' \
304                 -e 's@%libdir%@$(libdir)@g' \
305                 -e 's@%includedir%@$(includedir)@g' \
306                 -e 's@%libs_private%@$(HBNONPCLIBS)@g' \
307                 -e 's@%requires_private%@$(HBDEPS)@g' \
308                 -e 's@%VERSION%@$(VERSION)@g' \
309         "$<" > "$@" \
310         || ($(RM) "$@"; false)
312 CLEANFILES += $(pkgconfig_DATA)
315 DEF_FILES = harfbuzz.def harfbuzz-subset.def harfbuzz-icu.def harfbuzz-deprecated-symbols.txt
316 if HAVE_GOBJECT
317 DEF_FILES += harfbuzz-gobject.def
318 endif
319 check: $(DEF_FILES) # For check-symbols.sh
320 CLEANFILES += $(DEF_FILES)
321 harfbuzz.def: $(top_builddir)/config.status
322 harfbuzz.def: $(HBHEADERS)
323         $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^
324 harfbuzz-subset.def: $(HB_SUBSET_headers)
325         $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^
326 harfbuzz-cairo.def: $(HB_CAIRO_headers)
327         $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^
328 harfbuzz-icu.def: $(HB_ICU_headers)
329         $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^
330 harfbuzz-gobject.def: $(HB_GOBJECT_headers)
331         $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^
332 harfbuzz-deprecated-symbols.txt: $(srcdir)/hb-deprecated.h
333         $(AM_V_GEN) PLAIN_LIST=1 $(srcdir)/gen-def.py "$@" $^
336 GENERATORS = \
337         gen-arabic-joining-list.py \
338         gen-arabic-table.py \
339         gen-def.py \
340         gen-emoji-table.py \
341         gen-harfbuzzcc.py \
342         gen-hb-version.py \
343         gen-indic-table.py \
344         gen-os2-unicode-ranges.py \
345         gen-ragel-artifacts.py \
346         gen-tag-table.py \
347         gen-ucd-table.py \
348         gen-use-table.py \
349         gen-vowel-constraints.py \
350         $(NULL)
351 EXTRA_DIST += $(GENERATORS)
353 built-sources: $(BUILT_SOURCES)
355 .PHONY: built-sources
357 RAGEL_GENERATED = \
358         $(patsubst %,$(srcdir)/%,$(HB_BASE_RAGEL_GENERATED_sources)) \
359         $(NULL)
360 BUILT_SOURCES += $(RAGEL_GENERATED)
361 EXTRA_DIST += \
362         $(HB_BASE_RAGEL_sources) \
363         $(NULL)
364 # We decided to add ragel-generated files to git...
365 #MAINTAINERCLEANFILES += $(RAGEL_GENERATED)
366 $(srcdir)/%.hh: $(srcdir)/%.rl
367         $(AM_V_GEN)(cd $(srcdir) && $(RAGEL) -e -F1 -o "$*.hh" "$*.rl") \
368         || ($(RM) "$@"; false)
370 harfbuzz.cc: Makefile.sources
371         $(AM_V_GEN) \
372         LANG=C; \
373         for f in \
374                 $(HB_BASE_sources) \
375                 $(HB_GLIB_sources) \
376                 $(HB_FT_sources) \
377                 $(HB_GRAPHITE2_sources) \
378                 $(HB_UNISCRIBE_sources) \
379                 $(HB_GDI_sources) \
380                 $(HB_DIRECTWRITE_sources) \
381                 $(HB_CORETEXT_sources) \
382                 ; do echo '#include "'$$f'"'; done | \
383         sort -u | \
384         grep '[.]cc"' > $(srcdir)/harfbuzz.cc \
385         || ($(RM) $(srcdir)/harfbuzz.cc; false)
386 BUILT_SOURCES += harfbuzz.cc
388 noinst_PROGRAMS = \
389         main \
390         test \
391         test-buffer-serialize \
392         test-ot-meta \
393         test-ot-name \
394         test-ot-glyphname \
395         test-gpos-size-params \
396         test-gsub-get-alternates \
397         test-gsub-would-substitute \
398         test-use-table \
399         $(NULL)
400 bin_PROGRAMS =
402 main_SOURCES = main.cc
403 main_CPPFLAGS = $(HBCFLAGS)
404 main_LDADD = libharfbuzz.la $(HBLIBS)
406 test_SOURCES = test.cc
407 test_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
408 test_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
410 test_buffer_serialize_SOURCES = test-buffer-serialize.cc
411 test_buffer_serialize_CPPFLAGS = $(HBCFLAGS)
412 test_buffer_serialize_LDADD = libharfbuzz.la $(HBLIBS)
414 test_ot_meta_SOURCES = test-ot-meta.cc
415 test_ot_meta_CPPFLAGS = $(HBCFLAGS)
416 test_ot_meta_LDADD = libharfbuzz.la $(HBLIBS)
418 test_ot_name_SOURCES = test-ot-name.cc
419 test_ot_name_CPPFLAGS = $(HBCFLAGS)
420 test_ot_name_LDADD = libharfbuzz.la $(HBLIBS)
422 test_ot_glyphname_SOURCES = test-ot-glyphname.cc
423 test_ot_glyphname_CPPFLAGS = $(HBCFLAGS)
424 test_ot_glyphname_LDADD = libharfbuzz.la $(HBLIBS)
426 test_use_table_SOURCES = test-use-table.cc
427 test_use_table_CPPFLAGS = $(HBCFLAGS)
428 test_use_table_LDADD = libharfbuzz.la $(HBLIBS)
430 test_gpos_size_params_SOURCES = test-gpos-size-params.cc
431 test_gpos_size_params_CPPFLAGS = $(HBCFLAGS)
432 test_gpos_size_params_LDADD = libharfbuzz.la $(HBLIBS)
434 test_gsub_get_alternates_SOURCES = test-gsub-get-alternates.cc
435 test_gsub_get_alternates_CPPFLAGS = $(HBCFLAGS)
436 test_gsub_get_alternates_LDADD = libharfbuzz.la $(HBLIBS)
438 test_gsub_would_substitute_SOURCES = test-gsub-would-substitute.cc
439 test_gsub_would_substitute_CPPFLAGS = $(HBCFLAGS) $(FREETYPE_CFLAGS)
440 test_gsub_would_substitute_LDADD = libharfbuzz.la $(HBLIBS) $(FREETYPE_LIBS)
442 COMPILED_TESTS = \
443         test-algs \
444         test-array \
445         test-bimap \
446         test-iter \
447         test-machinery \
448         test-map \
449         test-multimap \
450         test-number \
451         test-ot-tag \
452         test-priority-queue \
453         test-set \
454         test-serialize \
455         test-unicode-ranges \
456         test-vector \
457         test-repacker \
458         test-classdef-graph \
459         test-instancer-solver \
460         test-tuple-varstore \
461         test-item-varstore \
462         $(NULL)
463 COMPILED_TESTS_CPPFLAGS = $(HBCFLAGS) -DMAIN -UNDEBUG
464 COMPILED_TESTS_LDADD = libharfbuzz.la $(HBLIBS)
465 check_PROGRAMS += $(COMPILED_TESTS)
466 TESTS += $(COMPILED_TESTS)
468 test_algs_SOURCES = test-algs.cc hb-static.cc
469 test_algs_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
470 test_algs_LDADD = $(COMPILED_TESTS_LDADD)
472 test_array_SOURCES = test-array.cc
473 test_array_CPPFLAGS = $(HBCFLAGS)
474 test_array_LDADD = libharfbuzz.la $(HBLIBS)
476 test_bimap_SOURCES = test-bimap.cc hb-static.cc
477 test_bimap_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
478 test_bimap_LDADD = $(COMPILED_TESTS_LDADD)
480 test_iter_SOURCES = test-iter.cc hb-static.cc
481 test_iter_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
482 test_iter_LDADD = $(COMPILED_TESTS_LDADD)
484 test_machinery_SOURCES = test-machinery.cc hb-static.cc
485 test_machinery_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
486 test_machinery_LDADD = $(COMPILED_TESTS_LDADD)
488 test_map_SOURCES = test-map.cc hb-static.cc
489 test_map_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
490 test_map_LDADD = $(COMPILED_TESTS_LDADD)
492 test_multimap_SOURCES = test-multimap.cc hb-static.cc
493 test_multimap_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
494 test_multimap_LDADD = $(COMPILED_TESTS_LDADD)
496 test_number_SOURCES = test-number.cc hb-number.cc
497 test_number_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
498 test_number_LDADD = $(COMPILED_TESTS_LDADD)
500 test_ot_tag_SOURCES = hb-ot-tag.cc
501 test_ot_tag_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
502 test_ot_tag_LDADD = $(COMPILED_TESTS_LDADD)
504 test_priority_queue_SOURCES = test-priority-queue.cc hb-static.cc
505 test_priority_queue_CPPFLAGS = $(HBCFLAGS)
506 test_priority_queue_LDADD = libharfbuzz.la $(HBLIBS)
508 test_repacker_SOURCES = test-repacker.cc hb-static.cc graph/gsubgpos-context.cc
509 test_repacker_CPPFLAGS = $(HBCFLAGS)
510 test_repacker_LDADD = libharfbuzz.la libharfbuzz-subset.la $(HBLIBS)
512 test_classdef_graph_SOURCES = graph/test-classdef-graph.cc hb-static.cc graph/gsubgpos-context.cc
513 test_classdef_graph_CPPFLAGS = $(HBCFLAGS)
514 test_classdef_graph_LDADD = libharfbuzz.la libharfbuzz-subset.la $(HBLIBS)
516 test_set_SOURCES = test-set.cc hb-static.cc
517 test_set_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
518 test_set_LDADD = $(COMPILED_TESTS_LDADD)
520 test_serialize_SOURCES = test-serialize.cc hb-static.cc
521 test_serialize_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
522 test_serialize_LDADD = $(COMPILED_TESTS_LDADD)
524 test_unicode_ranges_SOURCES = test-unicode-ranges.cc
525 test_unicode_ranges_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
526 test_unicode_ranges_LDADD = $(COMPILED_TESTS_LDADD)
528 test_vector_SOURCES = test-vector.cc hb-static.cc
529 test_vector_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
530 test_vector_LDADD = $(COMPILED_TESTS_LDADD)
532 test_instancer_solver_SOURCES = test-subset-instancer-solver.cc hb-subset-instancer-solver.cc hb-static.cc
533 test_instancer_solver_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
534 test_instancer_solver_LDADD = $(COMPILED_TESTS_LDADD)
536 test_tuple_varstore_SOURCES = test-tuple-varstore.cc hb-subset-instancer-solver.cc hb-static.cc
537 test_tuple_varstore_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
538 test_tuple_varstore_LDADD = $(COMPILED_TESTS_LDADD)
540 test_item_varstore_SOURCES = test-item-varstore.cc hb-subset-instancer-solver.cc hb-static.cc
541 test_item_varstore_CPPFLAGS = $(COMPILED_TESTS_CPPFLAGS)
542 test_item_varstore_LDADD = $(COMPILED_TESTS_LDADD)
544 dist_check_SCRIPTS = \
545         check-c-linkage-decls.py \
546         check-externs.py \
547         check-header-guards.py \
548         check-includes.py \
549         check-static-inits.py \
550         check-symbols.py \
551         $(NULL)
552 TESTS += $(dist_check_SCRIPTS)
554 if !WITH_LIBSTDCXX
555 dist_check_SCRIPTS += \
556         check-libstdc++.py \
557         $(NULL)
558 endif
560 TESTS_ENVIRONMENT = \
561         srcdir="$(srcdir)" \
562         base_srcdir="$(srcdir)" \
563         builddir="$(builddir)" \
564         MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
565         HBSOURCES="$(HBSOURCES)" \
566         HBHEADERS="$(HBHEADERS)" \
567         LDD="$(LDD)" \
568         NM="$(NM)" \
569         OBJDUMP="$(OBJDUMP)" \
570         OTOOL="$(OTOOL)" \
571         $(NULL)
573 if HAVE_INTROSPECTION
575 -include $(INTROSPECTION_MAKEFILE)
576 INTROSPECTION_GIRS = HarfBuzz-0.0.gir # What does the 0 mean anyway?!
577 INTROSPECTION_SCANNER_ARGS = \
578         -I$(srcdir) \
579         --warn-all --verbose \
580         --namespace=HarfBuzz \
581         --nsversion=0.0 \
582         --symbol-prefix=hb \
583         --symbol-prefix=hb_gobject \
584         --identifier-prefix=hb_ \
585         --pkg-export=harfbuzz-gobject \
586         --c-include=hb-gobject.h
587 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
588 INTROSPECTION_SCANNER_ENV = CC="$(CC)"
590 HarfBuzz-0.0.gir: libharfbuzz.la libharfbuzz-gobject.la
591 HarfBuzz_0_0_gir_INCLUDES = GObject-2.0 freetype2-2.0
592 HarfBuzz_0_0_gir_CFLAGS = \
593         $(INCLUDES) \
594         $(HBCFLAGS) \
595         -DHB_NO_SINGLE_HEADER_ERROR \
596         -DHAVE_GOBJECT \
597         -DHB_EXTERN= \
598         $(NULL)
599 HarfBuzz_0_0_gir_LIBS = \
600         libharfbuzz.la \
601         libharfbuzz-gobject.la \
602         $(NULL)
603 HarfBuzz_0_0_gir_FILES = \
604         $(HBHEADERS) \
605         $(HBSOURCES) \
606         $(HB_GOBJECT_sources) \
607         $(HB_GOBJECT_headers) \
608         $(NULL)
610 girdir = $(datadir)/gir-1.0
611 gir_DATA = $(INTROSPECTION_GIRS)
613 typelibdir = $(libdir)/girepository-1.0
614 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
616 CLEANFILES += $(gir_DATA) $(typelib_DATA)
618 endif
620 -include $(top_srcdir)/git.mk