[build] Create a libbsc.a as noinst_LIBRARY, link bsc_hack and tests against it

Link the tests against the libbsc.a to avoid most of the breakage
when creating new symbols.
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index 59a9599..51463dc 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -1,4 +1,5 @@
 INCLUDES = $(all_includes) -I$(top_srcdir)/include
 noinst_PROGRAMS = gsm0408_test
 
-gsm0408_test_SOURCES = gsm0408_test.c $(top_srcdir)/src/gsm_04_08.c $(top_srcdir)/src/debug.c
+gsm0408_test_SOURCES = gsm0408_test.c
+gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a -ldbi
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 8b3a376..c99766a 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -68,19 +68,5 @@
 /*
  * Stubs to compile and link
  */
-void rsl_data_request(void) {}
-void gsm0411_rcv_sms(void) {}
-void schedule_timer(void) {}
-void del_timer(void) {}
-void subscr_get_by_tmsi(void) {}
-void subscr_update(void) {}
-void subscr_put(void) {}
-void db_subscriber_assoc_imei(void) {}
-void db_subscriber_alloc_tmsi(void) {}
-void db_create_subscriber(void) {}
-void rsl_chan_release(void) {}
-void msgb_alloc(void) {}
-void gsm0411_send_sms(void) {}
-void lchan_auto_release(void) {}
-void page_request_stop(void) {}
-void paging_request_stop(void) {}
+void input_event(void) {}
+void nm_state_event(void) {}