[gprs] Move all GPRS related code to src/gprs subdirectory
diff --git a/openbsc/configure.in b/openbsc/configure.in
index 615e59d..98a93fc 100644
--- a/openbsc/configure.in
+++ b/openbsc/configure.in
@@ -48,6 +48,7 @@
     include/sccp/Makefile
     include/Makefile
     src/Makefile
+    src/gprs/Makefile
     tests/Makefile
     tests/debug/Makefile
     tests/gsm0408/Makefile
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am
index 18245ed..9dcdea0 100644
--- a/openbsc/src/Makefile.am
+++ b/openbsc/src/Makefile.am
@@ -2,9 +2,12 @@
 AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
 AM_LDFLAGS = $(LIBOSMOCORE_LIBS)
 
+# build current directory before building gprs
+SUBDIRS = . gprs
+
 sbin_PROGRAMS = bsc_hack bs11_config ipaccess-find ipaccess-config \
-                isdnsync bsc_mgcp ipaccess-proxy osmo-gbproxy osmo-sgsn
-noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libsccp.a libsgsn.a
+                isdnsync bsc_mgcp ipaccess-proxy
+noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libsccp.a
 noinst_HEADERS = vty/cardshell.h
 
 bscdir = $(libdir)
@@ -19,9 +22,6 @@
 		rtp_proxy.c bts_siemens_bs11.c bts_ipaccess_nanobts.c \
 		bts_unknown.c bsc_version.c bsc_api.c
 
-libsgsn_a_SOURCES = gprs_ns.c gprs_bssgp.c gprs_llc.c gsm_04_08_gprs.c \
-		crc24.c gprs_sgsn.c
-
 libmsc_a_SOURCES = gsm_subscriber.c db.c \
 		mncc.c gsm_04_08.c gsm_04_11.c transaction.c \
 		token_auth.c rrlp.c gsm_04_80.c ussd.c silent_call.c \
@@ -50,11 +50,3 @@
 bsc_mgcp_LDADD = libvty.a
 
 ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c debug.c
-
-osmo_gbproxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \
-			gprs_ns.c socket.c debug.c
-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
diff --git a/openbsc/src/gprs/Makefile.am b/openbsc/src/gprs/Makefile.am
new file mode 100644
index 0000000..ac177f7
--- /dev/null
+++ b/openbsc/src/gprs/Makefile.am
@@ -0,0 +1,17 @@
+INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
+AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
+AM_LDFLAGS = $(LIBOSMOCORE_LIBS)
+
+sbin_PROGRAMS = osmo-gbproxy osmo-sgsn
+noinst_LIBRARIES = libsgsn.a
+
+libsgsn_a_SOURCES = gprs_ns.c gprs_bssgp.c gprs_llc.c gsm_04_08_gprs.c \
+		crc24.c gprs_sgsn.c
+
+osmo_gbproxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \
+			gprs_ns.c ../socket.c ../debug.c
+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
diff --git a/openbsc/src/crc24.c b/openbsc/src/gprs/crc24.c
similarity index 100%
rename from openbsc/src/crc24.c
rename to openbsc/src/gprs/crc24.c
diff --git a/openbsc/src/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
similarity index 100%
rename from openbsc/src/gb_proxy.c
rename to openbsc/src/gprs/gb_proxy.c
diff --git a/openbsc/src/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
similarity index 98%
rename from openbsc/src/gb_proxy_main.c
rename to openbsc/src/gprs/gb_proxy_main.c
index 549b6ce..0054b78 100644
--- a/openbsc/src/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -43,7 +43,7 @@
 #include <openbsc/vty.h>
 #include <openbsc/gb_proxy.h>
 
-#include "../bscconfig.h"
+#include "../../bscconfig.h"
 
 /* this is here for the vty... it will never be called */
 void subscr_put() { abort(); }
diff --git a/openbsc/src/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
similarity index 100%
rename from openbsc/src/gb_proxy_vty.c
rename to openbsc/src/gprs/gb_proxy_vty.c
diff --git a/openbsc/src/gprs_bssgp.c b/openbsc/src/gprs/gprs_bssgp.c
similarity index 100%
rename from openbsc/src/gprs_bssgp.c
rename to openbsc/src/gprs/gprs_bssgp.c
diff --git a/openbsc/src/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
similarity index 100%
rename from openbsc/src/gprs_llc.c
rename to openbsc/src/gprs/gprs_llc.c
diff --git a/openbsc/src/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c
similarity index 100%
rename from openbsc/src/gprs_ns.c
rename to openbsc/src/gprs/gprs_ns.c
diff --git a/openbsc/src/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
similarity index 100%
rename from openbsc/src/gprs_sgsn.c
rename to openbsc/src/gprs/gprs_sgsn.c
diff --git a/openbsc/src/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c
similarity index 100%
rename from openbsc/src/gprs_sndcp.c
rename to openbsc/src/gprs/gprs_sndcp.c
diff --git a/openbsc/src/gsm_04_08_gprs.c b/openbsc/src/gprs/gsm_04_08_gprs.c
similarity index 100%
rename from openbsc/src/gsm_04_08_gprs.c
rename to openbsc/src/gprs/gsm_04_08_gprs.c
diff --git a/openbsc/src/osmo_gbproxy.cfg b/openbsc/src/gprs/osmo_gbproxy.cfg
similarity index 100%
rename from openbsc/src/osmo_gbproxy.cfg
rename to openbsc/src/gprs/osmo_gbproxy.cfg
diff --git a/openbsc/src/osmo_sgsn.cfg b/openbsc/src/gprs/osmo_sgsn.cfg
similarity index 100%
rename from openbsc/src/osmo_sgsn.cfg
rename to openbsc/src/gprs/osmo_sgsn.cfg
diff --git a/openbsc/src/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
similarity index 98%
rename from openbsc/src/sgsn_main.c
rename to openbsc/src/gprs/sgsn_main.c
index d9ea6a8..15f760d 100644
--- a/openbsc/src/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -44,7 +44,7 @@
 #include <openbsc/gprs_ns.h>
 #include <openbsc/gprs_bssgp.h>
 
-#include "../bscconfig.h"
+#include "../../bscconfig.h"
 
 /* this is here for the vty... it will never be called */
 void subscr_put() { abort(); }
diff --git a/openbsc/src/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
similarity index 100%
rename from openbsc/src/sgsn_vty.c
rename to openbsc/src/gprs/sgsn_vty.c