Move mobile phone specific code from libcommon.a to libmobile.a

This commit is contained in:
Andreas Eversberg
2017-08-20 08:27:02 +02:00
parent 3c0bcce97b
commit cff7622f5c
22 changed files with 58 additions and 23 deletions

View File

@@ -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) \

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);