2
2
# Makefile for Linux version of Dire Wolf.
3
3
#
4
4
5
- all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients
5
+ all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients log2gpx
6
6
7
7
CC = gcc
8
8
@@ -81,18 +81,30 @@ CC = gcc
81
81
arch := $(shell echo | gcc -E -dM - | grep __i386__)
82
82
83
83
ifneq ($(arch),)
84
- CFLAGS := -DUSE_ALSA -O3 -march=pentium3 -pthread
84
+ # You might see improvement with -march fine tuned to your hardware.
85
+ # Probably should keep pentium3 if you will be redistributing binaries
86
+ # to other people.
87
+ CFLAGS := -O3 -march=pentium3 -pthread -Iutm
85
88
else
86
- CFLAGS := -DUSE_ALSA - O3 -pthread
89
+ CFLAGS := -O3 -pthread -Iutm
87
90
endif
88
91
89
92
90
- # Uncomment following lines to enable GPS interface.
91
- # DO NOT USE THIS. Still needs more work.
93
+
94
+ # If you want to use OSS (for FreeBSD, OpenBSD) instead of
95
+ # ALSA (for Linux), comment out the two lines below.
96
+
97
+ CFLAGS += -DUSE_ALSA
98
+ LDLIBS += -lasound
99
+
100
+
101
+ # Uncomment following lines to enable GPS interface & tracker function.
102
+
92
103
#CFLAGS += -DENABLE_GPS
93
104
#LDLIBS += -lgps
94
105
95
106
107
+
96
108
# Name of current directory.
97
109
# Used to generate zip file name for distribution.
98
110
@@ -107,9 +119,9 @@ direwolf : direwolf.o config.o demod.o dsp.o demod_afsk.o demod_9600.o hdlc_rec
107
119
decode_aprs.o symbols.o server.o kiss.o kissnet.o kiss_frame.o hdlc_send.o fcs_calc.o \
108
120
gen_tone.o audio.o digipeater.o dedupe.o tq.o xmit.o \
109
121
ptt.o beacon.o dwgps.o encode_aprs.o latlong.o encode_aprs.o latlong.o textcolor.o \
110
- dtmf.o aprs_tt.o tt_user.o tt_text.o igate.o \
122
+ dtmf.o aprs_tt.o tt_user.o tt_text.o igate.o nmea.o log.o telemetry.o \
111
123
utm.a
112
- $(CC) $(CFLAGS) -o $@ $^ -lpthread -lrt -lasound $(LDLIBS) -lm
124
+ $(CC) $(CFLAGS) -o $@ $^ -lpthread -lrt $(LDLIBS) -lm
113
125
114
126
115
127
# Optimization for slow processors.
@@ -132,40 +144,51 @@ LatLong-UTMconversion.o : utm/LatLong-UTMconversion.c
132
144
$(CC) $(CFLAGS) -c -o $@ $^
133
145
134
146
135
- # Optional install step.
147
+ # Optional installation into /usr/local/...
148
+ # Needs to be run as root or with sudo.
149
+
136
150
# TODO: Review file locations.
137
- # TODO: Handle Linux variations correctly.
138
- # The Raspberry Pi has ~/Desktop but Ubuntu does not.
139
- # For now, just put reference to it at the end so only last step fails.
140
151
141
152
install : direwolf decode_aprs tocalls.txt symbols-new.txt symbolsX.txt dw-icon.png direwolf.desktop
142
- sudo install direwolf /usr/local/bin
143
- sudo install decode_aprs /usr/local/bin
144
- sudo install text2tt /usr/local/bin
145
- sudo install tt2text /usr/local/bin
146
- sudo install ll2utm /usr/local/bin
147
- sudo install utm2ll /usr/local/bin
148
- sudo install aclients /usr/local/bin
149
- sudo install -D --mode=644 tocalls.txt /usr/share/direwolf/tocalls.txt
150
- sudo install -D --mode=644 symbols-new.txt /usr/share/direwolf/symbols-new.txt
151
- sudo install -D --mode=644 symbolsX.txt /usr/share/direwolf/symbolsX.txt
152
- sudo install -D --mode=644 dw-icon.png /usr/share/direwolf/dw-icon.png
153
- sudo install -D --mode=644 direwolf.desktop /usr/share/applications/direwolf.desktop
154
- cp direwolf.conf ~
153
+ install direwolf /usr/local/bin
154
+ install decode_aprs /usr/local/bin
155
+ install text2tt /usr/local/bin
156
+ install tt2text /usr/local/bin
157
+ install ll2utm /usr/local/bin
158
+ install utm2ll /usr/local/bin
159
+ install aclients /usr/local/bin
160
+ install log2gpx /usr/local/bin
161
+ install -D --mode=644 tocalls.txt /usr/share/direwolf/tocalls.txt
162
+ install -D --mode=644 symbols-new.txt /usr/share/direwolf/symbols-new.txt
163
+ install -D --mode=644 symbolsX.txt /usr/share/direwolf/symbolsX.txt
164
+ install -D --mode=644 dw-icon.png /usr/share/direwolf/dw-icon.png
165
+ install -D --mode=644 direwolf.desktop /usr/share/applications/direwolf.desktop
166
+ install -D --mode=644 CHANGES.txt /usr/local/share/doc/direwolf/CHANGES.txt
167
+ install -D --mode=644 LICENSE-dire-wolf.txt /usr/local/share/doc/direwolf/LICENSE-dire-wolf.txt
168
+ install -D --mode=644 LICENSE-other.txt /usr/local/share/doc/direwolf/LICENSE-other.txt
169
+ install -D --mode=644 User-Guide.pdf /usr/local/share/doc/direwolf/User-Guide.pdf
170
+ install -D --mode=644 Raspberry-Pi-APRS.pdf /usr/local/share/doc/direwolf/Raspberry-Pi-APRS.pdf
171
+ install -D --mode=644 Raspberry-Pi-APRS-Tracker.pdf /usr/local/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf
172
+ install -D --mode=644 APRStt-Implementation-Notes.pdf /usr/local/share/doc/direwolf/APRStt-Implementation-Notes.pdf
173
+ install -D --mode=644 Quick-Start-Guide-Windows.pdf /usr/local/share/doc/direwolf/Quick-Start-Guide-Windows.pdf
174
+
175
+
176
+ # The Raspberry Pi has ~/Desktop but Ubuntu does not.
177
+
178
+ # TODO: Handle Linux variations correctly.
179
+
180
+
181
+ install-rpi : dw-start.sh
155
182
cp dw-start.sh ~
156
- sudo install -D --mode=644 CHANGES.txt /usr/local/share/doc/direwolf/CHANGES.txt
157
- sudo install -D --mode=644 LICENSE-dire-wolf.txt /usr/local/share/doc/direwolf/LICENSE-dire-wolf.txt
158
- sudo install -D --mode=644 LICENSE-other.txt /usr/local/share/doc/direwolf/LICENSE-other.txt
159
- sudo install -D --mode=644 User-Guide.pdf /usr/local/share/doc/direwolf/User-Guide.pdf
160
- sudo install -D --mode=644 Raspberry-Pi-APRS.pdf /usr/local/share/doc/direwolf/Raspberry-Pi-APRS.pdf
161
- sudo install -D --mode=644 APRStt-Implementation-Notes.pdf /usr/local/share/doc/direwolf/APRStt-Implementation-Notes.pdf
162
- sudo install -D --mode=644 Quick-Start-Guide-Windows.pdf /usr/local/share/doc/direwolf/Quick-Start-Guide-Windows.pdf
163
183
ln -f -s /usr/share/applications/direwolf.desktop ~/Desktop/direwolf.desktop
164
184
185
+ install-conf : direwolf.conf
186
+ cp direwolf.conf ~
187
+
165
188
166
189
# Separate application to decode raw data.
167
190
168
- decode_aprs : decode_aprs.c symbols.c ax25_pad.c textcolor.c fcs_calc.c
191
+ decode_aprs : decode_aprs.c symbols.c ax25_pad.c textcolor.c fcs_calc.c latlong.c log.c telemetry.o
169
192
$(CC) $(CFLAGS) -o decode_aprs -DTEST $^ -lm
170
193
171
194
@@ -182,32 +205,39 @@ tt2text : tt_text.c
182
205
# Convert between Latitude/Longitude and UTM coordinates.
183
206
184
207
ll2utm : ll2utm.c utm.a
185
- $(CC) $(CFLAGS) -I utm - o $@ $^ -lm
208
+ $(CC) $(CFLAGS) -o $@ $^ -lm
186
209
187
210
utm2ll : utm2ll.c utm.a
188
- $(CC) $(CFLAGS) -I utm - o $@ $^ -lm
211
+ $(CC) $(CFLAGS) -o $@ $^ -lm
189
212
190
213
214
+ # Convert from log file to GPX.
215
+
216
+ log2gpx : log2gpx.c
217
+ $(CC) $(CFLAGS) -o $@ $^ -lm
218
+
191
219
192
220
# Test application to generate sound.
193
221
194
222
gen_packets : gen_packets.c ax25_pad.c hdlc_send.c fcs_calc.c gen_tone.c textcolor.c
195
- $(CC) $(CFLAGS) -o $@ $^ -lasound -lm
223
+ $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS) -lm
196
224
197
225
demod.o : tune.h
198
226
demod_afsk.o : tune.h
199
227
demod_9600.o : tune.h
200
228
201
- testagc : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o fcs_calc.c ax25_pad.c decode_aprs.c symbols.c tune.h textcolor.c
229
+ testagc : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
230
+ fcs_calc.c ax25_pad.c decode_aprs.c telemetry.c latlong.c symbols.c tune.h textcolor.c
202
231
$(CC) $(CFLAGS) -o atest $^ -lm
203
232
./atest 02_Track_2.wav | grep "packets decoded in" > atest.out
204
233
205
234
206
235
# Unit test for AFSK demodulator
207
236
208
237
209
- atest : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o fcs_calc.c ax25_pad.c decode_aprs.c symbols.c textcolor.c
210
- $(CC) $(CFLAGS) -o $@ $^ -lm
238
+ atest : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
239
+ fcs_calc.c ax25_pad.c decode_aprs.c telemetry.c latlong.c symbols.c textcolor.c
240
+ $(CC) $(CFLAGS) -o $@ $^ -lm -lrt
211
241
time ./atest ../direwolf-0.2/02_Track_2.wav
212
242
213
243
# Unit test for inner digipeater algorithm
@@ -233,6 +263,14 @@ udptest : udp_test.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec
233
263
./udptest
234
264
235
265
266
+ # Unit test for telemetry decoding.
267
+
268
+
269
+ etest : telemetry.c ax25_pad.c fcs_calc.c textcolor.c misc.a regex.a
270
+ $(CC) $(CFLAGS) -o $@ $^ -lm -lrt
271
+ ./etest
272
+
273
+
236
274
# Multiple AGWPE network or serial port clients to test TNCs side by side.
237
275
238
276
aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.c
@@ -241,7 +279,7 @@ aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.c
241
279
242
280
SRCS = direwolf.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c multi_modem.c fcs_calc.c ax25_pad.c decode_aprs.c symbols.c \
243
281
server.c kiss.c kissnet.c kiss_frame.c hdlc_send.c fcs_calc.c gen_tone.c audio.c \
244
- digipeater.c dedupe.c tq.c xmit.c beacon.c encode_aprs.c latlong.c encode_aprs.c latlong.c
282
+ digipeater.c dedupe.c tq.c xmit.c beacon.c encode_aprs.c latlong.c encode_aprs.c latlong.c telemetry.c log.c
245
283
246
284
247
285
depend : $(SRCS)
@@ -256,12 +294,12 @@ clean :
256
294
# Package it up for distribution.
257
295
258
296
dist-src : CHANGES.txt User-Guide.pdf Quick-Start-Guide-Windows.pdf Raspberry-Pi-APRS.pdf \
259
- direwolf.desktop dw-start.sh
297
+ Raspberry-Pi-APRS-Tracker.pdf direwolf.desktop dw-start.sh
260
298
rm -f fsk_fast_filter.h
261
299
echo " " > tune.h
262
300
rm -f ../$z-src.zip
263
301
(cd .. ; zip $z-src.zip $z/CHANGES.txt $z/LICENSE* \
264
- $z/User-Guide.pdf $z/Quick-Start-Guide-Windows.pdf $z/Raspberry-Pi-APRS.pdf \
302
+ $z/User-Guide.pdf $z/Quick-Start-Guide-Windows.pdf $z/Raspberry-Pi-APRS.pdf Raspberry-Pi-APRS-Tracker.pdf \
265
303
$z/Makefile* $z/*.c $z/*.h $z/regex/* $z/misc/* $z/utm/* \
266
304
$z/*.conf $z/tocalls.txt $z/symbols-new.txt $z/symbolsX.txt \
267
305
$z/dw-icon.png $z/dw-icon.rc $z/dw-icon.ico \
@@ -277,11 +315,25 @@ dist-src : CHANGES.txt User-Guide.pdf Quick-Start-Guide-Windows.pdf Raspberry-P
277
315
#Raspberry-Pi-APRS.pdf : Raspberry-Pi-APRS.docx
278
316
# echo "***** Raspberry-Pi-APRS.pdf is out of date *****"
279
317
318
+ #Raspberry-Pi-APRS-Tracker.pdf : Raspberry-Pi-APRS-Tracker.docx
319
+ # echo "***** Raspberry-Pi-APRS-Tracker.pdf is out of date *****"
320
+
280
321
281
322
backup :
282
323
mkdir /cygdrive/e/backup-cygwin-home/`date +"%Y-%m-%d"`
283
324
cp -r . /cygdrive/e/backup-cygwin-home/`date +"%Y-%m-%d"`
284
325
326
+ #
327
+ # The locations below appear to be the most recent.
328
+ # The copy at http://www.aprs.org/tocalls.txt is out of date.
329
+ #
330
+
331
+ tocalls-symbols :
332
+ wget http://www.aprs.org/aprs11/tocalls.txt -O tocalls.txt
333
+ wget http://www.aprs.org/symbols/symbols-new.txt -O symbols-new.txt
334
+ wget http://www.aprs.org/symbols/symbolsX.txt -O symbolsX.txt
335
+
336
+
285
337
#
286
338
# The following is updated by "make depend"
287
339
#
0 commit comments