From bcae2abff8dfeaab75b1bbe58c7659285a721822 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 19 Dec 2012 23:53:34 +0100 Subject: 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. --- configure.ac | 5 +++++ include/osmo-bts/gsm_data.h | 2 +- src/common/Makefile.am | 2 +- src/osmo-bts-sysmo/Makefile.am | 2 +- tests/paging/Makefile.am | 2 +- 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 -- cgit v1.2.3