aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-03-12 20:36:21 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-03-12 21:02:51 +0100
commit81a74ccae436eb78cec5742194d55a0797bd0f85 (patch)
tree970189a570b41d47b4659e6edff5d45b08dfe8e2
parent55f7c75567073f3616c62105fa83f8a6c5e16d85 (diff)
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
-rw-r--r--src/ipaccess/Makefile.am10
-rw-r--r--src/osmo-bsc/Makefile.am49
-rw-r--r--src/utils/Makefile.am10
-rw-r--r--tests/abis/Makefile.am5
-rw-r--r--tests/bsc/Makefile.am17
-rw-r--r--tests/codec_pref/Makefile.am2
-rw-r--r--tests/gsm0408/Makefile.am14
-rw-r--r--tests/handover/Makefile.am73
-rw-r--r--tests/nanobts_omlattr/Makefile.am5
-rw-r--r--tests/subscr/Makefile.am2
10 files changed, 94 insertions, 93 deletions
diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index 3578a40ff..3964e0098 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -44,14 +44,8 @@ ipaccess_config_SOURCES = \
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 @@ ipaccess_proxy_SOURCES = \
$(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 364228d8c..0fabe51cf 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -13,18 +13,53 @@ AM_CFLAGS = \
$(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 @@ osmo_bsc_SOURCES = \
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 @@ osmo_bsc_SOURCES = \
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 @@ osmo_bsc_SOURCES = \
$(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 24cd23085..445cc2e58 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -47,12 +47,7 @@ bs11_config_SOURCES = \
$(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 @@ meas_json_SOURCES = \
$(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 4fc3605c0..e89b9c956 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -25,10 +25,7 @@ abis_test_SOURCES = \
$(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 c8ad0e40a..fa4b5e4f5 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -33,16 +33,13 @@ bsc_test_SOURCES = \
$(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 e000252da..724d6ed80 100644
--- a/tests/codec_pref/Makefile.am
+++ b/tests/codec_pref/Makefile.am
@@ -27,7 +27,7 @@ codec_pref_test_SOURCES = \
$(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 b207f8b09..77a95023e 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -23,14 +23,12 @@ gsm0408_test_SOURCES = \
$(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 5e4440c7b..7a288dab7 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -38,44 +38,39 @@ handover_test_LDFLAGS = \
$(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 @@ neighbor_ident_test_SOURCES = \
$(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 312cf7d93..a5ee7f907 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -23,10 +23,7 @@ nanobts_omlattr_test_SOURCES = \
$(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 e56d142bc..fad6569d3 100644
--- a/tests/subscr/Makefile.am
+++ b/tests/subscr/Makefile.am
@@ -31,7 +31,7 @@ bsc_subscr_test_SOURCES = \
$(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) \