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 1 commit
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
Next Next commit
- Replaced logic that determines what version of OS X SDK is installe…
…d, and where. Assuming a location of /Developer produced make errors on 10.11. This is likely due to the fact that XCODE installs to /Applications by default (when installed via App Store).

- Replaced instances of /opt with /usr. Assuming the existence of /opt caused make errors for 10.11. According to 'man hier', the file system hierarchy information, /opt is not used on OS X. If there is a standard location for shared libraries, it is /usr/lib.
  • Loading branch information
mistermatt2u committed Dec 16, 2015
commit b15bf7d016a2e1d7282ff1bd6998db130a3af34f
35 changes: 8 additions & 27 deletions Makefile.macosx
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,10 @@ all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx
@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 Down Expand Up @@ -169,19 +150,19 @@ endif
# Use PortAudio Library

# Force static linking of portaudio if the static library is available.
PA_LIB_STATIC := $(shell find /opt/local/lib -maxdepth 1 -type f -name "libportaudio.a")
PA_LIB_STATIC := $(shell find /usr/local/lib -maxdepth 1 -type f -name "libportaudio.a")
#$(info $$PA_LIB_STATIC is [${PA_LIB_STATIC}])
ifeq (${PA_LIB_STATIC},)
LDLIBS += -L/opt/local/lib -lportaudio
LDLIBS += -L/usr/local/lib -lportaudio
else
LDLIBS += /opt/local/lib/libportaudio.a
LDLIBS += /usr/local/lib/libportaudio.a
endif

# Include libraries portaudio requires.
LDLIBS += -framework CoreAudio -framework AudioUnit -framework AudioToolbox
LDLIBS += -framework Foundation -framework CoreServices

CFLAGS += -DUSE_PORTAUDIO -I/opt/local/include
CFLAGS += -DUSE_PORTAUDIO -I/usr/local/include

# Uncomment following lines to enable GPS interface & tracker function.
# Not available for MacOSX.
Expand Down