Skip to content

Fixes to Makefile.macosx #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 14 additions & 43 deletions Makefile.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,11 @@


all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx gen_packets ttcalc direwolf.conf
@echo " "
@echo "Next step install with: "
@echo " "
@echo " sudo make install"
@echo " "
@echo "System SDK's (10.8 - 10.10) must be located here to make use of them. "
@echo " /Developer/SDKs "
@echo " "

SYS_LIBS :=
SYS_MIN :=
SDK := $(shell find /Developer -maxdepth 1 -type d -name "SDKs")
#$(info $$SDK = ${SDK})
ifeq (${SDK},/Developer/SDKs)
SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.8.sdk")
ifeq (${SDK},/Developer/SDKs/MacOSX10.8.sdk)
SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.8.sdk
SYS_MIN := -mmacosx-version-min=10.8
else
SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.9.sdk")
ifeq (${SDK},/Developer/SDKs/MacOSX10.9.sdk)
SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.9.sdk
SYS_MIN := -mmacosx-version-min=10.9
else
SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.10.sdk")
ifeq (${SDK},/Developer/SDKs/MacOSX10.10.sdk)
SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.10.sdk
SYS_MIN := -mmacosx-version-min=10.10
endif
endif
endif
endif
SDK_PATH := $(shell xcrun --show-sdk-path)
SDK_VERSION := $(shell xcrun --show-sdk-version)
SYS_LIBS := -isystem ${SDK_PATH}
SYS_MIN := -mmacosx-version-min=${SDK_VERSION}

EXTRA_CFLAGS :=
DARWIN_CC := $(shell which clang)
Expand All @@ -53,12 +26,7 @@ else
EXTRA_CFLAGS := -fvectorize -fslp-vectorize -fslp-vectorize-aggressive -pthread
endif

# Change as required in support of the available libraries

#CC := $(DARWIN_CC) -m64 $(SYS_LIBS) $(SYS_MIN)
CC := $(DARWIN_CC) -m32 $(SYS_LIBS) $(SYS_MIN)
CFLAGS := -Os -pthread -Igeotranz $(EXTRA_CFLAGS)
# $(info $$CC is [${CC}])

#
# The DSP filters spend a lot of time spinning around in little
Expand Down Expand Up @@ -183,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.
Expand Down Expand Up @@ -433,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

Expand Down Expand Up @@ -491,8 +461,9 @@ depend : $(wildcard *.c)

.PHONY: clean
clean :
rm -f direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx gen_packets ttcalc \
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


Expand Down