From fcc548923aa05b848b20c2f88f5ebea69587ae44 Mon Sep 17 00:00:00 2001 From: mistermatt2u Date: Thu, 17 Dec 2015 18:30:53 -0500 Subject: [PATCH] More adjustments to Makefile.macosx, now successfully compiles - Re-work logic to determine if make should build gps tracking support. gpsd support can now be tested. - Temporarily remove the output file of unit test 'atest'. Make was erroring out when completing that target for an unknown reason. - Direwolf now compiles sucessfully on OS X 10.11 --- Makefile.macosx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile.macosx b/Makefile.macosx index 1cff6d6..bcc70e6 100644 --- a/Makefile.macosx +++ b/Makefile.macosx @@ -151,12 +151,14 @@ LDLIBS += -framework Foundation -framework CoreServices CFLAGS += -DUSE_PORTAUDIO -I/opt/local/include -# Uncomment following lines to enable GPS interface & tracker function. -# Not available for MacOSX. -# Although MacPorts has gpsd, wonder if it's the same thing. -#CFLAGS += -DENABLE_GPSD -#LDLIBS += -lgps +# Enable GPS interface and tracker function if the gpsd package is installed. + +ifeq ($(shell which -s gpsd),) + CFLAGS += -DENABLE_GPSD + LDLIBS += -lgps +endif + # Name of current directory. # Used to generate zip file name for distribution. @@ -401,7 +403,7 @@ testagc : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o atest : atest.c fsk_fast_filter.h 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 dwgpsnmea.o dwgps.o serial_port.o telemetry.c latlong.c symbols.c textcolor.c tt_text.c - $(CC) $(CFLAGS) -o $@ $^ -lm + $(CC) $(CFLAGS) $^ -lm # Unit test for inner digipeater algorithm @@ -461,6 +463,7 @@ depend : $(wildcard *.c) clean : rm -f direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx gen_fff gen_packets ttcalc \ fsk_fast_filter.h *.o *.a + rm -rf aclients.dSYM echo " " > tune.h