-
Notifications
You must be signed in to change notification settings - Fork 313
/
Copy pathCMakeLists.txt
714 lines (588 loc) · 17.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
# This is a trick to avoid more complication
# because configure_file() is done at configuration time
set(CUSTOM_TEST_BINARY_DIR "${CMAKE_BINARY_DIR}/test")
set(GEN_PACKETS_BIN "${CMAKE_BINARY_DIR}/src/gen_packets${CMAKE_EXECUTABLE_SUFFIX}")
set(ATEST_BIN "${CMAKE_BINARY_DIR}/src/atest${CMAKE_EXECUTABLE_SUFFIX}")
set(FXSEND_BIN "${CMAKE_BINARY_DIR}/test/fxsend${CMAKE_EXECUTABLE_SUFFIX}")
set(FXREC_BIN "${CMAKE_BINARY_DIR}/test/fxrec${CMAKE_EXECUTABLE_SUFFIX}")
set(IL2P_TEST_BIN "${CMAKE_BINARY_DIR}/test/il2p_test${CMAKE_EXECUTABLE_SUFFIX}")
if(WIN32)
set(CUSTOM_SCRIPT_SUFFIX ".bat")
else()
set(CUSTOM_SCRIPT_SUFFIX "")
endif()
set(TEST_CHECK-FX25_FILE "check-fx25")
set(TEST_CHECK-IL2P_FILE "check-il2p")
set(TEST_CHECK-MODEM1200_FILE "check-modem1200")
set(TEST_CHECK-MODEM1200_IL2P_FILE "check-modem1200-i")
set(TEST_CHECK-MODEM300_FILE "check-modem300")
set(TEST_CHECK-MODEM9600_FILE "check-modem9600")
set(TEST_CHECK-MODEM9600_IL2P_FILE "check-modem9600-i")
set(TEST_CHECK-MODEM19200_FILE "check-modem19200")
set(TEST_CHECK-MODEM2400-a_FILE "check-modem2400-a")
set(TEST_CHECK-MODEM2400-b_FILE "check-modem2400-b")
set(TEST_CHECK-MODEM2400-g_FILE "check-modem2400-g")
set(TEST_CHECK-MODEM4800_FILE "check-modem4800")
set(TEST_CHECK-MODEMEAS_FILE "check-modemeas")
# generate the scripts that run the tests
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-FX25_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-FX25_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-IL2P_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-IL2P_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM1200_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM1200_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM1200_IL2P_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM1200_IL2P_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM300_FILE}"
"${CUSTOM_TEST_BINARY_DIR}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM9600_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM9600_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM9600_IL2P_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM9600_IL2P_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM19200_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM19200_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM2400-a_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM2400-a_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM2400-b_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM2400-b_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM2400-g_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM2400-g_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEM4800_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM4800_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
configure_file(
"${CUSTOM_TEST_SCRIPTS_DIR}/${TEST_CHECK-MODEMEAS_FILE}"
"${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEMEAS_FILE}${CUSTOM_SCRIPT_SUFFIX}"
@ONLY
)
# global includes
# not ideal but not so slow
# otherwise use target_include_directories
include_directories(
${CUSTOM_SRC_DIR}
${GPSD_INCLUDE_DIRS}
${HAMLIB_INCLUDE_DIRS}
${ALSA_INCLUDE_DIRS}
${UDEV_INCLUDE_DIRS}
${PORTAUDIO_INCLUDE_DIRS}
${CUSTOM_GEOTRANZ_DIR}
${CMAKE_BINARY_DIR}/src
)
if(WIN32 OR CYGWIN)
include_directories(
${CUSTOM_REGEX_DIR}
)
endif()
if(WIN32 OR CYGWIN)
list(REMOVE_ITEM atest9_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
endif()
# Unit test for inner digipeater algorithm
list(APPEND dtest_SOURCES
${CUSTOM_SRC_DIR}/digipeater.c
${CUSTOM_SRC_DIR}/ais.c
${CUSTOM_SRC_DIR}/dedupe.c
${CUSTOM_SRC_DIR}/pfilter.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/tq.c
${CUSTOM_SRC_DIR}/textcolor.c
${CUSTOM_SRC_DIR}/decode_aprs.c
${CUSTOM_SRC_DIR}/dwgpsnmea.c
${CUSTOM_SRC_DIR}/dwgps.c
${CUSTOM_SRC_DIR}/dwgpsd.c
${CUSTOM_SRC_DIR}/serial_port.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/telemetry.c
${CUSTOM_SRC_DIR}/symbols.c
${CUSTOM_SRC_DIR}/tt_text.c
)
if(WIN32 OR CYGWIN)
list(REMOVE_ITEM dtest_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
endif()
add_executable(dtest
${dtest_SOURCES}
)
set_target_properties(dtest
PROPERTIES COMPILE_FLAGS "-DDIGITEST -DUSE_REGEX_STATIC"
)
target_link_libraries(dtest
${MISC_LIBRARIES}
${REGEX_LIBRARIES}
${GPSD_LIBRARIES}
Threads::Threads
)
if(WIN32 OR CYGWIN)
target_link_libraries(dtest ws2_32)
endif()
# Unit test for APRStt tone sequence parsing.
list(APPEND ttest_SOURCES
${CUSTOM_SRC_DIR}/aprs_tt.c
${CUSTOM_SRC_DIR}/tt_text.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(ttest
${ttest_SOURCES}
)
set_target_properties(ttest
PROPERTIES COMPILE_FLAGS "-DTT_MAIN"
)
target_link_libraries(ttest
${MISC_LIBRARIES}
${GEOTRANZ_LIBRARIES}
)
# Unit test for APRStt tone sequence / text conversions.
list(APPEND tttexttest_SOURCES
${CUSTOM_SRC_DIR}/tt_text.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(tttexttest
${tttexttest_SOURCES}
)
set_target_properties(tttexttest
PROPERTIES COMPILE_FLAGS "-DTTT_TEST"
)
target_link_libraries(tttexttest
${MISC_LIBRARIES}
)
# Unit test for Packet Filtering.
list(APPEND pftest_SOURCES
${CUSTOM_SRC_DIR}/pfilter.c
${CUSTOM_SRC_DIR}/ais.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/textcolor.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/decode_aprs.c
${CUSTOM_SRC_DIR}/dwgpsnmea.c
${CUSTOM_SRC_DIR}/dwgps.c
${CUSTOM_SRC_DIR}/dwgpsd.c
${CUSTOM_SRC_DIR}/serial_port.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/symbols.c
${CUSTOM_SRC_DIR}/telemetry.c
${CUSTOM_SRC_DIR}/tt_text.c
)
if(WIN32 OR CYGWIN)
list(REMOVE_ITEM pftest_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
endif()
add_executable(pftest
${pftest_SOURCES}
)
set_target_properties(pftest
PROPERTIES COMPILE_FLAGS "-DPFTEST -DUSE_REGEX_STATIC"
)
target_link_libraries(pftest
${MISC_LIBRARIES}
${REGEX_LIBRARIES}
${GPSD_LIBRARIES}
Threads::Threads
)
if(WIN32 OR CYGWIN)
target_link_libraries(pftest ws2_32)
endif()
# Unit test for telemetry decoding.
list(APPEND tlmtest_SOURCES
${CUSTOM_SRC_DIR}/telemetry.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/textcolor.c
)
if(WIN32 OR CYGWIN)
list(REMOVE_ITEM tlmtest_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
endif()
add_executable(tlmtest
${tlmtest_SOURCES}
)
set_target_properties(tlmtest
PROPERTIES COMPILE_FLAGS "-DTEST -DUSE_REGEX_STATIC"
)
target_link_libraries(tlmtest
${MISC_LIBRARIES}
${REGEX_LIBRARIES}
)
if(WIN32 OR CYGWIN)
target_link_libraries(tlmtest ws2_32)
endif()
# Unit test for location coordinate conversion.
list(APPEND lltest_SOURCES
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(lltest
${lltest_SOURCES}
)
set_target_properties(lltest
PROPERTIES COMPILE_FLAGS "-DLLTEST"
)
target_link_libraries(lltest
${MISC_LIBRARIES}
)
# Unit test for encoding position & object report.
list(APPEND enctest_SOURCES
${CUSTOM_SRC_DIR}/encode_aprs.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(enctest
${enctest_SOURCES}
)
set_target_properties(enctest
PROPERTIES COMPILE_FLAGS "-DEN_MAIN"
)
target_link_libraries(enctest
${MISC_LIBRARIES}
)
# Unit test for KISS encapsulation.
list(APPEND kisstest_SOURCES
${CUSTOM_SRC_DIR}/kiss_frame.c
)
add_executable(kisstest
${kisstest_SOURCES}
)
set_target_properties(kisstest
PROPERTIES COMPILE_FLAGS "-DKISSTEST"
)
# Unit test for constructing frames besides UI.
list(APPEND pad2test_SOURCES
${CUSTOM_SRC_DIR}/ax25_pad2.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(pad2test
${pad2test_SOURCES}
)
set_target_properties(pad2test
PROPERTIES COMPILE_FLAGS "-DPAD2TEST -DUSE_REGEX_STATIC"
)
target_link_libraries(pad2test
${MISC_LIBRARIES}
${REGEX_LIBRARIES}
)
if(WIN32 OR CYGWIN)
target_link_libraries(pad2test ws2_32)
endif()
# Unit Test for XID frame encode/decode.
list(APPEND xidtest_SOURCES
${CUSTOM_SRC_DIR}/xid.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(xidtest
${xidtest_SOURCES}
)
set_target_properties(xidtest
PROPERTIES COMPILE_FLAGS "-DXIDTEST"
)
target_link_libraries(xidtest
${MISC_LIBRARIES}
)
# Unit Test for DTMF encode/decode.
list(APPEND dtmftest_SOURCES
${CUSTOM_SRC_DIR}/dtmf.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(dtmftest
${dtmftest_SOURCES}
)
set_target_properties(dtmftest
PROPERTIES COMPILE_FLAGS "-DDTMF_TEST"
)
# Unit Test FX.25 algorithm.
list(APPEND fxsend_SOURCES
${CUSTOM_SRC_DIR}/fx25_send.c
${CUSTOM_SRC_DIR}/fx25_encode.c
${CUSTOM_SRC_DIR}/fx25_init.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(fxsend
${fxsend_SOURCES}
)
set_target_properties(fxsend
PROPERTIES COMPILE_FLAGS "-DFXTEST"
)
list(APPEND fxrec_SOURCES
${CUSTOM_SRC_DIR}/fx25_rec.c
${CUSTOM_SRC_DIR}/fx25_extract.c
${CUSTOM_SRC_DIR}/fx25_init.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(fxrec
${fxrec_SOURCES}
)
set_target_properties(fxrec
PROPERTIES COMPILE_FLAGS "-DFXTEST"
)
# Unit Test IL2P with out modems.
list(APPEND il2p_test_SOURCES
${CUSTOM_SRC_DIR}/il2p_test.c
${CUSTOM_SRC_DIR}/il2p_init.c
${CUSTOM_SRC_DIR}/il2p_rec.c
${CUSTOM_SRC_DIR}/il2p_send.c
${CUSTOM_SRC_DIR}/il2p_codec.c
${CUSTOM_SRC_DIR}/il2p_payload.c
${CUSTOM_SRC_DIR}/il2p_header.c
${CUSTOM_SRC_DIR}/il2p_scramble.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/ax25_pad2.c
${CUSTOM_SRC_DIR}/fx25_encode.c
${CUSTOM_SRC_DIR}/fx25_extract.c
${CUSTOM_SRC_DIR}/fx25_init.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/textcolor.c
)
add_executable(il2p_test
${il2p_test_SOURCES}
)
#FIXME - remove if not needed.
#set_target_properties(il2p_test
# PROPERTIES COMPILE_FLAGS "-DXXXXX"
# )
target_link_libraries(il2p_test
${MISC_LIBRARIES}
)
# doing ctest on previous programs
add_test(dtest dtest)
add_test(ttest ttest)
add_test(tttexttest tttexttest)
add_test(pftest pftest)
add_test(tlmtest tlmtest)
add_test(lltest lltest)
add_test(enctest enctest)
add_test(kisstest kisstest)
add_test(pad2test pad2test)
add_test(xidtest xidtest)
add_test(dtmftest dtmftest)
add_test(check-fx25 "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-FX25_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-il2p "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-IL2P_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem1200 "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM1200_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem1200-i "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM1200_IL2P_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem300 "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM300_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem9600 "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM9600_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem9600-i "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM9600_IL2P_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem19200 "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM19200_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem2400-a "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM2400-a_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem2400-b "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM2400-b_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem2400-g "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM2400-g_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modem4800 "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEM4800_FILE}${CUSTOM_SCRIPT_SUFFIX}")
add_test(check-modemeas "${CUSTOM_TEST_BINARY_DIR}/${TEST_CHECK-MODEMEAS_FILE}${CUSTOM_SCRIPT_SUFFIX}")
# ----------------------------- Manual tests and experiments ---------------------------
if(OPTIONAL_TEST)
# Unit test for IGate
list(APPEND itest_SOURCES
${CUSTOM_SRC_DIR}/igate.c
${CUSTOM_SRC_DIR}/ais.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/mheard.c
${CUSTOM_SRC_DIR}/pfilter.c
${CUSTOM_SRC_DIR}/telemetry.c
${CUSTOM_SRC_DIR}/decode_aprs.c
${CUSTOM_SRC_DIR}/dwgpsnmea.c
${CUSTOM_SRC_DIR}/dwgps.c
${CUSTOM_SRC_DIR}/dwgpsd.c
${CUSTOM_SRC_DIR}/serial_port.c
${CUSTOM_SRC_DIR}/textcolor.c
${CUSTOM_SRC_DIR}/dtime_now.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/tt_text.c
${CUSTOM_SRC_DIR}/symbols.c
)
if(WIN32 OR CYGWIN)
list(REMOVE_ITEM itest_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
endif()
add_executable(itest
${itest_SOURCES}
)
set_target_properties(itest
PROPERTIES COMPILE_FLAGS "-DITEST"
)
target_link_libraries(itest
${MISC_LIBRARIES}
${GPSD_LIBRARIES}
Threads::Threads
)
if(WIN32 OR CYGWIN)
target_link_libraries(itest ws2_32)
endif()
# For demodulator tweaking experiments.
list(APPEND testagc_SOURCES
${CUSTOM_SRC_DIR}/atest.c
${CUSTOM_SRC_DIR}/ais.c
${CUSTOM_SRC_DIR}/demod.c
${CUSTOM_SRC_DIR}/dsp.c
${CUSTOM_SRC_DIR}/demod_afsk.c
${CUSTOM_SRC_DIR}/demod_psk.c
${CUSTOM_SRC_DIR}/demod_9600.c
${CUSTOM_SRC_DIR}/hdlc_rec.c
${CUSTOM_SRC_DIR}/hdlc_rec2.c
${CUSTOM_SRC_DIR}/multi_modem.c
${CUSTOM_SRC_DIR}/rrbb.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/decode_aprs.c
${CUSTOM_SRC_DIR}/dwgpsnmea.c
${CUSTOM_SRC_DIR}/dwgps.c
${CUSTOM_SRC_DIR}/dwgpsd.c
${CUSTOM_SRC_DIR}/serial_port.c
${CUSTOM_SRC_DIR}/telemetry.c
${CUSTOM_SRC_DIR}/dtime_now.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/tt_text.c
${CUSTOM_SRC_DIR}/symbols.c
${CUSTOM_SRC_DIR}/textcolor.c
)
if(WIN32 OR CYGWIN)
list(REMOVE_ITEM testagc_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
endif()
add_executable(testagc
${testagc_SOURCES}
)
target_link_libraries(testagc
${MISC_LIBRARIES}
${GPSD_LIBRARIES}
Threads::Threads
)
if(WIN32 OR CYGWIN)
target_link_libraries(testagc ws2_32)
endif()
# Send GPS location to KISS TNC each second.
list(APPEND walk96_SOURCES
${CUSTOM_SRC_DIR}/walk96.c
${CUSTOM_SRC_DIR}/ais.c
${CUSTOM_SRC_DIR}/dwgps.c
${CUSTOM_SRC_DIR}/dwgpsnmea.c
${CUSTOM_SRC_DIR}/dwgpsd.c
${CUSTOM_SRC_DIR}/kiss_frame.c
${CUSTOM_SRC_DIR}/latlong.c
${CUSTOM_SRC_DIR}/encode_aprs.c
${CUSTOM_SRC_DIR}/serial_port.c
${CUSTOM_SRC_DIR}/textcolor.c
${CUSTOM_SRC_DIR}/ax25_pad.c
${CUSTOM_SRC_DIR}/fcs_calc.c
${CUSTOM_SRC_DIR}/xmit.c
${CUSTOM_SRC_DIR}/xid.c
${CUSTOM_SRC_DIR}/hdlc_send.c
${CUSTOM_SRC_DIR}/gen_tone.c
${CUSTOM_SRC_DIR}/ptt.c
${CUSTOM_SRC_DIR}/tq.c
${CUSTOM_SRC_DIR}/hdlc_rec.c
${CUSTOM_SRC_DIR}/hdlc_rec2.c
${CUSTOM_SRC_DIR}/rrbb.c
${CUSTOM_SRC_DIR}/dsp.c
${CUSTOM_SRC_DIR}/multi_modem.c
${CUSTOM_SRC_DIR}/demod.c
${CUSTOM_SRC_DIR}/demod_afsk.c
${CUSTOM_SRC_DIR}/demod_psk.c
${CUSTOM_SRC_DIR}/demod_9600.c
${CUSTOM_SRC_DIR}/server.c
${CUSTOM_SRC_DIR}/morse.c
${CUSTOM_SRC_DIR}/dtmf.c
${CUSTOM_SRC_DIR}/audio_stats.c
${CUSTOM_SRC_DIR}/dtime_now.c
${CUSTOM_SRC_DIR}/dlq.c
)
if(LINUX)
list(APPEND walk96_SOURCES
${CUSTOM_SRC_DIR}/audio.c
)
if(UDEV_FOUND)
list(APPEND walk96_SOURCES
${CUSTOM_SRC_DIR}/cm108.c
)
endif()
elseif(WIN32 OR CYGWIN) # windows
list(APPEND walk96_SOURCES
${CUSTOM_SRC_DIR}/audio_win.c
)
list(REMOVE_ITEM walk96_SOURCES
${CUSTOM_SRC_DIR}/dwgpsd.c
)
else() # macOS freebsd openbsd
list(APPEND walk96_SOURCES
${CUSTOM_SRC_DIR}/audio_portaudio.c
)
endif()
add_executable(walk96
${walk96_SOURCES}
)
set_target_properties(walk96
PROPERTIES COMPILE_FLAGS "-DWALK96 -DUSE_REGEX_STATIC"
)
target_link_libraries(walk96
${MISC_LIBRARIES}
${REGEX_LIBRARIES}
${GPSD_LIBRARIES}
${HAMLIB_LIBRARIES}
${ALSA_LIBRARIES}
${PORTAUDIO_LIBRARIES}
${UDEV_LIBRARIES}
Threads::Threads
)
if(WIN32 OR CYGWIN)
target_link_libraries(walk96 ws2_32)
endif()
# TODO miss the audio file
# testagc
# ./atest -P H+ -F 0 ../01_Track_1.wav ../02_Track_2.wav | grep "packets decoded in" >atest.out
# testagc3
# ./gen_packets -B 300 -n 100 -o noisy3.wav
# ./atest3 -B 300 -P D -D 3 noisy3.wav | grep "packets decoded in" >atest.out
# testagc96
# ./gen_packets -B 9600 -n 100 -o noisy96.wav
# ./atest96 -B 9600 ../walkabout9600c.wav noisy96.wav zzz16.wav zzz16.wav zzz16.wav zzz8.wav zzz8.wav zzz8.wav | grep "packets decoded in" >atest.out
# testagc24
# ./atest24 -B 2400 test2400.wav | grep "packets decoded in" >atest.out
# testagc24mfj
# ./atest24mfj -F 1 -B 2400 ../ref-doc/MFJ-2400-PSK/2k4_short.wav
# testagc48
# ./atest48 -B 4800 test4800.wav | grep "packets decoded in" >atest.out
endif() # OPTIONAL_TEST