Skip to content

Commit b15bf7d

Browse files
committed
- Replaced logic that determines what version of OS X SDK is installed, 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.
1 parent d653a53 commit b15bf7d

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

Diff for: Makefile.macosx

+8-27
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,10 @@ all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx
2020
@echo " /Developer/SDKs "
2121
@echo " "
2222

23-
SYS_LIBS :=
24-
SYS_MIN :=
25-
SDK := $(shell find /Developer -maxdepth 1 -type d -name "SDKs")
26-
#$(info $$SDK = ${SDK})
27-
ifeq (${SDK},/Developer/SDKs)
28-
SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.8.sdk")
29-
ifeq (${SDK},/Developer/SDKs/MacOSX10.8.sdk)
30-
SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.8.sdk
31-
SYS_MIN := -mmacosx-version-min=10.8
32-
else
33-
SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.9.sdk")
34-
ifeq (${SDK},/Developer/SDKs/MacOSX10.9.sdk)
35-
SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.9.sdk
36-
SYS_MIN := -mmacosx-version-min=10.9
37-
else
38-
SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.10.sdk")
39-
ifeq (${SDK},/Developer/SDKs/MacOSX10.10.sdk)
40-
SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.10.sdk
41-
SYS_MIN := -mmacosx-version-min=10.10
42-
endif
43-
endif
44-
endif
45-
endif
23+
SDK_PATH := $(shell xcrun --show-sdk-path)
24+
SDK_VERSION := $(shell xcrun --show-sdk-version)
25+
SYS_LIBS := -isystem ${SDK_PATH}
26+
SYS_MIN := -mmacosx-version-min=${SDK_VERSION}
4627

4728
EXTRA_CFLAGS :=
4829
DARWIN_CC := $(shell which clang)
@@ -169,19 +150,19 @@ endif
169150
# Use PortAudio Library
170151

171152
# Force static linking of portaudio if the static library is available.
172-
PA_LIB_STATIC := $(shell find /opt/local/lib -maxdepth 1 -type f -name "libportaudio.a")
153+
PA_LIB_STATIC := $(shell find /usr/local/lib -maxdepth 1 -type f -name "libportaudio.a")
173154
#$(info $$PA_LIB_STATIC is [${PA_LIB_STATIC}])
174155
ifeq (${PA_LIB_STATIC},)
175-
LDLIBS += -L/opt/local/lib -lportaudio
156+
LDLIBS += -L/usr/local/lib -lportaudio
176157
else
177-
LDLIBS += /opt/local/lib/libportaudio.a
158+
LDLIBS += /usr/local/lib/libportaudio.a
178159
endif
179160

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

184-
CFLAGS += -DUSE_PORTAUDIO -I/opt/local/include
165+
CFLAGS += -DUSE_PORTAUDIO -I/usr/local/include
185166

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

0 commit comments

Comments
 (0)