2015-09-07 23:56:20 +00:00
|
|
|
#
|
2016-01-24 15:11:17 +00:00
|
|
|
# Makefile for Macintosh 10.6+ version of Dire Wolf.
|
2015-09-07 23:56:20 +00:00
|
|
|
#
|
|
|
|
|
2015-11-08 01:57:02 +00:00
|
|
|
# TODO: This is a modified version of Makefile.linux and it
|
|
|
|
# has fallen a little behind. For example, it is missing the check target.
|
|
|
|
# It would be more maintainable if we could use a single file for both.
|
|
|
|
# The differences are not that great.
|
|
|
|
# Maybe the most of the differences could go in to platform specific include
|
|
|
|
# files rather than cluttering it up with too many if blocks.
|
|
|
|
|
2016-01-24 15:11:17 +00:00
|
|
|
# Changes:
|
|
|
|
#
|
|
|
|
# 16 Dec 2015
|
|
|
|
# 1. Added condition check for gps/gpsd code. Commented out due to 32/64 bit
|
|
|
|
# library issues. Macports gpsd build problem.
|
|
|
|
# 2. SDK version checks are now performed by a bash script 'search_sdks.sh'.
|
|
|
|
# This should resolve the varied locations Apple stored the SDKs on the different
|
|
|
|
# Xcode/OS versions. Executing 'make' on the first pass asks the operator
|
|
|
|
# which SDK he/she wishes to use. Executing 'make clean' resets the SDK
|
|
|
|
# selection and operator intervention is once again required. Selected SDK
|
|
|
|
# information resides in a file named './use_this_sdk' in the current working
|
|
|
|
# directory.
|
|
|
|
# 3. Removed fsk_fast_filter.h from atest receipe, clang compiler was having
|
|
|
|
# a hissy fit. Not check with GCC.
|
2015-11-08 01:57:02 +00:00
|
|
|
|
2018-10-01 18:15:42 +00:00
|
|
|
# Where should we install it?
|
|
|
|
# Looks for libraries and includes, default is Homebrew
|
|
|
|
INSTALLDIR := /usr/local
|
|
|
|
|
|
|
|
# To use Macports, uncomment this line
|
|
|
|
#INSTALLDIR := /opt/local
|
|
|
|
|
2017-12-16 22:00:56 +00:00
|
|
|
APPS := direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx gen_packets ttcalc kissutil
|
2016-05-01 22:46:47 +00:00
|
|
|
|
2017-08-27 15:41:15 +00:00
|
|
|
all : $(APPS) direwolf.conf
|
|
|
|
@echo " "
|
2015-09-07 23:56:20 +00:00
|
|
|
@echo "Next step install with: "
|
|
|
|
@echo " "
|
|
|
|
@echo " sudo make install"
|
|
|
|
@echo " "
|
|
|
|
@echo " "
|
|
|
|
|
|
|
|
SYS_LIBS :=
|
|
|
|
SYS_MIN :=
|
2016-01-24 15:11:17 +00:00
|
|
|
|
|
|
|
SYS_LIBS := $(shell ./search_sdks.sh)
|
2015-09-07 23:56:20 +00:00
|
|
|
EXTRA_CFLAGS :=
|
|
|
|
DARWIN_CC := $(shell which clang)
|
|
|
|
ifeq (${DARWIN_CC},)
|
|
|
|
DARWIN_CC := $(shell which gcc)
|
|
|
|
EXTRA_CFLAGS :=
|
|
|
|
else
|
2018-10-01 18:10:39 +00:00
|
|
|
EXTRA_CFLAGS := -fvectorize -fslp-vectorize -pthread
|
2015-09-07 23:56:20 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Change as required in support of the available libraries
|
|
|
|
|
2018-04-04 01:56:02 +00:00
|
|
|
UNAME_M := $(shell uname -m)
|
|
|
|
ifeq (${UNAME_M},x86_64)
|
|
|
|
CC := $(DARWIN_CC) -m64 $(SYS_LIBS) $(SYS_MIN)
|
|
|
|
else
|
2015-09-07 23:56:20 +00:00
|
|
|
CC := $(DARWIN_CC) -m32 $(SYS_LIBS) $(SYS_MIN)
|
2018-04-04 01:56:02 +00:00
|
|
|
endif
|
2016-12-21 13:47:08 +00:00
|
|
|
|
|
|
|
# _XOPEN_SOURCE=600 and _DEFAULT_SOURCE=1 are needed for glibc >= 2.24.
|
|
|
|
# Explanation here: https://github.com/wb2osz/direwolf/issues/62
|
|
|
|
|
|
|
|
CFLAGS := -Os -pthread -Igeotranz -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 $(EXTRA_CFLAGS)
|
|
|
|
|
2017-01-01 16:49:55 +00:00
|
|
|
# That was fine for a recent Ubuntu and Raspbian Jessie.
|
|
|
|
# However, Raspbian wheezy was then missing declaration for strsep and definition of fd_set.
|
|
|
|
|
|
|
|
CFLAGS += -D_BSD_SOURCE
|
|
|
|
|
|
|
|
|
2015-09-07 23:56:20 +00:00
|
|
|
# $(info $$CC is [${CC}])
|
|
|
|
|
|
|
|
|
2017-12-16 22:00:56 +00:00
|
|
|
# If the compiler is generating code for a 32 bit target (-m32), we can
|
|
|
|
# get much better results by telling it we have at least a Pentium 3
|
|
|
|
# which hass the SSE instructions.
|
2015-09-07 23:56:20 +00:00
|
|
|
|
2018-10-01 18:10:53 +00:00
|
|
|
#CFLAGS += -march=core2 -msse4.1 -std=gnu99
|
2015-09-07 23:56:20 +00:00
|
|
|
#CFLAGS += -march=pentium3 -sse
|
2018-10-01 18:10:53 +00:00
|
|
|
CFLAGS += -march=native
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Add -ffastmath in only if compiler version recognizes it.
|
|
|
|
|
|
|
|
useffast := $(shell gcc --help -v 2>/dev/null | grep ffast-math)
|
|
|
|
ifneq ($(useffast),)
|
|
|
|
CFLAGS += -ffast-math
|
|
|
|
endif
|
|
|
|
|
|
|
|
#CFLAGS += -D_FORTIFY_SOURCE
|
|
|
|
|
|
|
|
# Use PortAudio Library
|
|
|
|
|
|
|
|
# Force static linking of portaudio if the static library is available.
|
2018-10-01 18:15:42 +00:00
|
|
|
PA_LIB_STATIC := $(shell find $(INSTALLDIR)/lib -maxdepth 1 -type f -name "libportaudio.a")
|
2015-09-07 23:56:20 +00:00
|
|
|
#$(info $$PA_LIB_STATIC is [${PA_LIB_STATIC}])
|
|
|
|
ifeq (${PA_LIB_STATIC},)
|
2018-10-01 18:15:42 +00:00
|
|
|
LDLIBS += -L$(INSTALLDIR)/lib -lportaudio
|
2015-09-07 23:56:20 +00:00
|
|
|
else
|
2018-10-01 18:15:42 +00:00
|
|
|
LDLIBS += $(INSTALLDIR)/lib/libportaudio.a
|
2015-09-07 23:56:20 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Include libraries portaudio requires.
|
|
|
|
LDLIBS += -framework CoreAudio -framework AudioUnit -framework AudioToolbox
|
|
|
|
LDLIBS += -framework Foundation -framework CoreServices
|
|
|
|
|
2018-10-01 18:15:42 +00:00
|
|
|
CFLAGS += -DUSE_PORTAUDIO -I$(INSTALLDIR)/include
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
# Uncomment following lines to enable GPS interface & tracker function.
|
2016-01-24 15:11:17 +00:00
|
|
|
# Not available for MacOSX (as far as I know).
|
|
|
|
# Although MacPorts has gpsd, wonder if it's the same thing. Add the check
|
|
|
|
# just in case it works.
|
|
|
|
# Well never mind, issue with Macports with 64bit libs ;-( leave the check in
|
|
|
|
# until (if ever) Macports fixes the issue.
|
|
|
|
|
2018-10-01 18:15:42 +00:00
|
|
|
#GPS_HEADER := $(shell find $(INSTALLDIR)/include -maxdepth 1 -type f -name "gps.h")
|
2016-01-24 15:11:17 +00:00
|
|
|
#ifeq (${GPS_HEADER},)
|
|
|
|
#GPS_OBJS :=
|
|
|
|
#else
|
2015-11-08 01:57:02 +00:00
|
|
|
#CFLAGS += -DENABLE_GPSD
|
2018-10-01 18:15:42 +00:00
|
|
|
#LDLIBS += -L$(INSTALLDIR)/lib -lgps -lgpsd
|
2016-01-24 15:11:17 +00:00
|
|
|
#GPS_OBJS := dwgps.o dwgpsnmea.o dwgpsd.o
|
|
|
|
#endif
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
# Name of current directory.
|
|
|
|
# Used to generate zip file name for distribution.
|
|
|
|
|
|
|
|
z := $(notdir ${CURDIR})
|
|
|
|
|
|
|
|
|
|
|
|
# Main application.
|
|
|
|
|
2016-11-20 19:58:51 +00:00
|
|
|
direwolf : direwolf.o aprs_tt.o audio_portaudio.o audio_stats.o ax25_link.o ax25_pad.o ax25_pad2.o beacon.o \
|
2016-05-01 22:46:47 +00:00
|
|
|
config.o decode_aprs.o dedupe.o demod_9600.o demod_afsk.o demod_psk.o \
|
2016-11-20 19:58:51 +00:00
|
|
|
demod.o digipeater.o cdigipeater.o dlq.o dsp.o dtime_now.o dtmf.o dwgps.o \
|
2015-09-07 23:56:20 +00:00
|
|
|
encode_aprs.o encode_aprs.o fcs_calc.o fcs_calc.o gen_tone.o \
|
|
|
|
geotranz.a hdlc_rec.o hdlc_rec2.o hdlc_send.o igate.o kiss_frame.o \
|
2017-05-03 21:41:37 +00:00
|
|
|
kiss.o kissserial.o kissnet.o latlong.o latlong.o log.o morse.o multi_modem.o \
|
2016-07-03 22:09:34 +00:00
|
|
|
waypoint.o serial_port.o pfilter.o ptt.o rdq.o recv.o rrbb.o server.o \
|
2016-11-20 19:58:51 +00:00
|
|
|
symbols.o telemetry.o textcolor.o tq.o tt_text.o tt_user.o xid.o xmit.o \
|
2016-07-03 22:09:34 +00:00
|
|
|
dwgps.o dwgpsnmea.o mheard.o
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lpthread $(LDLIBS) -lm
|
|
|
|
|
|
|
|
|
|
|
|
# Optimization for slow processors.
|
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
demod.o : fsk_fast_filter.h
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
demod_afsk.o : fsk_fast_filter.h
|
|
|
|
|
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
fsk_fast_filter.h : gen_fff
|
2015-09-07 23:56:20 +00:00
|
|
|
./gen_fff > fsk_fast_filter.h
|
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
gen_fff : demod_afsk.c dsp.c textcolor.c
|
|
|
|
echo " " > tune.h
|
|
|
|
$(CC) $(CFLAGS) -DGEN_FFF -o $@ $^ $(LDFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-07 23:56:20 +00:00
|
|
|
# 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 $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Generate apprpriate sample configuration file for this platform.
|
|
|
|
|
|
|
|
direwolf.conf : generic.conf
|
|
|
|
egrep '^C|^M' generic.conf | cut -c2-999 > direwolf.conf
|
|
|
|
|
|
|
|
|
|
|
|
# Where should we install it?
|
2017-12-16 22:00:56 +00:00
|
|
|
# Macports typically installs in /opt/local so maybe you want to use that instead.
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
INSTALLDIR := /usr/local
|
2017-12-16 22:00:56 +00:00
|
|
|
#INSTALLDIR := /opt/local
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
# TODO: Test this better.
|
|
|
|
|
2017-12-16 22:00:56 +00:00
|
|
|
# Optional installation into INSTALLDIR.
|
2015-09-07 23:56:20 +00:00
|
|
|
# Needs to be run as root or with sudo.
|
|
|
|
|
2015-11-08 01:57:02 +00:00
|
|
|
# Command to "install" to system directories. "install" for Linux. "ginstall" for Mac.
|
|
|
|
|
|
|
|
INSTALL=ginstall
|
|
|
|
|
|
|
|
.PHONY: install
|
2017-08-27 15:41:15 +00:00
|
|
|
install : $(APPS) direwolf.conf tocalls.txt symbols-new.txt symbolsX.txt dw-icon.png
|
2015-11-08 01:57:02 +00:00
|
|
|
#
|
2017-12-16 22:00:56 +00:00
|
|
|
# Applications.
|
2015-11-08 01:57:02 +00:00
|
|
|
#
|
|
|
|
$(INSTALL) direwolf $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) decode_aprs $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) text2tt $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) tt2text $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) ll2utm $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) utm2ll $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) aclients $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) log2gpx $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) gen_packets $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) atest $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) ttcalc $(INSTALLDIR)/bin
|
2017-12-16 22:00:56 +00:00
|
|
|
$(INSTALL) kissutil $(INSTALLDIR)/bin
|
2015-11-08 01:57:02 +00:00
|
|
|
$(INSTALL) dwespeak.sh $(INSTALLDIR)/bin
|
|
|
|
#
|
|
|
|
# Telemetry Toolkit executables. Other .conf and .txt files will go into doc directory.
|
|
|
|
#
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-balloon.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-bits.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-data.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-data91.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-eqns.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-parm.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-unit.pl $(INSTALLDIR)/bin
|
|
|
|
$(INSTALL) telemetry-toolkit/telem-volts.py $(INSTALLDIR)/bin
|
|
|
|
#
|
|
|
|
# Misc. data such as "tocall" to system mapping.
|
|
|
|
#
|
2017-12-16 22:00:56 +00:00
|
|
|
$(INSTALL) -D --mode=644 tocalls.txt $(INSTALLDIR)/share/direwolf/tocalls.txt
|
|
|
|
$(INSTALL) -D --mode=644 symbols-new.txt $(INSTALLDIR)/share/direwolf/symbols-new.txt
|
|
|
|
$(INSTALL) -D --mode=644 symbolsX.txt $(INSTALLDIR)/share/direwolf/symbolsX.txt
|
|
|
|
$(INSTALL) -D --mode=644 dw-icon.png $(INSTALLDIR)/share/direwolf/dw-icon.png
|
|
|
|
|
2015-11-08 01:57:02 +00:00
|
|
|
#
|
|
|
|
# Documentation. Various plain text files and PDF.
|
|
|
|
#
|
|
|
|
$(INSTALL) -D --mode=644 README.md $(INSTALLDIR)/share/doc/direwolf/README.md
|
|
|
|
$(INSTALL) -D --mode=644 CHANGES.md $(INSTALLDIR)/share/doc/direwolf/CHANGES.md
|
|
|
|
$(INSTALL) -D --mode=644 LICENSE-dire-wolf.txt $(INSTALLDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt
|
|
|
|
$(INSTALL) -D --mode=644 LICENSE-other.txt $(INSTALLDIR)/share/doc/direwolf/LICENSE-other.txt
|
|
|
|
#
|
2017-05-03 21:41:37 +00:00
|
|
|
# ./README.md is an overview for the project main page.
|
|
|
|
# doc/README.md contains an overview of the PDF file contents and is more useful here.
|
|
|
|
#
|
|
|
|
$(INSTALL) -D --mode=644 doc/README.md $(INSTALLDIR)/share/doc/direwolf/README.md
|
|
|
|
$(INSTALL) -D --mode=644 doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf $(INSTALLDIR)/share/doc/direwolf/2400-4800-PSK-for-APRS-Packet-Radio.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf $(INSTALLDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf $(INSTALLDIR)/share/doc/direwolf/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/APRS-Telemetry-Toolkit.pdf $(INSTALLDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/APRStt-Implementation-Notes.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/APRStt-interface-for-SARTrack.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-interface-for-SARTrack.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/APRStt-Listening-Example.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-Listening-Example.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/Bluetooth-KISS-TNC.pdf $(INSTALLDIR)/share/doc/direwolf/Bluetooth-KISS-TNC.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/Going-beyond-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf/Going-beyond-9600-baud.pdf
|
2015-11-08 01:57:02 +00:00
|
|
|
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS-Tracker.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-SDR-IGate.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-SDR-IGate.pdf
|
2017-05-03 21:41:37 +00:00
|
|
|
$(INSTALL) -D --mode=644 doc/Successful-APRS-IGate-Operation.pdf $(INSTALLDIR)/share/doc/direwolf/Successful-APRS-IGate-Operation.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/User-Guide.pdf $(INSTALLDIR)/share/doc/direwolf/User-Guide.pdf
|
|
|
|
$(INSTALL) -D --mode=644 doc/WA8LMF-TNC-Test-CD-Results.pdf $(INSTALLDIR)/share/doc/direwolf/WA8LMF-TNC-Test-CD-Results.pdf
|
2015-11-08 01:57:02 +00:00
|
|
|
#
|
|
|
|
# Sample config files also go into the doc directory.
|
|
|
|
# When building from source, these can be put in home directory with "make install-conf".
|
|
|
|
# When installed from .DEB or .RPM package, the user will need to copy these to
|
|
|
|
# the home directory or other desired location.
|
|
|
|
# Someone suggested that these could go into an "examples" subdirectory under doc.
|
|
|
|
#
|
|
|
|
$(INSTALL) -D --mode=644 direwolf.conf $(INSTALLDIR)/share/doc/direwolf/direwolf.conf
|
|
|
|
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-m0xer-3.txt $(INSTALLDIR)/share/doc/direwolf/telem-m0xer-3.txt
|
|
|
|
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-balloon.conf $(INSTALLDIR)/share/doc/direwolf/telem-balloon.conf
|
|
|
|
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-volts.conf $(INSTALLDIR)/share/doc/direwolf/telem-volts.conf
|
|
|
|
#
|
|
|
|
# "man" pages
|
|
|
|
#
|
|
|
|
$(INSTALL) -D --mode=644 man1/aclients.1 $(INSTALLDIR)/man/man1/aclients.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/atest.1 $(INSTALLDIR)/man/man1/atest.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/decode_aprs.1 $(INSTALLDIR)/man/man1/decode_aprs.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/direwolf.1 $(INSTALLDIR)/man/man1/direwolf.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/gen_packets.1 $(INSTALLDIR)/man/man1/gen_packets.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/ll2utm.1 $(INSTALLDIR)/man/man1/ll2utm.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/log2gpx.1 $(INSTALLDIR)/man/man1/log2gpx.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/text2tt.1 $(INSTALLDIR)/man/man1/text2tt.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/tt2text.1 $(INSTALLDIR)/man/man1/tt2text.1
|
|
|
|
$(INSTALL) -D --mode=644 man1/utm2ll.1 $(INSTALLDIR)/man/man1/utm2ll.1
|
|
|
|
#
|
2015-09-07 23:56:20 +00:00
|
|
|
@echo " "
|
|
|
|
@echo "If this is your first install, not an upgrade, type this to put a copy"
|
|
|
|
@echo "of the sample configuration file (direwolf.conf) in your home directory:"
|
|
|
|
@echo " "
|
|
|
|
@echo " make install-conf"
|
|
|
|
@echo " "
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: Should we put the sample direwolf.conf file somewhere like
|
|
|
|
# /usr/share/doc/direwolf/examples and add that to the
|
|
|
|
# end of the search path list?
|
|
|
|
# That would make it easy to see user customizations compared to the
|
|
|
|
# latest sample.
|
|
|
|
|
|
|
|
# These would be done as ordinary user.
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: install-conf
|
|
|
|
install-conf : direwolf.conf
|
|
|
|
cp direwolf.conf ~
|
|
|
|
cp telemetry-toolkit/telem-m0xer-3.txt ~
|
|
|
|
cp telemetry-toolkit/telem-*.conf ~
|
|
|
|
|
|
|
|
|
|
|
|
# Separate application to decode raw data.
|
|
|
|
|
2017-09-30 17:41:58 +00:00
|
|
|
# First three use .c rather than .o because they depend on DECAMAIN definition.
|
2017-05-24 23:25:08 +00:00
|
|
|
|
2017-09-30 17:41:58 +00:00
|
|
|
decode_aprs : decode_aprs.c kiss_frame.c ax25_pad.c dwgpsnmea.o dwgps.o dwgpsd.o serial_port.o symbols.o textcolor.o fcs_calc.o latlong.o log.o telemetry.o tt_text.o
|
2015-11-08 01:57:02 +00:00
|
|
|
$(CC) $(CFLAGS) -DDECAMAIN -o $@ $^ -lm
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
# Convert between text and touch tone representation.
|
|
|
|
|
|
|
|
text2tt : tt_text.c
|
2015-11-08 01:57:02 +00:00
|
|
|
$(CC) $(CFLAGS) -DENC_MAIN -o $@ $^
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
tt2text : tt_text.c
|
2015-11-08 01:57:02 +00:00
|
|
|
$(CC) $(CFLAGS) -DDEC_MAIN -o $@ $^
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Convert between Latitude/Longitude and UTM coordinates.
|
|
|
|
|
|
|
|
ll2utm : ll2utm.c geotranz.a
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lm
|
|
|
|
|
|
|
|
utm2ll : utm2ll.c geotranz.a
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lm
|
|
|
|
|
|
|
|
|
|
|
|
# Convert from log file to GPX.
|
|
|
|
|
|
|
|
log2gpx : log2gpx.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lm
|
|
|
|
|
|
|
|
|
|
|
|
# Test application to generate sound.
|
|
|
|
|
2016-12-17 01:12:38 +00:00
|
|
|
gen_packets : gen_packets.c ax25_pad.c hdlc_send.c fcs_calc.c gen_tone.c morse.c dtmf.c textcolor.c dsp.c
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS) -lm
|
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
demod.o : tune.h
|
|
|
|
|
2015-09-07 23:56:20 +00:00
|
|
|
demod_afsk.o : tune.h
|
2016-05-01 22:46:47 +00:00
|
|
|
|
2015-09-07 23:56:20 +00:00
|
|
|
demod_9600.o : tune.h
|
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
demod_psk.o : tune.h
|
|
|
|
|
|
|
|
tune.h :
|
|
|
|
echo " " > tune.h
|
|
|
|
|
|
|
|
|
2015-09-07 23:56:20 +00:00
|
|
|
testagc : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
|
2016-07-03 22:09:34 +00:00
|
|
|
fcs_calc.c ax25_pad.c decode_aprs.c telemetry.c dtime_now.o latlong.c symbols.c tune.h textcolor.c
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -o atest $^ -lm
|
|
|
|
./atest 02_Track_2.wav | grep "packets decoded in" > atest.out
|
|
|
|
|
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
# Unit test for demodulators
|
2015-09-07 23:56:20 +00:00
|
|
|
|
2016-05-01 22:46:47 +00:00
|
|
|
atest : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
|
2017-08-27 15:41:15 +00:00
|
|
|
fcs_calc.c ax25_pad.c decode_aprs.c dwgpsnmea.o dwgps.o serial_port.o telemetry.c dtime_now.o latlong.c symbols.c textcolor.c tt_text.c
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lm
|
2016-05-01 22:46:47 +00:00
|
|
|
#atest : atest.c fsk_fast_filter.h demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
|
2016-01-24 15:11:17 +00:00
|
|
|
# fcs_calc.c ax25_pad.c decode_aprs.c dwgpsnmea.o dwgps.o serial_port.o telemetry.c latlong.c symbols.c textcolor.c tt_text.c
|
|
|
|
# $(CC) $(CFLAGS) -o $@ $^ -lm
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
# Unit test for inner digipeater algorithm
|
|
|
|
|
|
|
|
|
2015-11-08 01:57:02 +00:00
|
|
|
dtest : digipeater.c pfilter.o ax25_pad.o dedupe.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
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -DTEST -o $@ $^
|
|
|
|
./dtest
|
|
|
|
|
|
|
|
|
|
|
|
# Unit test for APRStt.
|
|
|
|
|
2015-11-08 01:57:02 +00:00
|
|
|
ttest : aprs_tt.c tt_text.c latlong.c geotranz.a
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -DTT_MAIN -o $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
# Unit test for IGate
|
|
|
|
|
|
|
|
|
|
|
|
itest : igate.c textcolor.c ax25_pad.c fcs_calc.c
|
|
|
|
$(CC) $(CFLAGS) -DITEST -o $@ $^
|
|
|
|
./itest
|
|
|
|
|
|
|
|
|
|
|
|
# Unit test for UDP reception with AFSK demodulator
|
|
|
|
|
|
|
|
udptest : udp_test.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.c multi_modem.c rrbb.c fcs_calc.c ax25_pad.c decode_aprs.c symbols.c textcolor.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lm
|
|
|
|
./udptest
|
|
|
|
|
|
|
|
|
|
|
|
# Unit test for telemetry decoding.
|
|
|
|
|
|
|
|
|
2015-11-08 01:57:02 +00:00
|
|
|
tlmtest : telemetry.c ax25_pad.c fcs_calc.c textcolor.c
|
2015-09-07 23:56:20 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lm
|
2015-11-08 01:57:02 +00:00
|
|
|
./tlmtest
|
2015-09-07 23:56:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Multiple AGWPE network or serial port clients to test TNCs side by side.
|
|
|
|
|
|
|
|
aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.c
|
|
|
|
$(CC) $(CFLAGS) -g -o $@ $^
|
|
|
|
|
|
|
|
|
2017-12-16 22:00:56 +00:00
|
|
|
# Talk to a KISS TNC.
|
|
|
|
# Note: kiss_frame.c has conditional compilation on KISSUTIL.
|
|
|
|
|
2017-12-19 00:10:57 +00:00
|
|
|
kissutil : kissutil.c kiss_frame.c ax25_pad.o fcs_calc.o textcolor.o serial_port.o dtime_now.o sock.o
|
|
|
|
$(CC) $(CFLAGS) -g -DKISSUTIL -o $@ $^
|
2017-12-16 22:00:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-07 23:56:20 +00:00
|
|
|
# Touch Tone to Speech sample application.
|
|
|
|
|
|
|
|
ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o
|
|
|
|
$(CC) $(CFLAGS) -g -o $@ $^
|
|
|
|
|
|
|
|
|
|
|
|
depend : $(wildcard *.c)
|
|
|
|
makedepend -f $(lastword $(MAKEFILE_LIST)) -- $(CFLAGS) -- $^
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean :
|
2016-05-01 22:46:47 +00:00
|
|
|
rm -f $(APPS) gen_fff \
|
2016-01-24 15:11:17 +00:00
|
|
|
fsk_fast_filter.h *.o *.a use_this_sdk
|
2015-09-07 23:56:20 +00:00
|
|
|
echo " " > tune.h
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: dist-mac
|
|
|
|
dist-mac: direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients log2gpx gen_packets \
|
|
|
|
tocalls.txt symbols-new.txt symbolsX.txt dw-icon.png
|
|
|
|
rm -f ../direwolf_dist_bin.zip
|
|
|
|
(cd .. ; zip direwolf_dist_bin.zip \
|
|
|
|
$(INSTALLDIR)/bin/direwolf \
|
|
|
|
$(INSTALLDIR)/bin/decode_aprs \
|
|
|
|
$(INSTALLDIR)/bin/text2tt \
|
|
|
|
$(INSTALLDIR)/bin/tt2text \
|
|
|
|
$(INSTALLDIR)/bin/ll2utm \
|
|
|
|
$(INSTALLDIR)/bin/utm2ll \
|
|
|
|
$(INSTALLDIR)/bin/aclients \
|
|
|
|
$(INSTALLDIR)/bin/log2gpx \
|
|
|
|
$(INSTALLDIR)/bin/gen_packets \
|
|
|
|
$(INSTALLDIR)/bin/atest \
|
|
|
|
$(INSTALLDIR)/bin/ttcalc \
|
2017-12-16 22:00:56 +00:00
|
|
|
$(INSTALLDIR)/bin/kissutil \
|
2015-09-07 23:56:20 +00:00
|
|
|
$(INSTALLDIR)/bin/dwespeak.sh \
|
|
|
|
$(INSTALLDIR)/share/direwolf/tocalls.txt \
|
|
|
|
$(INSTALLDIR)/share/direwolf/config/direwolf.conf \
|
|
|
|
$(INSTALLDIR)/share/direwolf/symbols-new.txt \
|
|
|
|
$(INSTALLDIR)/share/direwolf/symbolsX.txt \
|
|
|
|
$(INSTALLDIR)/share/direwolf/dw-icon.png \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/README.md \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/CHANGES.md \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/LICENSE-other.txt \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/User-Guide.pdf \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf \
|
|
|
|
$(INSTALLDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf \
|
|
|
|
$(INSTALLDIR)/man/man1/aclients.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/atest.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/decode_aprs.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/direwolf.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/gen_packets.1 \
|
2017-12-16 22:00:56 +00:00
|
|
|
$(INSTALLDIR)/man/man1/kissutil.1 \
|
2015-09-07 23:56:20 +00:00
|
|
|
$(INSTALLDIR)/man/man1/ll2utm.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/log2gpx.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/text2tt.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/tt2text.1 \
|
|
|
|
$(INSTALLDIR)/man/man1/utm2ll.1 \
|
|
|
|
)
|
|
|
|
|
|
|
|
# Package it up for distribution.
|
|
|
|
|
|
|
|
.PHONY: dist-src
|
|
|
|
dist-src : README.md CHANGES.md \
|
|
|
|
doc/User-Guide.pdf doc/Raspberry-Pi-APRS.pdf \
|
|
|
|
doc/Raspberry-Pi-APRS-Tracker.pdf doc/APRStt-Implementation-Notes.pdf \
|
|
|
|
dw-start.sh dwespeak.bat dwespeak.sh \
|
|
|
|
tocalls.txt symbols-new.txt symbolsX.txt direwolf.spec
|
|
|
|
rm -f fsk_fast_filter.h
|
|
|
|
echo " " > tune.h
|
|
|
|
rm -f ../$z-src.zip
|
|
|
|
(cd .. ; zip $z-src.zip \
|
|
|
|
$z/README.md \
|
|
|
|
$z/CHANGES.md \
|
|
|
|
$z/LICENSE* \
|
|
|
|
$z/doc/User-Guide.pdf \
|
|
|
|
$z/doc/Raspberry-Pi-APRS.pdf \
|
|
|
|
$z/doc/Raspberry-Pi-APRS-Tracker.pdf \
|
|
|
|
$z/doc/APRStt-Implementation-Notes.pdf \
|
|
|
|
$z/Makefile* \
|
|
|
|
$z/*.c $z/*.h \
|
|
|
|
$z/regex/* $z/misc/* $z/geotranz/* \
|
|
|
|
$z/man1/* \
|
|
|
|
$z/generic.conf \
|
|
|
|
$z/tocalls.txt $z/symbols-new.txt $z/symbolsX.txt \
|
|
|
|
$z/dw-icon.png $z/dw-icon.rc $z/dw-icon.ico \
|
|
|
|
$z/dw-start.sh $z/direwolf.spec \
|
|
|
|
$z/dwespeak.bat $z/dwespeak.sh \
|
|
|
|
$z/telemetry-toolkit/* )
|
2015-11-08 01:57:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
2016-02-27 20:37:45 +00:00
|
|
|
-diff -Z tocalls.txt~ tocalls.txt
|
2015-11-08 01:57:02 +00:00
|
|
|
cp symbols-new.txt symbols-new.txt~
|
|
|
|
wget http://www.aprs.org/symbols/symbols-new.txt -O symbols-new.txt
|
2016-02-27 20:37:45 +00:00
|
|
|
-diff -Z symbols-new.txt~ symbols-new.txt
|
2015-11-08 01:57:02 +00:00
|
|
|
cp symbolsX.txt symbolsX.txt~
|
|
|
|
wget http://www.aprs.org/symbols/symbolsX.txt -O symbolsX.txt
|
2016-02-27 20:37:45 +00:00
|
|
|
-diff -Z symbolsX.txt~ symbolsX.txt
|