[PATCH] osmo-mgw[master]: Turn libosmo-mgcp into local, non-installed library

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Sun Feb 4 18:58:09 UTC 2018


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/6270

to look at the new patch set (#2).

Turn libosmo-mgcp into local, non-installed library

This is an internal library simmilar to 'libmsc' in osmo-msc, which
we don't expect to be used by other programs except osmo-mgw.  Hence,
there's no need to install it as a shared library, which introduces
requirements about ABI/API stability and the like.

osmo-bsc_nat uses libosmo-legacy-mgcp, and once we should rewrite
osmo-bsc_nat, we might need some of the libosmo-mgcp related functions,
but at this point it's unclear what exactly would be needed and if
current libosmo-mgcp can provide that.  As needed, we can introduce
a related shared library at that point.

Change-Id: Iba0a2c9c694e360356ac2ca584e97795281c6198
---
M Makefile.am
M configure.ac
M debian/control
D debian/libosmo-mgcp-dev.install
D debian/libosmo-mgcp1.install
D libosmo-mgcp.pc.in
M src/libosmo-mgcp/Makefile.am
M src/osmo-mgw/Makefile.am
M tests/mgcp/Makefile.am
9 files changed, 11 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/70/6270/2

diff --git a/Makefile.am b/Makefile.am
index 7b9ef95..8fb6e6c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,6 @@
 pkgconfig_DATA = \
 	libosmo-legacy-mgcp.pc \
 	libosmo-mgcp-client.pc \
-	libosmo-mgcp.pc \
 	$(NULL)
 
 BUILT_SOURCES = $(top_srcdir)/.version
diff --git a/configure.ac b/configure.ac
index 606f404..859acd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,7 +132,6 @@
 AC_OUTPUT(
     libosmo-legacy-mgcp.pc
     libosmo-mgcp-client.pc
-    libosmo-mgcp.pc
     include/Makefile
     include/osmocom/Makefile
     include/osmocom/legacy_mgcp/Makefile
diff --git a/debian/control b/debian/control
index e96115f..383a35a 100644
--- a/debian/control
+++ b/debian/control
@@ -16,23 +16,8 @@
 Package: osmo-mgw
 Architecture: any
 Multi-Arch: foreign
-Depends: libosmo-mgcp1, ${misc:Depends}, ${shlibs:Depends}
-Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
-
-Package: libosmo-mgcp1
-Section: libs
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}, ${shlibs:Depends}
-Description: libosmo-mgcp: Osmocom's Media Gateway server library
-
-Package: libosmo-mgcp-dev
-Section: libdevel
-Architecture: any
-Multi-Arch: same
-Depends: libosmo-mgcp1 (= ${binary:Version}), ${misc:Depends}
-Description: libosmo-mgcp: Osmocom's Media Gateway server library
+Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
 
 Package: libosmo-mgcp-client2
 Section: libs
diff --git a/debian/libosmo-mgcp-dev.install b/debian/libosmo-mgcp-dev.install
deleted file mode 100644
index 5be9d24..0000000
--- a/debian/libosmo-mgcp-dev.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/include/osmocom/mgcp
-usr/lib/*/libosmo-mgcp.so
-usr/lib/*/libosmo-mgcp.a
-usr/lib/*/pkgconfig/libosmo-mgcp.pc
diff --git a/debian/libosmo-mgcp1.install b/debian/libosmo-mgcp1.install
deleted file mode 100644
index 7fe0a44..0000000
--- a/debian/libosmo-mgcp1.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/*/libosmo-mgcp.so.*
diff --git a/libosmo-mgcp.pc.in b/libosmo-mgcp.pc.in
deleted file mode 100644
index 63b794a..0000000
--- a/libosmo-mgcp.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Osmocom Media Gateway Control Protocol library
-Description: C Utility Library
-Version: @VERSION@
-Libs: -L${libdir} -losmo-mgcp
-Cflags: -I${includedir}/
diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am
index a785d62..4636a5c 100644
--- a/src/libosmo-mgcp/Makefile.am
+++ b/src/libosmo-mgcp/Makefile.am
@@ -21,19 +21,15 @@
 	$(COVERAGE_LDFLAGS) \
 	$(NULL)
 
-# This is not at all related to the release version, but a range of supported
-# API versions. Read TODO_RELEASE in the source tree's root!
-MGCP_LIBVERSION=1:0:0
-
-lib_LTLIBRARIES = \
-	libosmo-mgcp.la \
+noinst_LIBRARIES = \
+	libosmo-mgcp.a \
 	$(NULL)
 
 noinst_HEADERS = \
 	g711common.h \
 	$(NULL)
 
-libosmo_mgcp_la_SOURCES = \
+libosmo_mgcp_a_SOURCES = \
 	mgcp_protocol.c \
 	mgcp_network.c \
 	mgcp_vty.c \
@@ -44,5 +40,3 @@
 	mgcp_stat.c \
 	mgcp_ep.c \
 	$(NULL)
-
-libosmo_mgcp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(MGCP_LIBVERSION)
diff --git a/src/osmo-mgw/Makefile.am b/src/osmo-mgw/Makefile.am
index 3cbddf5..a076d4c 100644
--- a/src/osmo-mgw/Makefile.am
+++ b/src/osmo-mgw/Makefile.am
@@ -8,6 +8,7 @@
 	-Wall \
 	$(LIBOSMOCORE_CFLAGS) \
 	$(LIBOSMOVTY_CFLAGS) \
+	$(LIBOSMOGSM_CFLAGS) \
 	$(LIBOSMONETIF_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	$(NULL)
@@ -21,8 +22,9 @@
 	$(NULL)
 
 osmo_mgw_LDADD = \
-	$(top_builddir)/src/libosmo-mgcp/libosmo-mgcp.la \
+	$(top_builddir)/src/libosmo-mgcp/libosmo-mgcp.a \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
+	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMONETIF_LIBS) \
 	$(NULL)
diff --git a/tests/mgcp/Makefile.am b/tests/mgcp/Makefile.am
index caccb9f..df2b7c8 100644
--- a/tests/mgcp/Makefile.am
+++ b/tests/mgcp/Makefile.am
@@ -8,6 +8,8 @@
 	-Wall \
 	-ggdb3 \
 	$(LIBOSMOCORE_CFLAGS) \
+	$(LIBOSMOVTY_CFLAGS) \
+	$(LIBOSMOGSM_CFLAGS) \
 	$(LIBOSMONETIF_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	$(NULL)
@@ -29,9 +31,10 @@
 	$(NULL)
 
 mgcp_test_LDADD = \
-	$(top_builddir)/src/libosmo-mgcp/libosmo-mgcp.la \
+	$(top_builddir)/src/libosmo-mgcp/libosmo-mgcp.a \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
+	$(LIBOSMOGSM_LIBS) \
 	$(LIBRARY_DL) \
 	$(LIBOSMONETIF_LIBS) \
 	-lm  \

-- 
To view, visit https://gerrit.osmocom.org/6270
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iba0a2c9c694e360356ac2ca584e97795281c6198
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list