aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-19 23:53:34 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-20 19:02:37 +0100
commitbcae2abff8dfeaab75b1bbe58c7659285a721822 (patch)
treec85c0be436abf97431610f8203dab295a39b2084
parentd1ffab96ca64111652fd850982ca00514b5b3531 (diff)
openbsc: Prepare to allow to have the OpenBSC directory somewhere else
Right now osmo-bts requires access to one OpenBSC header file and this requires that openbsc and osmo-bts git are in the same directory. Begin with making the location of the OpenBSC sourcecode configurable. This approach will allow to build osmo-bts on our Jenkins installation but now has the risk of more code including the openbsc/*.h header files.
-rw-r--r--configure.ac5
-rw-r--r--include/osmo-bts/gsm_data.h2
-rw-r--r--src/common/Makefile.am2
-rw-r--r--src/osmo-bts-sysmo/Makefile.am2
-rw-r--r--tests/paging/Makefile.am2
5 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 7330df86..ccca24fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,11 @@ AC_ARG_ENABLE(sysmocom-bts,
AC_MSG_RESULT([$enable_sysmocom_bts])
AM_CONDITIONAL(ENABLE_SYSMOBTS, test "x$enable_sysmocom_bts" = "xyes")
+# We share gsm_data.h with OpenBSC and need to be pointed to the source
+# directory of OpenBSC for now.
+openbsc_incdir="\$(abs_top_srcdir)/../openbsc/openbsc/include"
+AC_SUBST([OPENBSC_INCDIR], $openbsc_incdir)
+
AC_OUTPUT(
src/Makefile
src/common/Makefile
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 3953663b..33f074a8 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -73,7 +73,7 @@ enum lchan_ciph_state {
#define bts_role_bts(x) ((struct gsm_bts_role_bts *)(x)->role)
-#include "../../openbsc/openbsc/include/openbsc/gsm_data_shared.h"
+#include "openbsc/gsm_data_shared.h"
struct femtol1_hdl;
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 209c01af..2a4d53d4 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = $(all_includes) -I$(top_srcdir)/include
+INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOTRAU_LIBS)
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am
index 9ffa308a..f594eebb 100644
--- a/src/osmo-bts-sysmo/Makefile.am
+++ b/src/osmo-bts-sysmo/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = $(all_includes) -I$(top_srcdir)/include
+INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) -lortp
diff --git a/tests/paging/Makefile.am b/tests/paging/Makefile.am
index d5743a65..91059821 100644
--- a/tests/paging/Makefile.am
+++ b/tests/paging/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = $(all_includes) -I$(top_srcdir)/include
+INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR)
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOTRAU_LIBS) -lortp
noinst_PROGRAMS = paging_test