[gprs] Build the SGSN stand-alone and not as part of bsc_hack

Instead of continuing to add more and more functionality to the
bsc_hack binary, we should have the new SGSN code run as a separate
executable.

After this commit we now build a 'osmo_sgsn' executable, using its
own osmo_sgsn.cfg config file.

However, the SGSN is not yet functional, mainly due to the fact that
the BSSGP and GMM code are written with the assumption that there
is a msgb->trx->bts and the according 'sturct gsm_bts' data model
around - which clearly is no longer the case outside of bsc_hack.
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am
index 6e4e506..18245ed 100644
--- a/openbsc/src/Makefile.am
+++ b/openbsc/src/Makefile.am
@@ -3,7 +3,7 @@
 AM_LDFLAGS = $(LIBOSMOCORE_LIBS)
 
 sbin_PROGRAMS = bsc_hack bs11_config ipaccess-find ipaccess-config \
-                isdnsync bsc_mgcp ipaccess-proxy osmo-gb_proxy
+                isdnsync bsc_mgcp ipaccess-proxy osmo-gbproxy osmo-sgsn
 noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libsccp.a libsgsn.a
 noinst_HEADERS = vty/cardshell.h
 
@@ -33,7 +33,7 @@
 libsccp_a_SOURCES = sccp/sccp.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 libsgsn.a libvty.a -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 \
 		      rs232.c bts_siemens_bs11.c
@@ -51,6 +51,10 @@
 
 ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c debug.c
 
-osmo_gb_proxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \
+osmo_gbproxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \
 			gprs_ns.c socket.c debug.c
-osmo_gb_proxy_LDADD = libvty.a
+osmo_gbproxy_LDADD = libvty.a
+
+osmo_sgsn_SOURCES = sgsn_main.c sgsn_vty.c \
+			socket.c debug.c
+osmo_sgsn_LDADD = libvty.a libsgsn.a