Change in osmo-bsc[master]: Build BTS related code in a library

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Mar 12 20:39:14 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13225


Change subject: Build BTS related code in a library
......................................................................

Build BTS related code in a library

It will allow build ipaccess util tools and so without building whole
osmo-bsc (and requiring its extra deps).

Change-Id: I30bf10660f4710523ca7bdde1b392a8c2b334b23
---
M src/ipaccess/Makefile.am
M src/osmo-bsc/Makefile.am
M src/utils/Makefile.am
M tests/abis/Makefile.am
M tests/bsc/Makefile.am
M tests/codec_pref/Makefile.am
M tests/gsm0408/Makefile.am
M tests/handover/Makefile.am
M tests/nanobts_omlattr/Makefile.am
M tests/subscr/Makefile.am
10 files changed, 94 insertions(+), 93 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/25/13225/1

diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index 3578a40..3964e00 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -44,14 +44,8 @@
 	stubs.c \
 	$(NULL)
 
-# FIXME: resolve the bogus dependencies patched around here:
 ipaccess_config_LDADD = \
-	$(top_builddir)/src/osmo-bsc/abis_nm.o \
-	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
-	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
-	$(top_builddir)/src/osmo-bsc/net_init.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(OSMO_LIBS) \
 	$(NULL)
 
@@ -62,6 +56,6 @@
 	$(NULL)
 
 ipaccess_proxy_LDADD = \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(OSMO_LIBS) \
 	$(NULL)
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 364228d..0fabe51 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -13,18 +13,53 @@
 	$(LIBOSMONETIF_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	$(LIBOSMOABIS_CFLAGS) \
-	$(LIBOSMOSIGTRAN_CFLAGS) \
-	$(LIBOSMOMGCPCLIENT_CFLAGS) \
 	$(NULL)
 
 AM_LDFLAGS = \
 	$(COVERAGE_LDFLAGS) \
 	$(NULL)
 
+noinst_LTLIBRARIES = \
+        libbscbts.la \
+        $(NULL)
+
+libbscbts_la_SOURCES = \
+	abis_nm.c \
+	bts_ipaccess_nanobts.c \
+	bts_ipaccess_nanobts_omlattr.c \
+	bts_siemens_bs11.c \
+	e1_config.c \
+	gsm_data.c \
+	gsm_timers.c \
+	net_init.c \
+	$(NULL)
+
+libbscbts_la_LIBADD = \
+	$(LIBOSMOCORE_LIBS) \
+	$(LIBOSMOGSM_LIBS) \
+	$(LIBOSMOVTY_LIBS) \
+	$(LIBOSMOCTRL_LIBS) \
+	$(COVERAGE_LDFLAGS) \
+	$(LIBOSMOABIS_LIBS) \
+	$(NULL)
+
 bin_PROGRAMS = \
 	osmo-bsc \
 	$(NULL)
 
+osmo_bsc_CFLAGS = \
+	-Wall \
+	$(LIBOSMOCORE_CFLAGS) \
+	$(LIBOSMOGSM_CFLAGS) \
+	$(LIBOSMOVTY_CFLAGS) \
+	$(LIBOSMOCTRL_CFLAGS) \
+	$(LIBOSMONETIF_CFLAGS) \
+	$(COVERAGE_CFLAGS) \
+	$(LIBOSMOABIS_CFLAGS) \
+	$(LIBOSMOSIGTRAN_CFLAGS) \
+	$(LIBOSMOMGCPCLIENT_CFLAGS) \
+	$(NULL)
+
 osmo_bsc_SOURCES = \
 	a_reset.c \
 	abis_nm.c \
@@ -45,19 +80,13 @@
 	bsc_vty.c \
 	bts_ericsson_rbs2000.c \
 	bts_init.c \
-	bts_ipaccess_nanobts.c \
-	bts_ipaccess_nanobts_omlattr.c \
 	bts_nokia_site.c \
-	bts_siemens_bs11.c \
 	bts_sysmobts.c \
 	bts_unknown.c \
 	chan_alloc.c \
 	codec_pref.c \
-	e1_config.c \
 	gsm_04_08_rr.c \
 	gsm_04_80_utils.c \
-	gsm_data.c \
-	gsm_timers.c \
 	gsm_timers_vty.c \
 	handover_cfg.c \
 	handover_decision.c \
@@ -73,7 +102,6 @@
 	mgw_endpoint_fsm.c \
 	neighbor_ident.c \
 	neighbor_ident_vty.c \
-	net_init.c \
 	gsm_08_08.c \
 	osmo_bsc_bssap.c \
 	osmo_bsc_ctrl.c \
@@ -93,7 +121,8 @@
 	$(NULL)
 
 osmo_bsc_LDADD = \
-	$(top_builddir)/src/libfilter/libfilter.a \
+	libbscbts.la \
+	$(abs_top_builddir)/src/libfilter/libfilter.a \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 24cd230..445cc2e 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -47,12 +47,7 @@
 	$(NULL)
 
 bs11_config_LDADD = \
-	$(top_builddir)/src/osmo-bsc/abis_nm.o \
-	$(top_builddir)/src/osmo-bsc/bts_siemens_bs11.o \
-	$(top_builddir)/src/osmo-bsc/e1_config.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
-	$(top_builddir)/src/osmo-bsc/net_init.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
@@ -118,8 +113,7 @@
 	$(NULL)
 
 meas_json_LDADD = \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index 4fc3605..e89b9c9 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -25,10 +25,7 @@
 	$(NULL)
 
 abis_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/abis_nm.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
-	$(top_builddir)/src/osmo-bsc/net_init.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index c8ad0e4..fa4b5e4 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -33,16 +33,13 @@
 	$(NULL)
 
 bsc_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/abis_nm.o \
-	$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
-	$(top_builddir)/src/osmo-bsc/osmo_bsc_filter.o \
-	$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
-	$(top_builddir)/src/osmo-bsc/handover_cfg.o \
-	$(top_builddir)/src/osmo-bsc/handover_logic.o \
-	$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
-	$(top_builddir)/src/osmo-bsc/net_init.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-arfcn_range_encode.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-osmo_bsc_filter.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bsc_subscriber.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_cfg.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_logic.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-neighbor_ident.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOVTY_LIBS) \
diff --git a/tests/codec_pref/Makefile.am b/tests/codec_pref/Makefile.am
index e000252..724d6ed 100644
--- a/tests/codec_pref/Makefile.am
+++ b/tests/codec_pref/Makefile.am
@@ -27,7 +27,7 @@
 	$(NULL)
 
 codec_pref_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/codec_pref.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-codec_pref.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	-lrt \
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index b207f8b..77a9502 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -23,14 +23,12 @@
 	$(NULL)
 
 gsm0408_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
-	$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
-	$(top_builddir)/src/osmo-bsc/net_init.o \
-	$(top_builddir)/src/osmo-bsc/rest_octets.o \
-	$(top_builddir)/src/osmo-bsc/system_information.o \
-	$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-gsm_04_08_rr.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-arfcn_range_encode.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-rest_octets.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-system_information.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-neighbor_ident.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 5e4440c..7a288da 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -38,44 +38,39 @@
 	$(NULL)
 
 handover_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/a_reset.o \
-	$(top_builddir)/src/osmo-bsc/abis_nm.o \
-	$(top_builddir)/src/osmo-bsc/abis_rsl.o \
-	$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
-	$(top_builddir)/src/osmo-bsc/assignment_fsm.o \
-	$(top_builddir)/src/osmo-bsc/bsc_init.o \
-	$(top_builddir)/src/osmo-bsc/bsc_rll.o \
-	$(top_builddir)/src/osmo-bsc/bsc_subscr_conn_fsm.o \
-	$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
-	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
-	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
-	$(top_builddir)/src/osmo-bsc/bts_sysmobts.o \
-	$(top_builddir)/src/osmo-bsc/chan_alloc.o \
-	$(top_builddir)/src/osmo-bsc/codec_pref.o \
-	$(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
-	$(top_builddir)/src/osmo-bsc/gsm_04_80_utils.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
-	$(top_builddir)/src/osmo-bsc/handover_cfg.o \
-	$(top_builddir)/src/osmo-bsc/handover_decision.o \
-	$(top_builddir)/src/osmo-bsc/handover_decision_2.o \
-	$(top_builddir)/src/osmo-bsc/handover_fsm.o \
-	$(top_builddir)/src/osmo-bsc/handover_logic.o \
-	$(top_builddir)/src/osmo-bsc/lchan_fsm.o \
-	$(top_builddir)/src/osmo-bsc/lchan_rtp_fsm.o \
-	$(top_builddir)/src/osmo-bsc/lchan_select.o \
-	$(top_builddir)/src/osmo-bsc/meas_rep.o \
-	$(top_builddir)/src/osmo-bsc/mgw_endpoint_fsm.o \
-	$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
-	$(top_builddir)/src/osmo-bsc/net_init.o \
-	$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
-	$(top_builddir)/src/osmo-bsc/osmo_bsc_msc.o \
-	$(top_builddir)/src/osmo-bsc/paging.o \
-	$(top_builddir)/src/osmo-bsc/pcu_sock.o \
-	$(top_builddir)/src/osmo-bsc/penalty_timers.o \
-	$(top_builddir)/src/osmo-bsc/rest_octets.o \
-	$(top_builddir)/src/osmo-bsc/system_information.o \
-	$(top_builddir)/src/osmo-bsc/timeslot_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-a_reset.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-abis_rsl.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-arfcn_range_encode.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-assignment_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bsc_init.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bsc_rll.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bsc_subscr_conn_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bsc_subscriber.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bts_sysmobts.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-chan_alloc.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-codec_pref.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-gsm_04_08_rr.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-gsm_04_80_utils.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_cfg.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_decision.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_decision_2.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-handover_logic.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-lchan_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-lchan_rtp_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-lchan_select.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-meas_rep.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-mgw_endpoint_fsm.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-neighbor_ident.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-osmo_bsc_lcls.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-osmo_bsc_msc.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-paging.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-pcu_sock.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-penalty_timers.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-rest_octets.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-system_information.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-timeslot_fsm.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
@@ -88,7 +83,7 @@
 	$(NULL)
 
 neighbor_ident_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-neighbor_ident.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(NULL)
diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am
index 312cf7d..a5ee7f9 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -23,10 +23,7 @@
 	$(NULL)
 
 nanobts_omlattr_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/abis_nm.o \
-	$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
-	$(top_builddir)/src/osmo-bsc/gsm_data.o \
-	$(top_builddir)/src/osmo-bsc/gsm_timers.o \
+	$(top_builddir)/src/osmo-bsc/libbscbts.la \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOGSM_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
diff --git a/tests/subscr/Makefile.am b/tests/subscr/Makefile.am
index e56d142..fad6569 100644
--- a/tests/subscr/Makefile.am
+++ b/tests/subscr/Makefile.am
@@ -31,7 +31,7 @@
 	$(NULL)
 
 bsc_subscr_test_LDADD = \
-	$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
+	$(top_builddir)/src/osmo-bsc/osmo_bsc-bsc_subscriber.o \
 	$(LIBOSMOCORE_LIBS) \
 	$(LIBOSMOABIS_LIBS) \
 	$(LIBOSMOGSM_LIBS) \

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30bf10660f4710523ca7bdde1b392a8c2b334b23
Gerrit-Change-Number: 13225
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190312/6de4387a/attachment.html>


More information about the gerrit-log mailing list