aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-01-16 15:42:48 +0100
committerMax <msuraev@sysmocom.de>2018-01-16 15:53:00 +0100
commitbef6eae05b959b2ce395b3f949675d2a93053f0d (patch)
tree15aba39795584a98bd10b3ff4b0cc1efe649c79c
parent5df57cb84c83546a7c23135845deb8bf615819c1 (diff)
Move sysmobts-calib into osmo-bts-sysmo
It's prerequisite for jenkins tests fix after migration to stow. The sysmobts-calib uses hand-coded Makefile instead of automake which makes it hard to properly propagate build flags. Also, make it optional to enable excluding it from certain jenkins tests. Change-Id: I3b54bfa5ef1d89092f6cf13dc27de10874b31b18
-rw-r--r--.gitignore3
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac8
-rwxr-xr-xcontrib/jenkins_sysmobts.sh6
-rw-r--r--contrib/sysmobts-calib/Makefile10
-rw-r--r--src/osmo-bts-sysmo/Makefile.am8
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts-calib.c (renamed from contrib/sysmobts-calib/sysmobts-calib.c)0
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts-layer1.c (renamed from contrib/sysmobts-calib/sysmobts-layer1.c)0
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts-layer1.h (renamed from contrib/sysmobts-calib/sysmobts-layer1.h)0
9 files changed, 20 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
index 2e8c884..1780e1c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,8 +22,7 @@ stamp-h1
core
core.*
-contrib/sysmobts-calib/sysmobts-calib
-
+src/osmo-bts-sysmo/sysmobts-calib
src/osmo-bts-sysmo/l1fwd-proxy
src/osmo-bts-sysmo/osmo-bts-sysmo
src/osmo-bts-sysmo/osmo-bts-sysmo-remote
diff --git a/Makefile.am b/Makefile.am
index 4832c84..dc42574 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,10 +7,6 @@ SUBDIRS = include src tests
EXTRA_DIST = \
contrib/dump_docs.py contrib/screenrc-l1fwd contrib/osmo-bts-sysmo.service \
contrib/l1fwd.init contrib/screenrc-sysmobts contrib/respawn.sh \
- contrib/sysmobts.init contrib/sysmobts-calib/Makefile \
- contrib/sysmobts-calib/sysmobts-calib.c \
- contrib/sysmobts-calib/sysmobts-layer1.c \
- contrib/sysmobts-calib/sysmobts-layer1.h \
doc/examples/sysmo/osmo-bts.cfg \
doc/examples/sysmo/sysmobts-mgr.cfg \
doc/examples/virtual/openbsc-virtual.cfg \
diff --git a/configure.ac b/configure.ac
index 89443d0..2181743 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,14 @@ PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 0.10.0)
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 0.10.0)
PKG_CHECK_MODULES(ORTP, ortp)
+AC_MSG_CHECKING([whether to enable support for sysmobts calibration tool])
+AC_ARG_ENABLE(sysmobts-calib,
+ AC_HELP_STRING([--enable-sysmobts-calib],
+ [enable code for sysmobts calibration tool [default=no]]),
+ [enable_sysmobts_calib="yes"],[enable_sysmobts_calib="no"])
+AC_MSG_RESULT([$enable_sysmobts_calib])
+AM_CONDITIONAL(ENABLE_SYSMOBTS_CALIB, test "x$enable_sysmobts_calib" = "xyes")
+
AC_MSG_CHECKING([whether to enable support for sysmoBTS L1/PHY support])
AC_ARG_ENABLE(sysmocom-bts,
AC_HELP_STRING([--enable-sysmocom-bts],
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index faeb7c9..852542b 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -18,11 +18,11 @@ ln -s $deps/layer1-headers/include/* "$inst/include/sysmocom/femtobts/"
configure_flags="--enable-sysmocom-bts"
-build_bts "osmo-bts-sysmo" "$configure_flags"
-
# This will not work for the femtobts
if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then
- $MAKE -C contrib/sysmobts-calib
+ configure_flags="$configure_flags --enable-sysmobts-calib"
fi
+build_bts "osmo-bts-sysmo" "$configure_flags"
+
osmo-clean-workspace.sh
diff --git a/contrib/sysmobts-calib/Makefile b/contrib/sysmobts-calib/Makefile
deleted file mode 100644
index a5d4b99..0000000
--- a/contrib/sysmobts-calib/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-CFLAGS=`pkg-config --cflags libosmocore` -Wall -Werror
-LIBS=`pkg-config --libs libosmocore libosmogsm`
-
-all: sysmobts-calib
-
-sysmobts-calib: sysmobts-calib.o sysmobts-layer1.o
- $(CC) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ -lrt $(LIBS)
-
-clean:
- @rm -f sysmobts-calib *.o
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am
index c48b77c..6e917e7 100644
--- a/src/osmo-bts-sysmo/Makefile.am
+++ b/src/osmo-bts-sysmo/Makefile.am
@@ -4,6 +4,7 @@ COMMON_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBOSMOGSM_LIBS) $(LIB
EXTRA_DIST = misc/sysmobts_mgr.h misc/sysmobts_misc.h misc/sysmobts_par.h \
misc/sysmobts_eeprom.h misc/sysmobts_nl.h femtobts.h hw_misc.h \
+ misc/sysmobts-layer1.h \
l1_fwd.h l1_if.h l1_transp.h eeprom.h utils.h oml_router.h
bin_PROGRAMS = osmo-bts-sysmo osmo-bts-sysmo-remote l1fwd-proxy sysmobts-mgr sysmobts-util
@@ -20,6 +21,13 @@ osmo_bts_sysmo_remote_LDADD = $(top_builddir)/src/common/libbts.a $(COMMON_LDADD
l1fwd_proxy_SOURCES = l1_fwd_main.c l1_transp_hw.c
l1fwd_proxy_LDADD = $(top_builddir)/src/common/libbts.a $(COMMON_LDADD)
+if ENABLE_SYSMOBTS_CALIB
+bin_PROGRAMS = sysmobts-calib
+
+sysmobts_calib_SOURCES = misc/sysmobts-calib.c misc/sysmobts-layer1.c
+sysmobts_calib_LDADD = -lrt $(COMMON_LDADD)
+endif
+
sysmobts_mgr_SOURCES = \
misc/sysmobts_mgr.c misc/sysmobts_misc.c \
misc/sysmobts_par.c misc/sysmobts_nl.c \
diff --git a/contrib/sysmobts-calib/sysmobts-calib.c b/src/osmo-bts-sysmo/misc/sysmobts-calib.c
index a111d1d..a111d1d 100644
--- a/contrib/sysmobts-calib/sysmobts-calib.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts-calib.c
diff --git a/contrib/sysmobts-calib/sysmobts-layer1.c b/src/osmo-bts-sysmo/misc/sysmobts-layer1.c
index 4b34f50..4b34f50 100644
--- a/contrib/sysmobts-calib/sysmobts-layer1.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts-layer1.c
diff --git a/contrib/sysmobts-calib/sysmobts-layer1.h b/src/osmo-bts-sysmo/misc/sysmobts-layer1.h
index e7d59c9..e7d59c9 100644
--- a/contrib/sysmobts-calib/sysmobts-layer1.h
+++ b/src/osmo-bts-sysmo/misc/sysmobts-layer1.h