finish openbsc / libosmocore separation
* use pkg-config from openbsc to find header and library * move sms and timer tests to libosmocore itself * ensure "make distcheck" works on both packages
This commit is contained in:
parent
dfe6c7d910
commit
f98a4974d7
|
@ -1,7 +1,7 @@
|
||||||
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
||||||
|
|
||||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||||
SUBDIRS = include src
|
SUBDIRS = include src tests
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libosmocore.pc
|
pkgconfig_DATA = libosmocore.pc
|
||||||
|
|
|
@ -34,4 +34,7 @@ AC_OUTPUT(
|
||||||
include/osmocore/Makefile
|
include/osmocore/Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
|
tests/Makefile
|
||||||
|
tests/timer/Makefile
|
||||||
|
tests/sms/Makefile
|
||||||
Makefile)
|
Makefile)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
pkginclude_HEADERS = signal.h linuxlist.h timer.h talloc.h msgb.h select.h \
|
osmocore_HEADERS = signal.h linuxlist.h timer.h talloc.h msgb.h select.h \
|
||||||
tlv.h bitvec.h comp128.h statistics.h gsm_utils.h
|
tlv.h bitvec.h comp128.h statistics.h gsm_utils.h utils.h
|
||||||
|
|
||||||
|
osmocoredir = $(includedir)/osmocore
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
prefix=@exec_prefix@
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
SUBDIRS = timer sms
|
|
@ -0,0 +1,5 @@
|
||||||
|
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||||
|
noinst_PROGRAMS = sms_test
|
||||||
|
|
||||||
|
sms_test_SOURCES = sms_test.c
|
||||||
|
sms_test_LDADD = $(top_builddir)/src/libosmocore.la
|
|
@ -22,14 +22,12 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <openbsc/debug.h>
|
#include <osmocore/msgb.h>
|
||||||
#include <openbsc/msgb.h>
|
#include <osmocore/gsm_utils.h>
|
||||||
#include <openbsc/gsm_data.h>
|
|
||||||
#include <openbsc/gsm_utils.h>
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
DEBUGP(DSMS, "SMS testing\n");
|
printf("SMS testing\n");
|
||||||
struct msgb *msg;
|
struct msgb *msg;
|
||||||
u_int8_t *sms;
|
u_int8_t *sms;
|
||||||
u_int8_t i;
|
u_int8_t i;
|
||||||
|
@ -47,7 +45,3 @@ int main(int argc, char** argv)
|
||||||
printf("Wanted: '%s' got '%s'\n", input, result);
|
printf("Wanted: '%s' got '%s'\n", input, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stubs */
|
|
||||||
void input_event(void) {}
|
|
||||||
void nm_state_event(void) {}
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||||
|
noinst_PROGRAMS = timer_test
|
||||||
|
|
||||||
|
timer_test_SOURCES = timer_test.c
|
||||||
|
timer_test_LDADD = $(top_builddir)/src/libosmocore.la
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <openbsc/timer.h>
|
#include <osmocore/timer.h>
|
||||||
#include <openbsc/select.h>
|
#include <osmocore/select.h>
|
||||||
|
|
||||||
static void timer_fired(unsigned long data);
|
static void timer_fired(unsigned long data);
|
||||||
|
|
|
@ -16,6 +16,8 @@ dnl checks for libraries
|
||||||
AC_SEARCH_LIBS(crypt, crypt,
|
AC_SEARCH_LIBS(crypt, crypt,
|
||||||
[LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
|
[LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)
|
||||||
|
|
||||||
dnl checks for header files
|
dnl checks for header files
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
|
||||||
|
@ -38,7 +40,6 @@ AM_CONFIG_HEADER(bscconfig.h)
|
||||||
|
|
||||||
AC_OUTPUT(
|
AC_OUTPUT(
|
||||||
openbsc.pc
|
openbsc.pc
|
||||||
liblaf0rge1.pc
|
|
||||||
libsccp.pc
|
libsccp.pc
|
||||||
include/openbsc/Makefile
|
include/openbsc/Makefile
|
||||||
include/vty/Makefile
|
include/vty/Makefile
|
||||||
|
@ -47,8 +48,6 @@ AC_OUTPUT(
|
||||||
src/Makefile
|
src/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
tests/debug/Makefile
|
tests/debug/Makefile
|
||||||
tests/timer/Makefile
|
|
||||||
tests/sms/Makefile
|
|
||||||
tests/gsm0408/Makefile
|
tests/gsm0408/Makefile
|
||||||
tests/db/Makefile
|
tests/db/Makefile
|
||||||
tests/channel/Makefile
|
tests/channel/Makefile
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
|
noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
|
||||||
gsm_subscriber.h gsm_04_11.h \
|
gsm_subscriber.h gsm_04_11.h debug.h signal.h \
|
||||||
timer.h misdn.h chan_alloc.h telnet_interface.h paging.h \
|
misdn.h chan_alloc.h telnet_interface.h paging.h \
|
||||||
subchan_demux.h trau_frame.h e1_input.h trau_mux.h \
|
subchan_demux.h trau_frame.h e1_input.h trau_mux.h \
|
||||||
gsm_utils.h ipaccess.h rs232.h openbscdefines.h rtp_proxy.h \
|
ipaccess.h rs232.h openbscdefines.h rtp_proxy.h \
|
||||||
bsc_rll.h mncc.h transaction.h ussd.h gsm_04_80.h \
|
bsc_rll.h mncc.h transaction.h ussd.h gsm_04_80.h \
|
||||||
silent_call.h mgcp.h meas_rep.h bitvec.h rest_octets.h \
|
silent_call.h mgcp.h meas_rep.h rest_octets.h \
|
||||||
system_information.h handover.h statistics.h
|
system_information.h handover.h
|
||||||
|
|
||||||
laforge_HEADERS = signal.h linuxlist.h timer.h talloc.h msgb.h select.h tlv.h \
|
|
||||||
debug.h
|
|
||||||
laforgedir= $(includedir)/laf0rge1
|
|
||||||
|
|
||||||
openbsc_HEADERS = gsm_04_08.h meas_rep.h
|
openbsc_HEADERS = gsm_04_08.h meas_rep.h
|
||||||
openbscdir = $(includedir)/openbsc
|
openbscdir = $(includedir)/openbsc
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||||
AM_CFLAGS=-Wall
|
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
|
||||||
|
AM_LDFLAGS = $(LIBOSMOCORE_LIBS)
|
||||||
|
|
||||||
sbin_PROGRAMS = bsc_hack bs11_config ipaccess-find ipaccess-config \
|
sbin_PROGRAMS = bsc_hack bs11_config ipaccess-find ipaccess-config \
|
||||||
isdnsync bsc_mgcp ipaccess-proxy
|
isdnsync bsc_mgcp ipaccess-proxy
|
||||||
|
@ -28,22 +29,19 @@ libvty_a_SOURCES = vty/buffer.c vty/command.c vty/vector.c vty/vty.c
|
||||||
libsccp_a_SOURCES = sccp/sccp.c
|
libsccp_a_SOURCES = sccp/sccp.c
|
||||||
|
|
||||||
bsc_hack_SOURCES = bsc_hack.c bsc_init.c vty_interface.c vty_interface_layer3.c
|
bsc_hack_SOURCES = bsc_hack.c bsc_init.c vty_interface.c vty_interface_layer3.c
|
||||||
bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a -losmocore -ldl -ldbi $(LIBCRYPT)
|
bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a -ldl -ldbi $(LIBCRYPT)
|
||||||
|
|
||||||
bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c debug.c \
|
bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c debug.c \
|
||||||
rs232.c bts_siemens_bs11.c
|
rs232.c bts_siemens_bs11.c
|
||||||
bs11_config_LDADD = -losmocore
|
|
||||||
|
|
||||||
ipaccess_find_SOURCES = ipaccess/ipaccess-find.c
|
ipaccess_find_SOURCES = ipaccess/ipaccess-find.c
|
||||||
ipaccess_find_LDADD = -losmocore
|
|
||||||
|
|
||||||
ipaccess_config_SOURCES = ipaccess/ipaccess-config.c ipaccess/ipaccess-firmware.c
|
ipaccess_config_SOURCES = ipaccess/ipaccess-config.c ipaccess/ipaccess-firmware.c
|
||||||
ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a -losmocore -ldl -ldbi $(LIBCRYPT)
|
ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a -ldl -ldbi $(LIBCRYPT)
|
||||||
|
|
||||||
isdnsync_SOURCES = isdnsync.c
|
isdnsync_SOURCES = isdnsync.c
|
||||||
|
|
||||||
bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c debug.c telnet_interface.c
|
bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c debug.c telnet_interface.c
|
||||||
bsc_mgcp_LDADD = libvty.a -losmocore
|
bsc_mgcp_LDADD = libvty.a
|
||||||
|
|
||||||
ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c debug.c
|
ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c debug.c
|
||||||
ipaccess_proxy_LDADD = -losmocore
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
SUBDIRS = debug timer sms gsm0408 db channel sccp
|
SUBDIRS = debug gsm0408 db channel sccp
|
||||||
|
|
|
@ -8,14 +8,8 @@ channel_test_SOURCES = channel_test.c \
|
||||||
$(top_srcdir)/src/gsm_subscriber_base.c \
|
$(top_srcdir)/src/gsm_subscriber_base.c \
|
||||||
$(top_srcdir)/src/gsm_subscriber.c \
|
$(top_srcdir)/src/gsm_subscriber.c \
|
||||||
$(top_srcdir)/src/debug.c \
|
$(top_srcdir)/src/debug.c \
|
||||||
$(top_srcdir)/src/timer.c \
|
|
||||||
$(top_srcdir)/src/select.c \
|
|
||||||
$(top_srcdir)/src/talloc.c \
|
|
||||||
$(top_srcdir)/src/gsm_data.c \
|
$(top_srcdir)/src/gsm_data.c \
|
||||||
$(top_srcdir)/src/signal.c \
|
|
||||||
$(top_srcdir)/src/statistics.c \
|
|
||||||
$(top_srcdir)/src/bts_ipaccess_nanobts.c \
|
$(top_srcdir)/src/bts_ipaccess_nanobts.c \
|
||||||
$(top_srcdir)/src/bts_siemens_bs11.c \
|
$(top_srcdir)/src/bts_siemens_bs11.c
|
||||||
$(top_srcdir)/src/tlv_parser.c
|
channel_test_LDADD = -ldl -ldbi $(LIBOSMOCORE_LIBS)
|
||||||
channel_test_LDADD = -ldl -ldbi
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <openbsc/select.h>
|
#include <osmocore/select.h>
|
||||||
#include <openbsc/gsm_subscriber.h>
|
#include <openbsc/gsm_subscriber.h>
|
||||||
#include <openbsc/abis_rsl.h>
|
#include <openbsc/abis_rsl.h>
|
||||||
|
|
||||||
|
|
|
@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3
|
||||||
noinst_PROGRAMS = db_test
|
noinst_PROGRAMS = db_test
|
||||||
|
|
||||||
db_test_SOURCES = db_test.c
|
db_test_SOURCES = db_test.c
|
||||||
db_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldl -ldbi
|
db_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS) -ldl -ldbi
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||||
noinst_PROGRAMS = debug_test
|
noinst_PROGRAMS = debug_test
|
||||||
|
|
||||||
debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c $(top_srcdir)/src/talloc.c
|
debug_test_SOURCES = debug_test.c $(top_srcdir)/src/debug.c
|
||||||
|
debug_test_LDADD = $(LIBOSMOCORE_LIBS)
|
||||||
|
|
|
@ -2,4 +2,4 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||||
noinst_PROGRAMS = gsm0408_test
|
noinst_PROGRAMS = gsm0408_test
|
||||||
|
|
||||||
gsm0408_test_SOURCES = gsm0408_test.c
|
gsm0408_test_SOURCES = gsm0408_test.c
|
||||||
gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldbi
|
gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS) -ldbi
|
||||||
|
|
|
@ -4,5 +4,5 @@ AM_CFLAGS=-Wall -ggdb3
|
||||||
noinst_PROGRAMS = sccp_test
|
noinst_PROGRAMS = sccp_test
|
||||||
|
|
||||||
sccp_test_SOURCES = sccp_test.c
|
sccp_test_SOURCES = sccp_test.c
|
||||||
sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a
|
sccp_test_LDADD = $(top_builddir)/src/libsccp.a $(top_builddir)/src/libbsc.a $(LIBOSMOCORE_LIBS)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <openbsc/gsm_data.h>
|
#include <openbsc/gsm_data.h>
|
||||||
#include <openbsc/debug.h>
|
#include <openbsc/debug.h>
|
||||||
#include <openbsc/msgb.h>
|
#include <osmocore/msgb.h>
|
||||||
|
|
||||||
#include <sccp/sccp.h>
|
#include <sccp/sccp.h>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
|
||||||
noinst_PROGRAMS = sms_test
|
|
||||||
|
|
||||||
sms_test_SOURCES = sms_test.c
|
|
||||||
sms_test_LDADD = $(top_builddir)/src/libmsc.a $(top_builddir)/src/libbsc.a $(top_builddir)/src/liblaf0rge1.a -ldl -ldbi
|
|
|
@ -1,5 +0,0 @@
|
||||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
|
||||||
noinst_PROGRAMS = timer_test
|
|
||||||
|
|
||||||
timer_test_SOURCES = timer_test.c $(top_srcdir)/src/timer.c $(top_srcdir)/src/select.c
|
|
||||||
|
|
Loading…
Reference in New Issue