Add required OpenBSC files and lib to the build
Note that since the channel drivers are shared objects, you'll need to compile OpenBSC with: $ make CFLAGS=-fPIC (or whatever is needed for your platform ...) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
df369009fa
commit
0134edfd2b
11
Makefile
11
Makefile
|
@ -1,4 +1,11 @@
|
|||
ASTSRC?=../asterisk
|
||||
OPENBSCSRC?=../openbsc
|
||||
|
||||
|
||||
OPENBSC_SRC = bsc_init.c vty_interface.c vty_interface_layer3.c
|
||||
OPENBSC_LIBS = libmsc.a libbsc.a libmsc.a libvty.a
|
||||
OPENBSC_INCLUDES = -I$(OPENBSCSRC)/include
|
||||
OPENBSC_LDFLAGS = -ldl -ldbi -lcrypt
|
||||
|
||||
|
||||
ASTTOPDIR=$(ASTSRC)
|
||||
|
@ -45,4 +52,8 @@ all: _all
|
|||
|
||||
include $(ASTTOPDIR)/Makefile.moddir_rules
|
||||
|
||||
# Add OpenBSC stuff in the mix
|
||||
chan_openbsc.o:: _ASTCFLAGS+=$(OPENBSC_INCLUDES)
|
||||
chan_openbsc.so: $(addprefix $(OPENBSCSRC)/src/,$(patsubst %.c,%.o,$(OPENBSC_SRC))) $(addprefix $(OPENBSCSRC)/src/,$(OPENBSC_LIBS))
|
||||
chan_openbsc.so:: _ASTLDFLAGS+=$(OPENBSC_LDFLAGS)
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: $")
|
|||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <openbsc/gsm_data.h>
|
||||
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/module.h"
|
||||
|
@ -27,6 +29,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision: $")
|
|||
/* ---------------------------------------------------------------------{{{ */
|
||||
|
||||
|
||||
struct gsm_network *bsc_gsmnet = 0;
|
||||
|
||||
|
||||
/* Main thread */
|
||||
static int g_done;
|
||||
static pthread_t g_main_tid;
|
||||
|
|
Reference in New Issue