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