forked from wb2osz/direwolf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.win
695 lines (500 loc) · 20 KB
/
Makefile.win
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
#
# Makefile for native Windows version of Dire Wolf.
#
#
# This is built in the Cygwin environment but with the
# compiler from http://www.mingw.org/ so there is no
# dependency on extra DLLs.
#
# The MinGW/bin directory must be in the PATH for the
# compiler. e.g. export PATH=/cygdrive/c/MinGW/bin:$PATH
#
# Failure to have the path set correctly will result in the
# obscure message: Makefile.win:... recipe for target ... failed.
#
# Type "which gcc" to make sure you are getting the right one!
#
all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients log2gpx gen_packets atest ttcalc tnctest kissutil
# People say we need -mthreads option for threads to work properly.
# They also say it creates a dependency on mingwm10.dll but I'm not seeing that.
# Maybe that is for pthreads. We are using the Windows threads.
# -Ofast was added in gcc 4.6 which was the MinGW version back in 2012.
CC := gcc
CFLAGS := -Ofast -march=pentium3 -msse -Iregex -Iutm -Igeotranz -mthreads -DUSE_REGEX_STATIC -Wall -Wlogical-op
AR := ar
CFLAGS += -g
# TEMP EXPERIMENT - DO NOT RELEASE
#CFLAGS += -fsanitize=undefined
# For version 1.4, we upgrade from gcc 4.6.2 to 4.9.3.
# gcc 4.8 adds these. Try them just for fun.
# No, it needs libasan which is not on Windows.
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
# Helpful for the demodulators. Overkill for non-hot spots.
#CFLAGS += -Wdouble-promotion
# Don't have the patience for this right now.
#CFLAGS += -Wextra
# Continue working on these.
CFLAGS += -Wsign-compare
CFLAGS += -Wuninitialized
CFLAGS += -Wold-style-declaration
# CFLAGS += -fdelete-null-pointer-checks -Wnull-dereference ---not recognized
#CFLAGS += -Wold-style-definition
#-Wmissing-prototypes
#
# Let's see impact of various optimization levels.
# Benchmark results with MinGW gcc version 4.6.2.
#
# seconds options, comments
# ------ -----------------
# 119.8 -O2 Used for version 0.8
# 92.1 -O3
# 88.7 -Ofast (should be same as -O3 -ffastmath)
# 87.5 -Ofast -march=pentium
# 74.1 -Ofast -msse
# 72.2 -Ofast -march=pentium -msse
# 62.0 -Ofast -march=pentium3 (this implies -msse)
# 61.9 -Ofast -march=pentium3 -msse
#
# A minimum of Windows XP is required due to some of the system
# features being used. XP requires a Pentium processor or later.
# The DSP filters can be sped up considerably with the SSE instructions.
# The SSE instructions were introduced in 1999 with the
# Pentium III series.
# SSE2 instructions, added in 2000, don't seem to offer any advantage.
#
# For version 0.9, a Pentium 3 or equivalent is now the minimum required
# for the prebuilt Windows distribution.
# If you insist on using a computer from the previous century,
# you can compile this yourself with different options.
#
# -------------------------------------- Main application --------------------------------
# Not sure why this is here.
demod.o : fsk_demod_state.h
demod_9600.o : fsk_demod_state.h
demod_afsk.o : fsk_demod_state.h
demod_psk.o : fsk_demod_state.h
direwolf : direwolf.o config.o recv.o demod.o dsp.o demod_afsk.o demod_psk.o demod_9600.o hdlc_rec.o \
hdlc_rec2.o multi_modem.o rdq.o rrbb.o dlq.o \
fcs_calc.o ax25_pad.o ax25_pad2.o xid.o \
decode_aprs.o symbols.o server.o kiss.o kissserial.o kissnet.o kiss_frame.o hdlc_send.o fcs_calc.o \
gen_tone.o morse.o audio_win.o audio_stats.o digipeater.o cdigipeater.o pfilter.o dedupe.o tq.o xmit.o \
ptt.o beacon.o dwgps.o encode_aprs.o latlong.o textcolor.o \
dtmf.o aprs_tt.o tt_user.o tt_text.o igate.o waypoint.o serial_port.o log.o telemetry.o \
dwgps.o dwgpsnmea.o dtime_now.o mheard.o ax25_link.o cm108.c \
dw-icon.o regex.a misc.a geotranz.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
dw-icon.o : dw-icon.rc dw-icon.ico
windres dw-icon.rc -o $@
# Optimization for slow processors.
demod.o : fsk_fast_filter.h
demod_afsk.o : fsk_fast_filter.h
fsk_fast_filter.h : gen_fff
./gen_fff > fsk_fast_filter.h
gen_fff : demod_afsk.c dsp.c textcolor.c
echo " " > tune.h
$(CC) $(CFLAGS) -DGEN_FFF -o $@ $^
#
# The destination field is often used to identify the manufacturer/model.
# These are not hardcoded into Dire Wolf. Instead they are read from
# a file called tocalls.txt at application start up time.
#
# The original permanent symbols are built in but the "new" symbols,
# using overlays, are often updated. These are also read from files.
#
# You can obtain an updated copy by typing "make tocalls-symbols".
# This is not part of the normal build process. You have to do this explicitly.
#
# The locations below appear to be the most recent.
# The copy at http://www.aprs.org/tocalls.txt is out of date.
#
.PHONY: tocalls-symbols
tocalls-symbols :
cp tocalls.txt tocalls.txt~
wget http://www.aprs.org/aprs11/tocalls.txt -O tocalls.txt
-diff tocalls.txt~ tocalls.txt
cp symbols-new.txt symbols-new.txt~
wget http://www.aprs.org/symbols/symbols-new.txt -O symbols-new.txt
-diff symbols-new.txt~ symbols-new.txt
cp symbolsX.txt symbolsX.txt~
wget http://www.aprs.org/symbols/symbolsX.txt -O symbolsX.txt
-diff symbolsX.txt~ symbolsX.txt
# ---------------------------- Other utilities included with distribution -------------------------
# Separate application to decode raw data.
# First three use .c rather than .o because they depend on DECAMAIN definition.
decode_aprs : decode_aprs.c kiss_frame.c ax25_pad.c dwgpsnmea.o dwgps.o serial_port.o symbols.o textcolor.o fcs_calc.o latlong.o log.o telemetry.o tt_text.o regex.a misc.a geotranz.a
$(CC) $(CFLAGS) -DDECAMAIN -o decode_aprs $^
# Convert between text and touch tone representation.
text2tt : tt_text.c misc.a
$(CC) $(CFLAGS) -DENC_MAIN -o $@ $^
tt2text : tt_text.c misc.a
$(CC) $(CFLAGS) -DDEC_MAIN -o $@ $^
# Convert between Latitude/Longitude and UTM coordinates.
ll2utm : ll2utm.c textcolor.c geotranz.a misc.a
$(CC) $(CFLAGS) -o $@ $^
utm2ll : utm2ll.c textcolor.c geotranz.a misc.a
$(CC) $(CFLAGS) -o $@ $^
# Convert from log file to GPX.
log2gpx : log2gpx.c textcolor.o misc.a
$(CC) $(CFLAGS) -o $@ $^
# Test application to generate sound.
gen_packets : gen_packets.o ax25_pad.o hdlc_send.o fcs_calc.o gen_tone.o morse.o dtmf.o textcolor.o dsp.o misc.a regex.a
$(CC) $(CFLAGS) -o $@ $^
# Connected mode packet application server.
appserver : appserver.o textcolor.o ax25_pad.o fcs_calc.o misc.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# ------------------------------------------- Libraries --------------------------------------------
# UTM, USNG, MGRS conversions.
geotranz.a : error_string.o mgrs.o polarst.o tranmerc.o ups.o usng.o utm.o
ar -cr $@ $^
error_string.o : geotranz/error_string.c
$(CC) $(CFLAGS) -c -o $@ $^
mgrs.o : geotranz/mgrs.c
$(CC) $(CFLAGS) -c -o $@ $^
polarst.o : geotranz/polarst.c
$(CC) $(CFLAGS) -c -o $@ $^
tranmerc.o : geotranz/tranmerc.c
$(CC) $(CFLAGS) -c -o $@ $^
ups.o : geotranz/ups.c
$(CC) $(CFLAGS) -c -o $@ $^
usng.o : geotranz/usng.c
$(CC) $(CFLAGS) -c -o $@ $^
utm.o : geotranz/utm.c
$(CC) $(CFLAGS) -c -o $@ $^
#
# When building for Linux, we use regular expression
# functions supplied by the gnu C library.
# For the native WIN32 version, we need to use our own copy.
# These were copied from http://gnuwin32.sourceforge.net/packages/regex.htm
# Consider upgrading from https://www.gnu.org/software/libc/sources.html
regex.a : regex.o
ar -cr $@ $^
regex.o : regex/regex.c
$(CC) $(CFLAGS) -Dbool=int -Dtrue=1 -Dfalse=0 -c -o $@ $^
# There are several string functions found in Linux
# but not on Windows. Need to provide our own copy.
misc.a : strsep.o strtok_r.o strcasestr.o strlcpy.o strlcat.o
ar -cr $@ $^
strsep.o : misc/strsep.c
$(CC) $(CFLAGS) -c -o $@ $^
strtok_r.o : misc/strtok_r.c
$(CC) $(CFLAGS) -c -o $@ $^
strcasestr.o : misc/strcasestr.c
$(CC) $(CFLAGS) -c -o $@ $^
strlcpy.o : misc/strlcpy.c
$(CC) $(CFLAGS) -I. -c -o $@ $^
strlcat.o : misc/strlcat.c
$(CC) $(CFLAGS) -I. -c -o $@ $^
# --------------------------------- Automated Smoke Test --------------------------------
# Combine some unit tests into a single regression sanity check.
check : dtest ttest tttexttest pftest tlmtest lltest enctest kisstest pad2test xidtest dtmftest check-modem1200 check-modem300 check-modem9600 check-modem19200 check-modem2400 check-modem4800
# Can we encode and decode at popular data rates?
# Verify that single bit fixup increases the count.
check-modem1200 : gen_packets atest
gen_packets -n 100 -o test12.wav
atest -F0 -PE -L64 -G72 test12.wav
atest -F1 -PE -L70 -G75 test12.wav
rm test12.wav
check-modem300 : gen_packets atest
gen_packets -B300 -n 100 -o test3.wav
atest -B300 -F0 -L68 -G69 test3.wav
atest -B300 -F1 -L71 -G75 test3.wav
rm test3.wav
#FIXME: test full amplitude.
check-modem9600 : gen_packets atest
gen_packets -B9600 -a 170 -o test96.wav
sleep 1
atest -B9600 -F0 -L4 -G4 test96.wav
sleep 1
rm test96.wav
sleep 1
gen_packets -B9600 -n 100 -o test96.wav
sleep 1
atest -B9600 -F0 -L50 -G54 test96.wav
atest -B9600 -F1 -L55 -G59 test96.wav
sleep 1
rm test96.wav
check-modem19200 : gen_packets atest
gen_packets -r 96000 -B19200 -a 170 -o test19.wav
sleep 1
atest -B19200 -F0 -L4 test19.wav
sleep 1
rm test19.wav
sleep 1
gen_packets -r 96000 -B19200 -n 100 -o test19.wav
sleep 1
atest -B19200 -F0 -L55 -G59 test19.wav
atest -B19200 -F1 -L60 -G64 test19.wav
sleep 1
rm test19.wav
check-modem2400 : gen_packets atest
gen_packets -B2400 -n 100 -o test24.wav
sleep 1
atest -B2400 -F0 -L70 -G78 test24.wav
atest -B2400 -F1 -L80 -G87 test24.wav
sleep 1
rm test24.wav
check-modem4800 : gen_packets atest
gen_packets -B4800 -n 100 -o test48.wav
sleep 1
atest -B4800 -F0 -L70 -G74 test48.wav
atest -B4800 -F1 -L79 -G84 test48.wav
sleep 1
rm test48.wav
# Unit test for demodulators
atest : atest.c fsk_fast_filter.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.c \
symbols.c tt_text.c textcolor.c telemetry.c dtime_now.o \
decode_aprs.o log.o \
misc.a regex.a
echo " " > tune.h
$(CC) $(CFLAGS) -o $@ $^
#./atest ..\\direwolf-0.2\\02_Track_2.wav
#atest -B 9600 z9.wav
#atest za100.wav
atest9 : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.c multi_modem.c \
rrbb.c fcs_calc.c ax25_pad.c decode_aprs.c latlong.c symbols.c textcolor.c telemetry.c dtime_now.o misc.a regex.a \
fsk_fast_filter.h
echo " " > tune.h
$(CC) $(CFLAGS) -o $@ $^
./atest9 -B 9600 ../walkabout9600.wav | grep "packets decoded in" >atest.out
#./atest9 -B 9600 noise96.wav
# Unit test for inner digipeater algorithm
.PHONY: dtest
dtest : digipeater.c dedupe.c pfilter.c \
ax25_pad.o fcs_calc.o tq.o textcolor.o \
decode_aprs.o dwgpsnmea.o dwgps.o serial_port.o latlong.o telemetry.o symbols.o tt_text.o misc.a regex.a
$(CC) $(CFLAGS) -DDIGITEST -o $@ $^
./dtest
rm dtest.exe
# Unit test for APRStt tone seqence parsing.
.PHONTY: ttest
ttest : aprs_tt.c tt_text.c latlong.o textcolor.o geotranz.a misc.a
$(CC) $(CFLAGS) -Igeotranz -DTT_MAIN -o $@ $^
./ttest
rm ttest.exe
# Unit test for APRStt tone sequence / text conversions.
.PHONY: tttexttest
tttexttest : tt_text.c textcolor.o misc.a
$(CC) $(CFLAGS) -DTTT_TEST -o $@ $^
./tttexttest
rm tttexttest.exe
# Unit test for Packet Filtering.
.PHONY: pftest
pftest : pfilter.c ax25_pad.o textcolor.o fcs_calc.o decode_aprs.o dwgpsnmea.o dwgps.o serial_port.o latlong.o symbols.o telemetry.o tt_text.o misc.a regex.a
$(CC) $(CFLAGS) -DPFTEST -o $@ $^
./pftest
rm pftest.exe
# Unit test for telemetry decoding.
.PHONY: tlmtest
tlmtest : telemetry.c ax25_pad.o fcs_calc.o textcolor.o misc.a regex.a
$(CC) $(CFLAGS) -DTEST -o $@ $^
./tlmtest
rm tlmtest.exe
# Unit test for location coordinate conversion.
.PHONY: lltest
lltest : latlong.c textcolor.o misc.a
$(CC) $(CFLAGS) -DLLTEST -o $@ $^
./lltest
rm lltest.exe
# Unit test for encoding position & object report.
.PHONY: enctest
enctest : encode_aprs.c latlong.c textcolor.c misc.a
$(CC) $(CFLAGS) -DEN_MAIN -o $@ $^
./enctest
rm enctest.exe
# Unit test for KISS encapsulation.
.PHONY: kisstest
kisstest : kiss_frame.c
$(CC) $(CFLAGS) -DKISSTEST -o $@ $^
./kisstest
rm kisstest.exe
# Unit test for constructing frames besides UI.
.PHONY: pad2test
pad2test : ax25_pad2.c ax25_pad.c fcs_calc.o textcolor.o regex.a misc.a
$(CC) $(CFLAGS) -DPAD2TEST -o $@ $^
./pad2test
rm pad2test.exe
# Unit Test for XID frame encode/decode.
.PHONY: xidtest
xidtest : xid.c textcolor.o misc.a
$(CC) $(CFLAGS) -DXIDTEST -o $@ $^
./xidtest
rm xidtest.exe
# Unit Test for DTMF encode/decode.
.PHONY: dtmftest
dtmftest : dtmf.c textcolor.o
$(CC) $(CFLAGS) -DDTMF_TEST -o $@ $^
./dtmftest
rm dtmftest.exe
# ------------------------------ Other manual testing & experimenting -------------------------------
tnctest : tnctest.c textcolor.o dtime_now.o serial_port.o misc.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# For tweaking the demodulator.
demod.o : tune.h
demod_9600.o : tune.h
demod_afsk.o : tune.h
demod_psk.o : tune.h
testagc : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.o fsk_demod_agc.h \
hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o latlong.o symbols.o textcolor.o telemetry.o \
dwgpsnmea.o dwgps.o serial_port.o tt_text.o dtime_now.o regex.a misc.a
rm -f atest.exe
$(CC) $(CFLAGS) -o atest $^
./atest -P GGG- -F 0 ../02_Track_2.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
noisy3.wav : gen_packets
./gen_packets -B 300 -n 100 -o noisy3.wav
testagc3 : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.c multi_modem.c \
rrbb.c fcs_calc.c ax25_pad.c decode_aprs.c latlong.c symbols.c textcolor.c telemetry.c dtime_now.o regex.a misc.a \
tune.h
rm -f atest3.exe
$(CC) $(CFLAGS) -o atest3 $^
./atest3 -B 300 -P D -D 3 noisy3.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
noisy96.wav : gen_packets
./gen_packets -B 9600 -n 100 -o noisy96.wav
testagc96 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a regex.a
rm -f atest96.exe
$(CC) $(CFLAGS) -o atest96 $^
./atest96 -B 9600 ../walkabout9600c.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 noisy96.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 19990303_0225_9600_8bis_22kHz.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 19990303_0225_9600_16bit_22kHz.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 -P + z8-22k.wav| grep "packets decoded in" >atest.out
#./atest96 -B 9600 test9600.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
testagc24 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a regex.a
rm -f atest24.exe
sleep 1
$(CC) $(CFLAGS) -o atest24 $^
./atest24 -B 2400 test2400.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
testagc48 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a regex.a
rm -f atest48.exe
sleep 1
$(CC) $(CFLAGS) -o atest48 $^
./atest48 -B 4800 test4800.wav | grep "packets decoded in" >atest.out
#./atest48 -B 4800 test4800.wav
echo " " > tune.h
# Unit test for IGate
itest : igate.c textcolor.c ax25_pad.c fcs_calc.c misc.a regex.a
$(CC) $(CFLAGS) -DITEST -o $@ $^ -lwinmm -lws2_32
# Multiple AGWPE network or serial port clients to test TNCs side by side.
aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.c misc.a regex.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# Talk to a KISS TNC.
# Note: kiss_frame.c has conditional compilation on KISSUTIL.
kissutil : kissutil.c kiss_frame.c ax25_pad.o fcs_calc.o textcolor.o serial_port.o sock.o dtime_now.o misc.a regex.a
$(CC) $(CFLAGS) -DKISSUTIL -o $@ $^ -lwinmm -lws2_32
# Touch Tone to Speech sample application.
ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o misc.a regex.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# Send GPS location to KISS TNC each second.
walk96 : walk96.c dwgps.o dwgpsnmea.o kiss_frame.o \
latlong.o encode_aprs.o serial_port.o textcolor.o \
ax25_pad.o fcs_calc.o \
xmit.o hdlc_send.o gen_tone.o ptt.o tq.o \
hdlc_rec.o hdlc_rec2.o rrbb.o dsp.o audio_win.o \
multi_modem.o demod.o demod_afsk.o demod_psk.c demod_9600.o rdq.o \
server.o morse.o dtmf.o audio_stats.o dtime_now.o dlq.o \
regex.a misc.a
$(CC) $(CFLAGS) -DWALK96 -o $@ $^ -lwinmm -lws2_32
#--------------------------------------------------------------
.PHONY: depend
depend : $(wildcard *.c)
makedepend -f $(lastword $(MAKEFILE_LIST)) -- $(CFLAGS) -- $^
.PHONY: clean
clean :
rm -f *.o *.a *.exe fsk_fast_filter.h noisy96.wav
echo " " > tune.h
# ------------------------------- Packaging for distribution ----------------------
# Name of zip file for distribution.
z := $(notdir ${CURDIR})
.PHONY: dist-win
dist-win : direwolf.exe decode_aprs.exe text2tt.exe tt2text.exe ll2utm.exe utm2ll.exe \
aclients.exe log2gpx.exe gen_packets.exe atest.exe ttcalc.exe kissutil.exe \
generic.conf dwespeak.bat \
README.md CHANGES.md \
doc/User-Guide.pdf \
doc/Raspberry-Pi-APRS.pdf \
doc/APRStt-Implementation-Notes.pdf
rm -f ../$z-win.zip
egrep '^C|^W' generic.conf | cut -c2-999 > direwolf.conf
unix2dos direwolf.conf
cp doc/README.md README-doc.md
zip --junk-paths ../$z-win.zip \
README.md \
CHANGES.md \
README-doc.md \
doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf \
doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf \
doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf \
doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf \
doc/APRS-Telemetry-Toolkit.pdf \
doc/APRStt-Implementation-Notes.pdf \
doc/APRStt-interface-for-SARTrack.pdf \
doc/APRStt-Listening-Example.pdf \
doc/Bluetooth-KISS-TNC.pdf \
doc/Going-beyond-9600-baud.pdf \
doc/Raspberry-Pi-APRS.pdf \
doc/Raspberry-Pi-APRS-Tracker.pdf \
doc/Raspberry-Pi-SDR-IGate.pdf \
doc/Successful-APRS-IGate-Operation.pdf \
doc/User-Guide.pdf \
doc/WA8LMF-TNC-Test-CD-Results.pdf \
LICENSE* \
direwolf.conf \
direwolf.exe \
decode_aprs.exe \
tocalls.txt symbols-new.txt symbolsX.txt \
text2tt.exe tt2text.exe \
ll2utm.exe utm2ll.exe \
aclients.exe \
log2gpx.exe \
gen_packets.exe \
atest.exe \
ttcalc.exe \
kissutil.exe \
dwespeak.bat \
telemetry-toolkit/*
rm README-doc.md
# Reminders if pdf files are not up to date.
doc/User-Guide.pdf : doc/User-Guide.docx
echo "***** User-Guide.pdf is out of date *****"
doc/Raspberry-Pi-APRS.pdf : doc/Raspberry-Pi-APRS.docx
echo "***** Raspberry-Pi-APRS.pdf is out of date *****"
doc/Raspberry-Pi-APRS-Tracker.pdf : doc/Raspberry-Pi-APRS-Tracker.docx
echo "***** Raspberry-Pi-APRS-Tracker.pdf is out of date *****"
doc/APRStt-Implementation-Notes.pdf : doc/APRStt-Implementation-Notes.docx
echo "***** APRStt-Implementation-Notes.pdf is out of date *****"
doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf : doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.docx
echo "***** A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf is out of date *****"
doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf : doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.docx
echo "***** A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf is out of date *****"
doc/APRS-Telemetry-Toolkit.pdf : doc/APRS-Telemetry-Toolkit.docx
echo "***** APRS-Telemetry-Toolkit.pdf is out of date *****"
.PHONY: backup
backup :
mkdir /cygdrive/e/backup-cygwin-home/`date +"%Y-%m-%d"`
cp -r . /cygdrive/e/backup-cygwin-home/`date +"%Y-%m-%d"`
#
# The following is updated by "make depend"
#
# DO NOT DELETE