From fa2280f5180a9b7081adbc4166be6e1bdc997c2f Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 16 Jul 2013 09:32:46 +0200 Subject: [PATCH] build: filter out non public symbols --- libmbim-glib/Makefile.am | 20 +++++++++++++------- libmbim-glib/generated/Makefile.am | 2 +- libmbim-glib/test/Makefile.am | 18 ++++++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/libmbim-glib/Makefile.am b/libmbim-glib/Makefile.am index 01ccc76..d4898a5 100644 --- a/libmbim-glib/Makefile.am +++ b/libmbim-glib/Makefile.am @@ -1,9 +1,9 @@ SUBDIRS = generated . test -lib_LTLIBRARIES = libmbim-glib.la - -libmbim_glib_la_CPPFLAGS = \ +# Core library, built as a noinst +noinst_LTLIBRARIES = libmbim-glib-core.la +libmbim_glib_core_la_CPPFLAGS = \ $(LIBMBIM_GLIB_CFLAGS) \ -I$(top_srcdir) \ -I$(top_builddir) \ @@ -13,9 +13,7 @@ libmbim_glib_la_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib/generated \ -DLIBMBIM_GLIB_COMPILATION \ -DG_LOG_DOMAIN=\"Mbim\" - -libmbim_glib_la_SOURCES = \ - libmbim-glib.h \ +libmbim_glib_core_la_SOURCES = \ mbim-version.h \ mbim-errors.h \ mbim-enums.h \ @@ -25,12 +23,20 @@ libmbim_glib_la_SOURCES = \ mbim-message-private.h mbim-message.h mbim-message.c \ mbim-device.h mbim-device.c +# Final installable library +lib_LTLIBRARIES = libmbim-glib.la + +libmbim_glib_la_SOURCES = \ + libmbim-glib.h + libmbim_glib_la_LIBADD = \ + libmbim-glib-core.la \ ${top_builddir}/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) libmbim_glib_la_LDFLAGS = \ - -version-info $(MBIM_GLIB_LT_CURRENT):$(MBIM_GLIB_LT_REVISION):$(MBIM_GLIB_LT_AGE) + -version-info $(MBIM_GLIB_LT_CURRENT):$(MBIM_GLIB_LT_REVISION):$(MBIM_GLIB_LT_AGE) \ + -export-symbols-regex '^mbim_.*' includedir = @includedir@/libmbim-glib include_HEADERS = \ diff --git a/libmbim-glib/generated/Makefile.am b/libmbim-glib/generated/Makefile.am index fd5876a..8f9f777 100644 --- a/libmbim-glib/generated/Makefile.am +++ b/libmbim-glib/generated/Makefile.am @@ -136,7 +136,7 @@ mbim-dss.h mbim-dss.c mbim-dss.sections: $(top_srcdir)/data/mbim-service-dss.jso BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C) -nodist_libmbim_glib_generated_la_SOURCES = \ +libmbim_glib_generated_la_SOURCES = \ $(GENERATED_H) \ $(GENERATED_C) diff --git a/libmbim-glib/test/Makefile.am b/libmbim-glib/test/Makefile.am index 4177491..4bc4e88 100644 --- a/libmbim-glib/test/Makefile.am +++ b/libmbim-glib/test/Makefile.am @@ -20,7 +20,8 @@ test_uuid_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib \ -DLIBMBIM_GLIB_COMPILATION test_uuid_LDADD = \ - $(top_builddir)/libmbim-glib/libmbim-glib.la \ + $(top_builddir)/libmbim-glib/libmbim-glib-core.la \ + $(top_builddir)/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) test_cid_SOURCES = \ @@ -32,7 +33,8 @@ test_cid_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib \ -DLIBMBIM_GLIB_COMPILATION test_cid_LDADD = \ - $(top_builddir)/libmbim-glib/libmbim-glib.la \ + $(top_builddir)/libmbim-glib/libmbim-glib-core.la \ + $(top_builddir)/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) test_message_SOURCES = \ @@ -44,7 +46,8 @@ test_message_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib \ -DLIBMBIM_GLIB_COMPILATION test_message_LDADD = \ - $(top_builddir)/libmbim-glib/libmbim-glib.la \ + $(top_builddir)/libmbim-glib/libmbim-glib-core.la \ + $(top_builddir)/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) test_fragment_SOURCES = \ @@ -56,7 +59,8 @@ test_fragment_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib \ -DLIBMBIM_GLIB_COMPILATION test_fragment_LDADD = \ - $(top_builddir)/libmbim-glib/libmbim-glib.la \ + $(top_builddir)/libmbim-glib/libmbim-glib-core.la \ + $(top_builddir)/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) test_message_parser_SOURCES = \ @@ -69,7 +73,8 @@ test_message_parser_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib/generated \ -DLIBMBIM_GLIB_COMPILATION test_message_parser_LDADD = \ - $(top_builddir)/libmbim-glib/libmbim-glib.la \ + $(top_builddir)/libmbim-glib/libmbim-glib-core.la \ + $(top_builddir)/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) test_message_builder_SOURCES = \ @@ -82,5 +87,6 @@ test_message_builder_CPPFLAGS = \ -I$(top_builddir)/libmbim-glib/generated \ -DLIBMBIM_GLIB_COMPILATION test_message_builder_LDADD = \ - $(top_builddir)/libmbim-glib/libmbim-glib.la \ + $(top_builddir)/libmbim-glib/libmbim-glib-core.la \ + $(top_builddir)/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) -- 1.8.3.1