@@ -1,5 +1,5 @@
-OBJS = testconv_main.o mgcp_transcode.o
+OBJS = testconv_main.o
CC = gcc
CFLAGS = -O0 -ggdb -Wall
@@ -11,7 +11,6 @@ testconv: $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
testconv_main.o: testconv_main.c
-mgcp_transcode.o: ../../src/osmo-bsc_mgcp/mgcp_transcode.c
$(OBJS):
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
@@ -17,7 +17,7 @@
#error "Requires MGCP transcoding enabled (see --enable-mgcp-transcoding)"
#endif
-#include "src/osmo-bsc_mgcp/mgcp_transcode.h"
+#include "openbsc/mgcp_transcode.h"
static int audio_name_to_type(const char *name)
{
@@ -13,7 +13,8 @@ noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
osmo_bsc_rf.h osmo_bsc.h network_listen.h bsc_nat_sccp.h \
osmo_msc_data.h osmo_bsc_grace.h sms_queue.h abis_om2000.h \
bss.h gsm_data_shared.h control_cmd.h ipaccess.h mncc_int.h \
- arfcn_range_encode.h nat_rewrite_trie.h bsc_nat_callstats.h
+ arfcn_range_encode.h nat_rewrite_trie.h bsc_nat_callstats.h \
+ mgcp_transcode.h
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
openbscdir = $(includedir)/openbsc
similarity index 100%
rename from openbsc/src/osmo-bsc_mgcp/mgcp_transcode.h
rename to openbsc/include/openbsc/mgcp_transcode.h
@@ -1,7 +1,15 @@
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
-AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS)
-AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS)
+AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS) \
+ $(LIBBCG729_CFLAGS)
+AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS) \
+ $(LIBBCG729_LIBS)
noinst_LIBRARIES = libmgcp.a
+noinst_HEADERS = g711common.h
+
libmgcp_a_SOURCES = mgcp_protocol.c mgcp_network.c mgcp_vty.c
+
+if BUILD_MGCP_TRANSCODING
+ libmgcp_a_SOURCES += mgcp_transcode.c
+endif
similarity index 100%
rename from openbsc/src/osmo-bsc_mgcp/g711common.h
rename to openbsc/src/libmgcp/g711common.h
similarity index 100%
rename from openbsc/src/osmo-bsc_mgcp/mgcp_transcode.c
rename to openbsc/src/libmgcp/mgcp_transcode.c
@@ -1,16 +1,11 @@
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) \
- $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) \
- $(LIBBCG729_CFLAGS)
+ $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
bin_PROGRAMS = osmo-bsc_mgcp
osmo_bsc_mgcp_SOURCES = mgcp_main.c
-if BUILD_MGCP_TRANSCODING
- osmo_bsc_mgcp_SOURCES += mgcp_transcode.c
-endif
+
osmo_bsc_mgcp_LDADD = $(top_builddir)/src/libcommon/libcommon.a \
$(top_builddir)/src/libmgcp/libmgcp.a -lrt \
$(LIBOSMOVTY_LIBS) $(LIBOSMOCORE_LIBS) $(LIBBCG729_LIBS)
-
-noinst_HEADERS = g711common.h mgcp_transcode.h
@@ -50,7 +50,7 @@
#include "../../bscconfig.h"
#ifdef BUILD_MGCP_TRANSCODING
-#include "mgcp_transcode.h"
+#include "openbsc/mgcp_transcode.h"
#endif
/* this is here for the vty... it will never be called */
@@ -18,7 +18,7 @@ mgcp_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \
$(LIBOSMOCORE_LIBS) -lrt -lm $(LIBOSMOSCCP_LIBS) $(LIBOSMOVTY_LIBS) \
$(LIBRARY_DL)
-mgcp_transcoding_test_SOURCES = mgcp_transcoding_test.c $(top_builddir)/src/osmo-bsc_mgcp/mgcp_transcode.c
+mgcp_transcoding_test_SOURCES = mgcp_transcoding_test.c
mgcp_transcoding_test_LDADD = \
$(top_builddir)/src/libbsc/libbsc.a \
@@ -17,7 +17,7 @@
#error "Requires MGCP transcoding enabled (see --enable-mgcp-transcoding)"
#endif
-#include "src/osmo-bsc_mgcp/mgcp_transcode.h"
+#include "openbsc/mgcp_transcode.h"
uint8_t *audio_frame_l16[] = {
};