build: Move source listings into separate Makefile snippets

This moves all the source listings in src/Makefile.am,
src/hb-ucdn/Makefile.am and util/Makefile.am into separate Makefile
snippets, so that they may be shared between different Makefile-based
build systems, such as NMake for Visual Studio.
This commit is contained in:
Chun-wei Fan 2015-11-03 16:56:27 +08:00
parent b894a85ad1
commit 35ded3af74
6 changed files with 223 additions and 165 deletions

View File

@ -1,6 +1,5 @@
# Process this file with automake to produce Makefile.in
NULL =
SUBDIRS =
DIST_SUBDIRS =
BUILT_SOURCES =
@ -19,121 +18,23 @@ fuzzing: $(BUILT_SOURCES) libharfbuzz-fuzzing.la
lib_LTLIBRARIES = libharfbuzz.la
include Makefile.sources
HBCFLAGS =
HBLIBS =
HBNONPCLIBS =
HBDEPS =
HBSOURCES = \
hb-atomic-private.hh \
hb-blob.cc \
hb-buffer-deserialize-json.hh \
hb-buffer-deserialize-text.hh \
hb-buffer-private.hh \
hb-buffer-serialize.cc \
hb-buffer.cc \
hb-cache-private.hh \
hb-common.cc \
hb-face-private.hh \
hb-face.cc \
hb-font-private.hh \
hb-font.cc \
hb-mutex-private.hh \
hb-object-private.hh \
hb-open-file-private.hh \
hb-open-type-private.hh \
hb-ot-cmap-table.hh \
hb-ot-glyf-table.hh \
hb-ot-head-table.hh \
hb-ot-hhea-table.hh \
hb-ot-hmtx-table.hh \
hb-ot-maxp-table.hh \
hb-ot-name-table.hh \
hb-ot-os2-table.hh \
hb-ot-tag.cc \
hb-private.hh \
hb-set-private.hh \
hb-set.cc \
hb-shape.cc \
hb-shape-plan-private.hh \
hb-shape-plan.cc \
hb-shaper-list.hh \
hb-shaper-impl-private.hh \
hb-shaper-private.hh \
hb-shaper.cc \
hb-unicode-private.hh \
hb-unicode.cc \
hb-utf-private.hh \
hb-warning.cc \
$(NULL)
HBHEADERS = \
hb.h \
hb-blob.h \
hb-buffer.h \
hb-common.h \
hb-deprecated.h \
hb-face.h \
hb-font.h \
hb-set.h \
hb-shape.h \
hb-shape-plan.h \
hb-unicode.h \
$(NULL)
HBNODISTHEADERS = \
hb-version.h \
$(NULL)
HBSOURCES = $(HB_BASE_sources)
HBHEADERS = $(HB_BASE_headers)
HBNODISTHEADERS = $(HB_NODIST_headers)
if HAVE_OT
HBSOURCES += \
hb-ot-font.cc \
hb-ot-layout.cc \
hb-ot-layout-common-private.hh \
hb-ot-layout-gdef-table.hh \
hb-ot-layout-gpos-table.hh \
hb-ot-layout-gsubgpos-private.hh \
hb-ot-layout-gsub-table.hh \
hb-ot-layout-jstf-table.hh \
hb-ot-layout-private.hh \
hb-ot-map.cc \
hb-ot-map-private.hh \
hb-ot-shape.cc \
hb-ot-shape-complex-arabic.cc \
hb-ot-shape-complex-arabic-fallback.hh \
hb-ot-shape-complex-arabic-private.hh \
hb-ot-shape-complex-arabic-table.hh \
hb-ot-shape-complex-arabic-win1256.hh \
hb-ot-shape-complex-default.cc \
hb-ot-shape-complex-hangul.cc \
hb-ot-shape-complex-hebrew.cc \
hb-ot-shape-complex-indic.cc \
hb-ot-shape-complex-indic-machine.hh \
hb-ot-shape-complex-indic-private.hh \
hb-ot-shape-complex-indic-table.cc \
hb-ot-shape-complex-myanmar.cc \
hb-ot-shape-complex-myanmar-machine.hh \
hb-ot-shape-complex-thai.cc \
hb-ot-shape-complex-tibetan.cc \
hb-ot-shape-complex-use.cc \
hb-ot-shape-complex-use-machine.hh \
hb-ot-shape-complex-use-private.hh \
hb-ot-shape-complex-use-table.cc \
hb-ot-shape-complex-private.hh \
hb-ot-shape-normalize-private.hh \
hb-ot-shape-normalize.cc \
hb-ot-shape-fallback-private.hh \
hb-ot-shape-fallback.cc \
hb-ot-shape-private.hh \
$(NULL)
HBHEADERS += \
hb-ot.h \
hb-ot-font.h \
hb-ot-layout.h \
hb-ot-shape.h \
hb-ot-tag.h \
$(NULL)
HBSOURCES += $(HB_OT_sources)
HBHEADERS += $(HB_OT_headers)
endif
if HAVE_FALLBACK
HBSOURCES += hb-fallback-shape.cc
HBSOURCES += $(HB_FALLBACK_sources)
endif
if HAVE_PTHREAD
@ -145,8 +46,8 @@ if HAVE_GLIB
HBCFLAGS += $(GLIB_CFLAGS)
HBLIBS += $(GLIB_LIBS)
HBDEPS += $(GLIB_DEPS)
HBSOURCES += hb-glib.cc
HBHEADERS += hb-glib.h
HBSOURCES += $(HB_GLIB_sources)
HBHEADERS += $(HB_GLIB_headers)
endif
if HAVE_FREETYPE
@ -158,37 +59,37 @@ HBLIBS += $(FREETYPE_LIBS)
# fine but pkg-config 0.26 as shipped in Ubuntu 14.04 crashes. Remove
# in a year or two, or otherwise work around it...
#HBDEPS += $(FREETYPE_DEPS)
HBSOURCES += hb-ft.cc
HBHEADERS += hb-ft.h
HBSOURCES += $(HB_FT_sources)
HBHEADERS += $(HB_FT_headers)
endif
if HAVE_GRAPHITE2
HBCFLAGS += $(GRAPHITE2_CFLAGS)
HBLIBS += $(GRAPHITE2_LIBS)
HBDEPS += $(GRAPHITE2_DEPS)
HBSOURCES += hb-graphite2.cc
HBHEADERS += hb-graphite2.h
HBSOURCES += $(HB_GRAPHITE2_sources)
HBHEADERS += $(HB_GRAPHITE2_headers)
endif
if HAVE_UNISCRIBE
HBCFLAGS += $(UNISCRIBE_CFLAGS)
HBNONPCLIBS += $(UNISCRIBE_LIBS)
HBSOURCES += hb-uniscribe.cc
HBHEADERS += hb-uniscribe.h
HBSOURCES += $(HB_UNISCRIBE_sources)
HBHEADERS += $(HB_UNISCRIBE_headers)
endif
if HAVE_CORETEXT
HBCFLAGS += $(CORETEXT_CFLAGS)
HBNONPCLIBS += $(CORETEXT_LIBS)
HBSOURCES += hb-coretext.cc
HBHEADERS += hb-coretext.h
HBSOURCES += $(HB_CORETEXT_sources)
HBHEADERS += $(HB_CORETEXT_headers)
endif
if HAVE_UCDN
SUBDIRS += hb-ucdn
HBCFLAGS += -I$(srcdir)/hb-ucdn
HBLIBS += hb-ucdn/libhb-ucdn.la
HBSOURCES += hb-ucdn.cc
HBSOURCES += $(HB_UCDN_sources)
endif
DIST_SUBDIRS += hb-ucdn
@ -239,33 +140,33 @@ CLEANFILES += libharfbuzz-fuzzing.la
if HAVE_ICU
lib_LTLIBRARIES += libharfbuzz-icu.la
libharfbuzz_icu_la_SOURCES = hb-icu.cc
libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources)
libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS)
libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la
pkginclude_HEADERS += hb-icu.h
pkginclude_HEADERS += $(HB_ICU_headers)
pkgconfig_DATA += harfbuzz-icu.pc
endif
EXTRA_DIST += harfbuzz-icu.pc.in
if HAVE_GOBJECT
lib_LTLIBRARIES += libharfbuzz-gobject.la
libharfbuzz_gobject_la_SOURCES = hb-gobject-structs.cc
nodist_libharfbuzz_gobject_la_SOURCES = hb-gobject-enums.cc
libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_sources)
nodist_libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_ENUM_sources)
libharfbuzz_gobject_la_CPPFLAGS = $(GOBJECT_CFLAGS)
libharfbuzz_gobject_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
libharfbuzz_gobject_la_LIBADD = $(GOBJECT_LIBS) libharfbuzz.la
pkginclude_HEADERS += hb-gobject.h hb-gobject-structs.h
nodist_pkginclude_HEADERS += hb-gobject-enums.h
pkginclude_HEADERS += $(HB_GOBJECT_headers)
nodist_pkginclude_HEADERS += $(HB_GOBJECT_ENUM_headers)
pkgconfig_DATA += harfbuzz-gobject.pc
BUILT_SOURCES += \
hb-gobject-enums.cc \
hb-gobject-enums.h \
$(HB_GOBJECT_ENUM_sources) \
$(HB_GOBJECT_ENUM_headers) \
$(NULL)
DISTCLEANFILES += \
hb-gobject-enums.cc \
hb-gobject-enums.h \
$(HB_GOBJECT_ENUM_sources) \
$(HB_GOBJECT_ENUM_headers) \
$(NULL)
hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS)
$(AM_V_GEN) $(GLIB_MKENUMS) \
@ -437,10 +338,10 @@ HarfBuzz_0_0_gir_FILES = \
$(HBHEADERS) \
$(HBNODISTHEADERS) \
$(HBSOURCES) \
hb-gobject-enums.cc \
hb-gobject-enums.h \
hb-gobject-structs.cc \
hb-gobject-structs.h \
$(HB_GOBJECT_ENUM_sources) \
$(HB_GOBJECT_ENUM_headers) \
$(HB_GOBJECT_sources) \
$(HB_GOBJECT_STRUCTS_headers) \
$(NULL)
girdir = $(datadir)/gir-1.0

147
src/Makefile.sources Normal file
View File

@ -0,0 +1,147 @@
NULL =
# Base and default-included sources and headers
HB_BASE_sources = \
hb-atomic-private.hh \
hb-blob.cc \
hb-buffer-deserialize-json.hh \
hb-buffer-deserialize-text.hh \
hb-buffer-private.hh \
hb-buffer-serialize.cc \
hb-buffer.cc \
hb-cache-private.hh \
hb-common.cc \
hb-face-private.hh \
hb-face.cc \
hb-font-private.hh \
hb-font.cc \
hb-mutex-private.hh \
hb-object-private.hh \
hb-open-file-private.hh \
hb-open-type-private.hh \
hb-ot-cmap-table.hh \
hb-ot-glyf-table.hh \
hb-ot-head-table.hh \
hb-ot-hhea-table.hh \
hb-ot-hmtx-table.hh \
hb-ot-maxp-table.hh \
hb-ot-name-table.hh \
hb-ot-os2-table.hh \
hb-ot-tag.cc \
hb-private.hh \
hb-set-private.hh \
hb-set.cc \
hb-shape.cc \
hb-shape-plan-private.hh \
hb-shape-plan.cc \
hb-shaper-list.hh \
hb-shaper-impl-private.hh \
hb-shaper-private.hh \
hb-shaper.cc \
hb-unicode-private.hh \
hb-unicode.cc \
hb-utf-private.hh \
hb-warning.cc \
$(NULL)
HB_BASE_headers = \
hb.h \
hb-blob.h \
hb-buffer.h \
hb-common.h \
hb-deprecated.h \
hb-face.h \
hb-font.h \
hb-set.h \
hb-shape.h \
hb-shape-plan.h \
hb-unicode.h \
$(NULL)
HB_NODIST_headers = \
hb-version.h \
$(NULL)
HB_FALLBACK_sources = hb-fallback-shape.cc
HB_OT_sources = \
hb-ot-font.cc \
hb-ot-layout.cc \
hb-ot-layout-common-private.hh \
hb-ot-layout-gdef-table.hh \
hb-ot-layout-gpos-table.hh \
hb-ot-layout-gsubgpos-private.hh \
hb-ot-layout-gsub-table.hh \
hb-ot-layout-jstf-table.hh \
hb-ot-layout-private.hh \
hb-ot-map.cc \
hb-ot-map-private.hh \
hb-ot-shape.cc \
hb-ot-shape-complex-arabic.cc \
hb-ot-shape-complex-arabic-fallback.hh \
hb-ot-shape-complex-arabic-private.hh \
hb-ot-shape-complex-arabic-table.hh \
hb-ot-shape-complex-arabic-win1256.hh \
hb-ot-shape-complex-default.cc \
hb-ot-shape-complex-hangul.cc \
hb-ot-shape-complex-hebrew.cc \
hb-ot-shape-complex-indic.cc \
hb-ot-shape-complex-indic-machine.hh \
hb-ot-shape-complex-indic-private.hh \
hb-ot-shape-complex-indic-table.cc \
hb-ot-shape-complex-myanmar.cc \
hb-ot-shape-complex-myanmar-machine.hh \
hb-ot-shape-complex-thai.cc \
hb-ot-shape-complex-tibetan.cc \
hb-ot-shape-complex-use.cc \
hb-ot-shape-complex-use-machine.hh \
hb-ot-shape-complex-use-private.hh \
hb-ot-shape-complex-use-table.cc \
hb-ot-shape-complex-private.hh \
hb-ot-shape-normalize-private.hh \
hb-ot-shape-normalize.cc \
hb-ot-shape-fallback-private.hh \
hb-ot-shape-fallback.cc \
hb-ot-shape-private.hh \
$(NULL)
HB_OT_headers = \
hb-ot.h \
hb-ot-font.h \
hb-ot-layout.h \
hb-ot-shape.h \
hb-ot-tag.h \
$(NULL)
# Optional Sources and Headers with external deps
HB_FT_sources = hb-ft.cc
HB_FT_headers = hb-ft.h
HB_GLIB_sources = hb-glib.cc
HB_GLIB_headers = hb-glib.h
HB_GRAPHITE2_sources = hb-graphite2.cc
HB_GRAPHITE2_headers = hb-graphite2.h
# System-dependent sources and headers
HB_CORETEXT_sources = hb-coretext.cc
HB_CORETEXT_headers = hb-coretext.h
HB_UNISCRIBE_sources = hb-uniscribe.cc
HB_UNISCRIBE_headers = hb-uniscribe.h
# Additional supplemental sources
HB_UCDN_sources = hb-ucdn.cc
# Sources for libharfbuzz-gobject and libharfbuzz-icu
HB_ICU_sources = hb-icu.cc
HB_ICU_headers = hb-icu.h
HB_GOBJECT_sources = hb-gobject-structs.cc
HB_GOBJECT_STRUCTS_headers = hb-gobject-structs.h
HB_GOBJECT_headers = hb-gobject.h $(HB_GOBJECT_STRUCTS_headers)
HB_GOBJECT_ENUM_sources = hb-gobject-enums.cc
HB_GOBJECT_ENUM_headers = hb-gobject-enums.h

View File

@ -2,11 +2,9 @@
noinst_LTLIBRARIES = libhb-ucdn.la
include Makefile.sources
libhb_ucdn_la_SOURCES = \
ucdn.h \
ucdn.c \
unicodedata_db.h
libhb_ucdn_la_SOURCES = $(LIBHB_UCDN_sources)
libhb_ucdn_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/src \

View File

@ -0,0 +1,4 @@
LIBHB_UCDN_sources = \
ucdn.h \
ucdn.c \
unicodedata_db.h

View File

@ -1,11 +1,12 @@
# Process this file with automake to produce Makefile.in
NULL =
EXTRA_DIST =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
include Makefile.sources
# Convenience targets:
lib:
@$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src lib
@ -31,21 +32,7 @@ if HAVE_GLIB
if HAVE_FREETYPE
if HAVE_CAIRO_FT
hb_view_SOURCES = \
hb-view.cc \
options.cc \
options.hh \
main-font-text.hh \
shape-consumer.hh \
ansi-print.cc \
ansi-print.hh \
helper-cairo.cc \
helper-cairo.hh \
helper-cairo-ansi.cc \
helper-cairo-ansi.hh \
view-cairo.cc \
view-cairo.hh \
$(NULL)
hb_view_SOURCES = $(HB_VIEW_sources)
hb_view_LDADD = \
$(LDADD) \
$(CAIRO_LIBS) \
@ -55,22 +42,11 @@ bin_PROGRAMS += hb-view
endif # HAVE_CAIRO_FT
endif # HAVE_FREETYPE
hb_shape_SOURCES = \
hb-shape.cc \
options.cc \
options.hh \
main-font-text.hh \
shape-consumer.hh \
$(NULL)
hb_shape_SOURCES = $(HB_SHAPE_sources)
bin_PROGRAMS += hb-shape
if HAVE_OT
hb_ot_shape_closure_SOURCES = \
hb-ot-shape-closure.cc \
options.cc \
options.hh \
main-font-text.hh \
$(NULL)
hb_ot_shape_closure_SOURCES = $(HB_OT_SHAPE_CLOSURE_sources)
bin_PROGRAMS += hb-ot-shape-closure
endif # HAVE_OT

32
util/Makefile.sources Normal file
View File

@ -0,0 +1,32 @@
NULL =
HB_VIEW_sources = \
hb-view.cc \
options.cc \
options.hh \
main-font-text.hh \
shape-consumer.hh \
ansi-print.cc \
ansi-print.hh \
helper-cairo.cc \
helper-cairo.hh \
helper-cairo-ansi.cc \
helper-cairo-ansi.hh \
view-cairo.cc \
view-cairo.hh \
$(NULL)
HB_SHAPE_sources = \
hb-shape.cc \
options.cc \
options.hh \
main-font-text.hh \
shape-consumer.hh \
$(NULL)
HB_OT_SHAPE_CLOSURE_sources = \
hb-ot-shape-closure.cc \
options.cc \
options.hh \
main-font-text.hh \
$(NULL)