File tree 3 files changed +17
-8
lines changed
3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -284,11 +284,15 @@ LDFLAGS += -lgps
284
284
endif
285
285
286
286
287
- # Uncomment following lines to enable hamlib support.
288
- # TODO: automate this too. See if hamlib has been installed.
287
+ # Enable hamlib support if header file is present.
288
+
289
+ enable_hamlib := $(wildcard /usr/include/hamlib/rig.h /usr/local/include/hamlib/rig.h)
290
+ ifneq ($(enable_hamlib),)
291
+ CFLAGS += -DUSE_HAMLIB
292
+ LDFLAGS += -lhamlib
293
+ endif
294
+
289
295
290
- #CFLAGS += -DUSE_HAMLIB
291
- #LDFLAGS += -lhamlib
292
296
293
297
294
298
# Name of current directory.
@@ -312,13 +316,18 @@ direwolf : direwolf.o config.o recv.o demod.o dsp.o demod_afsk.o demod_psk.o dem
312
316
dwgps.o dwgpsnmea.o dwgpsd.o dtime_now.o mheard.o ax25_link.o \
313
317
misc.a geotranz.a
314
318
$(CC) -o $@ $^ $(LDFLAGS)
315
- ifneq ($(enable_gpsd),)
316
319
@echo " "
317
- @echo "This includes support for gpsd."
320
+ ifneq ($(enable_gpsd),)
321
+ @echo "\t>\tThis includes support for gpsd."
318
322
else
319
- @echo " "
320
- @echo "This does NOT include support for gpsd."
323
+ @echo "\t>\tThis does NOT include support for gpsd."
324
+ endif
325
+ ifneq ($(enable_hamlib),)
326
+ @echo "\t>\tThis includes support for hamlib."
327
+ else
328
+ @echo "\t>\tThis does NOT include support for hamlib."
321
329
endif
330
+ @echo " "
322
331
323
332
# Optimization for slow processors.
324
333
You can’t perform that action at this time.
0 commit comments