create libosmo-mgcp and osmo-mgw by copying legacy code

This a cosmetic commit, copying libosmo-legacy-mgcp to libosmo-mgcp and
osmo-bsc_mgcp to osmo-mgw 1:1 at first, to provide a basis for next patches
that highlight the changes from legacy to new code.

Until osmo-msc and osmo-bsc are adjusted to operate with the new code, we will
keep the legacy code alongside the new code. The legacy code might be dropped
later.

Change-Id: Idf54481754a1765bdb2d0d7033bc0d7dc2018024
diff --git a/src/libosmo-mgcp/Makefile.am b/src/libosmo-mgcp/Makefile.am
new file mode 100644
index 0000000..bcf6242
--- /dev/null
+++ b/src/libosmo-mgcp/Makefile.am
@@ -0,0 +1,50 @@
+AM_CPPFLAGS = \
+	$(all_includes) \
+	-I$(top_srcdir)/include \
+	-I$(top_builddir) \
+	$(NULL)
+
+AM_CFLAGS = \
+	-Wall \
+	$(LIBOSMOCORE_CFLAGS) \
+	$(LIBOSMOVTY_CFLAGS) \
+	$(LIBOSMONETIF_CFLAGS) \
+	$(COVERAGE_CFLAGS) \
+	$(LIBBCG729_CFLAGS) \
+	$(NULL)
+
+AM_LDFLAGS = \
+	$(LIBOSMOCORE_LIBS) \
+	$(LIBOSMOGSM_LIBS) \
+	$(LIBOSMONETIF_LIBS) \
+	$(COVERAGE_LDFLAGS) \
+	$(LIBBCG729_LIBS) \
+	$(NULL)
+
+# This is not at all related to the release version, but a range of supported
+# API versions. Read TODO_RELEASE in the source tree's root!
+LEGACY_MGCP_LIBVERSION=0:0:0
+
+lib_LTLIBRARIES = \
+	libosmo-legacy-mgcp.la \
+	$(NULL)
+
+noinst_HEADERS = \
+	g711common.h \
+	$(NULL)
+
+libosmo_legacy_mgcp_la_SOURCES = \
+	mgcp_common.c \
+	mgcp_protocol.c \
+	mgcp_network.c \
+	mgcp_vty.c \
+	mgcp_osmux.c \
+	mgcp_sdp.c \
+	$(NULL)
+if BUILD_MGCP_TRANSCODING
+libosmo_legacy_mgcp_la_SOURCES += \
+	mgcp_transcode.c \
+	$(NULL)
+endif
+
+libosmo_legacy_mgcp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LEGACY_MGCP_LIBVERSION)