diff options
Diffstat (limited to 'telepathy-farstream/Makefile.am')
-rw-r--r-- | telepathy-farstream/Makefile.am | 87 |
1 files changed, 82 insertions, 5 deletions
diff --git a/telepathy-farstream/Makefile.am b/telepathy-farstream/Makefile.am index 06d3392aa..abe4e333c 100644 --- a/telepathy-farstream/Makefile.am +++ b/telepathy-farstream/Makefile.am @@ -8,7 +8,7 @@ apisources = \ content.c \ channel.c -libtelepathy_farstream_1_la_SOURCES = \ +libtelepathy_farstream_internal_la_SOURCES = \ $(tfinclude_HEADERS) \ $(apisources) \ content-priv.h \ @@ -22,9 +22,10 @@ libtelepathy_farstream_1_la_SOURCES = \ call-priv.h \ utils.h -nodist_libtelepathy_farstream_1_la_SOURCES = $(BUILT_SOURCES) +nodist_libtelepathy_farstream_internal_la_SOURCES = $(BUILT_SOURCES) lib_LTLIBRARIES = libtelepathy-farstream-1.la +noinst_LTLIBRARIES = libtelepathy-farstream-internal.la pkgconfigdir = ${libdir}/pkgconfig pkgconfig_DATA = telepathy-farstream-1.pc @@ -42,7 +43,7 @@ AM_CFLAGS = \ -DG_LOG_DOMAIN=\"tp-fs\" \ $(ERROR_CFLAGS) -libtelepathy_farstream_1_la_LIBADD = \ +libtelepathy_farstream_internal_la_LIBADD = \ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \ @@ -52,10 +53,86 @@ libtelepathy_farstream_1_la_LIBADD = \ $(FARSTREAM_LIBS) \ $(NULL) -libtelepathy_farstream_1_la_LDFLAGS = -no-undefined \ - -export-symbols-regex "^tf_(init|content_|channel_).*" \ +libtelepathy_farstream_internal_la_LDFLAGS = \ + -no-undefined \ + $(NULL) + +libtelepathy_farstream_1_la_SOURCES = +nodist_libtelepathy_farstream_1_la_SOURCES = +libtelepathy_farstream_1_la_LIBADD = libtelepathy-farstream-internal.la +libtelepathy_farstream_1_la_LDFLAGS = \ -version-info "$(TPFS_LT_CURRENT)":"$(TPFS_LT_REVISION)":"$(TPFS_LT_AGE)" +libtelepathy_farstream_1_la_DEPENDENCIES = \ + libtelepathy-farstream-internal.la \ + Makefile.am \ + $(NULL) + +if HAVE_LD_VERSION_SCRIPT + +libtelepathy_farstream_1_la_LDFLAGS += \ + $(VERSION_SCRIPT_ARG)=_gen/version-script.txt \ + $(NULL) + +libtelepathy_farstream_1_la_DEPENDENCIES += \ + _gen/version-script.txt \ + $(NULL) + +else + +libtelepathy_farstream_1_la_LDFLAGS += + -export-symbols-regex "^tf_.*" \ + $(NULL) + +endif + +# Must put oldest versions first +ABI_LISTS = \ + 1.0.abi \ + $(NULL) + +_gen/abi.txt: libtelepathy-farstream-internal.la Makefile.am + $(MKDIR_P) _gen + $(NM) .libs/libtelepathy-farstream-internal.a > _gen/abi.nm + grep " [DT] " < _gen/abi.nm > _gen/abi.funcs + cut -d" " -f3 < _gen/abi.funcs > _gen/abi.funcnames + grep "^tf_" < _gen/abi.funcnames > _gen/abi.tpfuncnames + $(AM_V_GEN)sort -u < _gen/abi.tpfuncnames > $@ + +MAKE_VERSION_SCRIPT_FLAGS = + +if !OFFICIAL_RELEASE +# allow new ABI, and silently put it in a dummy version (which can be used to +# check whether binaries have been linked against unguaranteed ABI) +MAKE_VERSION_SCRIPT_FLAGS += \ + --unreleased-version=TELEPATHY_FARSTREAM_@VERSION@_UNRELEASED \ + $(NULL) +endif + +_gen/version-script.txt: \ + $(ABI_LISTS) \ + _gen/abi.txt \ + Makefile.am \ + $(top_srcdir)/tools/make-version-script.py \ + $(NULL) + $(AM_V_GEN)set -e; \ + $(PYTHON) $(top_srcdir)/tools/make-version-script.py \ + --symbols=_gen/abi.txt $(MAKE_VERSION_SCRIPT_FLAGS) \ + $(patsubst %,$(srcdir)/%,$(ABI_LISTS)) > $@ + $(AM_V_GEN)set -e; \ + $(PYTHON) $(top_srcdir)/tools/make-version-script.py \ + --symbols=_gen/abi.txt $(MAKE_VERSION_SCRIPT_FLAGS) \ + --dpkg "libtelepathy-farstream-1.so.0 #PACKAGE# #MINVER#" \ + --dpkg-build-depends-package "libtelepathy-farstream-1-dev" \ + $(patsubst %,$(srcdir)/%,$(ABI_LISTS)) \ + > _gen/libtelepathy-farstream-1-0.symbols + sed -n -e "s/^[ ]*\\(tf_.*\\);/\\1/p" < $@ > _gen/versioned-abi.tmp + sort -u < _gen/versioned-abi.tmp > _gen/versioned-abi.txt + : # the versioned API should always match the ^tp API + diff -c _gen/versioned-abi.txt _gen/abi.txt + +# vim:ft=automake: + -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = INTROSPECTION_SCANNER_ARGS = \ |