summaryrefslogtreecommitdiff
path: root/cocoa/Makefile.target
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-02-07 23:29:01 +0000
committerVincent Sanders <vince@kyllikki.org>2016-02-07 23:29:01 +0000
commit75dd6fe6ac2c5e2fb18967185c0543ed9554d836 (patch)
treeca73fc3cd98f42107d26f85fb8bdb1702e4b8571 /cocoa/Makefile.target
parentbbd3302de58fd2a4527d20d0cb4a978ce93fb021 (diff)
downloadnetsurf-75dd6fe6ac2c5e2fb18967185c0543ed9554d836.tar.gz
netsurf-75dd6fe6ac2c5e2fb18967185c0543ed9554d836.tar.bz2
extract cocoa SDK path rather than use pre-defined path
Diffstat (limited to 'cocoa/Makefile.target')
-rw-r--r--cocoa/Makefile.target3
1 files changed, 2 insertions, 1 deletions
diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target
index 19040930d..70b6a5a4c 100644
--- a/cocoa/Makefile.target
+++ b/cocoa/Makefile.target
@@ -22,7 +22,8 @@ endif
# for timerisset()
CFLAGS += -D_DARWIN_C_SOURCE
-SDK_PATH ?= $(DEVELOPER_PATH)/SDKs/MacOSX$(SDK_VERSION).sdk
+SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$/{p=0};p; /OS X SDKs:/{p=1}' | tail -1 | cut -f3)
+SDK_PATH ?= $(shell xcodebuild -version $(SDK_PARAM) Path)
SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(MACOSX_VERSION)
CFLAGS := $(SDK_FLAGS) $(CFLAGS)
LDFLAGS := $(SDK_FLAGS) -Wl,-syslibroot,$(SDK_PATH) $(LDFLAGS)