diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2017-08-20 08:27:02 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2017-09-01 18:42:49 +0200 |
commit | cff7622f5cd91bbb8e451831ad1e674d42d27c0b (patch) | |
tree | 79cb37dc2e39f56b579240ce7f864539423ec6f6 /src/test | |
parent | 3c0bcce97b96b715e7e1d5ffff6f336989bac2c7 (diff) |
Move mobile phone specific code from libcommon.a to libmobile.a
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/Makefile.am | 6 | ||||
-rw-r--r-- | src/test/test_dms.c | 5 | ||||
-rw-r--r-- | src/test/test_emphasis.c | 5 | ||||
-rw-r--r-- | src/test/test_filter.c | 5 | ||||
-rw-r--r-- | src/test/test_sms.c | 4 |
5 files changed, 25 insertions, 0 deletions
diff --git a/src/test/Makefile.am b/src/test/Makefile.am index d9f0de9..6bf0121 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -14,6 +14,7 @@ test_filter_SOURCES = test_filter.c dummy.c test_filter_LDADD = \ $(COMMON_LA) \ + $(top_builddir)/src/common/libmobile.a \ $(top_builddir)/src/common/libcommon.a \ $(ALSA_LIBS) \ $(UHD_LIBS) \ @@ -26,6 +27,7 @@ test_compandor_SOURCES = \ test_compandor_LDADD = \ $(COMMON_LA) \ + $(top_builddir)/src/common/libmobile.a \ $(top_builddir)/src/common/libcommon.a \ $(ALSA_LIBS) \ $(UHD_LIBS) \ @@ -36,6 +38,7 @@ test_emphasis_SOURCES = test_emphasis.c dummy.c test_emphasis_LDADD = \ $(COMMON_LA) \ + $(top_builddir)/src/common/libmobile.a \ $(top_builddir)/src/common/libcommon.a \ $(ALSA_LIBS) \ $(UHD_LIBS) \ @@ -49,6 +52,7 @@ test_dms_SOURCES = \ test_dms_LDADD = \ $(COMMON_LA) \ + $(top_builddir)/src/common/libmobile.a \ $(top_builddir)/src/common/libcommon.a \ $(ALSA_LIBS) \ $(UHD_LIBS) \ @@ -62,6 +66,7 @@ test_sms_SOURCES = \ test_sms_LDADD = \ $(COMMON_LA) \ + $(top_builddir)/src/common/libmobile.a \ $(top_builddir)/src/common/libcommon.a \ $(ALSA_LIBS) \ $(UHD_LIBS) \ @@ -72,6 +77,7 @@ test_performance_SOURCES = dummy.c test_performance.c test_performance_LDADD = \ $(COMMON_LA) \ + $(top_builddir)/src/common/libmobile.a \ $(top_builddir)/src/common/libcommon.a \ $(ALSA_LIBS) \ $(UHD_LIBS) \ diff --git a/src/test/test_dms.c b/src/test/test_dms.c index c51c904..bc44af0 100644 --- a/src/test/test_dms.c +++ b/src/test/test_dms.c @@ -72,12 +72,17 @@ void free_nmt(nmt_t *nmt) free(nmt); } +extern void main_mobile(); + int main(void) { nmt_t *nmt; dms_t *dms; int i, j; + /* this is never called, it forces the linker to add mobile functions */ + if (debuglevel == -1000) main_mobile(); + debuglevel = DEBUG_DEBUG; dms_allow_loopback = 1; diff --git a/src/test/test_emphasis.c b/src/test/test_emphasis.c index eda8d8e..f404cdd 100644 --- a/src/test/test_emphasis.c +++ b/src/test/test_emphasis.c @@ -35,6 +35,8 @@ static void gen_samples(sample_t *samples, double freq) } } +extern void main_mobile(); + int main(void) { emphasis_t estate; @@ -43,6 +45,9 @@ int main(void) double level; double i; + /* this is never called, it forces the linker to add mobile functions */ + if (debuglevel == -1000) main_mobile(); + debuglevel = DEBUG_DEBUG; init_emphasis(&estate, SAMPLERATE, cut_off); diff --git a/src/test/test_filter.c b/src/test/test_filter.c index 2cae141..dc8ca7d 100644 --- a/src/test/test_filter.c +++ b/src/test/test_filter.c @@ -34,6 +34,8 @@ static void gen_samples(sample_t *samples, double freq) } } +extern void main_mobile(); + int main(void) { iir_filter_t filter_low; @@ -43,6 +45,9 @@ int main(void) int iter = 2; int i; + /* this is never called, it forces the linker to add mobile functions */ + if (debuglevel == -1000) main_mobile(); + debuglevel = DEBUG_DEBUG; printf("testing low-pass filter with %d iterations\n", iter); diff --git a/src/test/test_sms.c b/src/test/test_sms.c index 0768046..867113b 100644 --- a/src/test/test_sms.c +++ b/src/test/test_sms.c @@ -90,6 +90,7 @@ void sms_deliver_report(nmt_t *nmt, uint8_t ref, int error, uint8_t cause) printf("(got deliver report from SMS layer)\n"); } +extern void main_mobile(); int main(void) { @@ -97,6 +98,9 @@ int main(void) int i; int rc; + /* this is never called, it forces the linker to add mobile functions */ + if (debuglevel == -1000) main_mobile(); + debuglevel = DEBUG_DEBUG; nmt = calloc(sizeof(*nmt), 1); |