Change in osmo-sysmon[master]: Build shared source as conveniency 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
Mon Jan 28 23:05:17 UTC 2019


Max has uploaded this change for review. ( https://gerrit.osmocom.org/12711


Change subject: Build shared source as conveniency library
......................................................................

Build shared source as conveniency library

The simple_ctrl.c is used by 2 independent binaries. Let's build it as a
convenience libtool library [1] to make it easier to add further
external dependencies in future.

[1] https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html

Change-Id: Idfaba17b54983709278e1c24bf55edbbb4abd961
---
M .gitignore
M src/Makefile.am
2 files changed, 6 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sysmon refs/changes/11/12711/1

diff --git a/.gitignore b/.gitignore
index c89e9b0..e68f4e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,3 +59,4 @@
 tests/testsuite.log
 
 writtenconfig/
+/src/libctrl.la
diff --git a/src/Makefile.am b/src/Makefile.am
index 412337b..ed0f3a0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
+LDADD = libctrl.la $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
 
 AM_CPPFLAGS = \
 	$(all_includes) \
@@ -22,6 +22,10 @@
 	osmo-ctrl-client \
 	$(NULL)
 
+noinst_LTLIBRARIES = libctrl.la
+libctrl_la_SOURCES = simple_ctrl.c
+libctrl_la_LIBADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
+
 osmo_sysmon_LDADD = $(LDADD) \
 	$(LIBOSMOVTY_LIBS) \
 	$(LIBMNL_LIBS) \
@@ -29,7 +33,6 @@
 
 osmo_sysmon_SOURCES = \
 	value_node.c \
-	simple_ctrl.c \
 	osysmon_ctrl.c \
 	osysmon_sysinfo.c \
 	osysmon_rtnl.c \
@@ -37,11 +40,6 @@
 	osysmon_main.c \
 	$(NULL)
 
-osmo_ctrl_client_SOURCES = \
-	simple_ctrl.c \
-	osmo-ctrl-client.c \
-	$(NULL)
-
 noinst_HEADERS = \
 	osysmon.h \
 	simple_ctrl.h \

-- 
To view, visit https://gerrit.osmocom.org/12711
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sysmon
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfaba17b54983709278e1c24bf55edbbb4abd961
Gerrit-Change-Number: 12711
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190128/b9b4885e/attachment.htm>


More information about the gerrit-log mailing list