mirror of https://github.com/wb2osz/direwolf.git
				
				
				
			- 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.
This commit is contained in:
		
							parent
							
								
									d653a534c4
								
							
						
					
					
						commit
						b15bf7d016
					
				| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue