summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Weidauer <sven@5sw.de>2017-06-25 08:50:13 (GMT)
committer Sven Weidauer <sven@5sw.de>2017-06-25 08:50:13 (GMT)
commit4051cd95a4c0443d814b9df6938d5bcdb0b6d077 (patch)
tree2c770335414b5f19c53eeb4b2458dc55f57b384c
parent42bf8a713d8ba06785407671cf5753694289c6b8 (diff)
downloadnetsurf-4051cd95a4c0443d814b9df6938d5bcdb0b6d077.tar.gz
netsurf-4051cd95a4c0443d814b9df6938d5bcdb0b6d077.tar.bz2
Set deployment target independent of base SDK, with default value of 10.7.
-rw-r--r--frontends/cocoa/Makefile21
-rw-r--r--frontends/cocoa/Makefile.defaults2
2 files changed, 12 insertions, 11 deletions
diff --git a/frontends/cocoa/Makefile b/frontends/cocoa/Makefile
index c5d329b..0febfbb 100644
--- a/frontends/cocoa/Makefile
+++ b/frontends/cocoa/Makefile
@@ -19,16 +19,14 @@ else
endif
endif
-ifeq ($(SDK_VERSION),)
- # if no SDK_VERSION has been specified select one from those available
- SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$$/{p=0};p; /(OS X|macOS) SDKs:/{p=1}' | head -1 | cut -f3)
- SDK_VERSION := $(MACOSX_VERSION)
-else
- SDK_PARAM := -sdk macosx$(SDK_VERSION)
+SDK_PARAM := $(shell xcodebuild -showsdks | awk '/^$$/{p=0};p; /(OS X|macOS) SDKs:/{p=1}' | head -1 | cut -f3)
+
+ifeq ($(DEPLOYMENT_TARGET),)
+ DEPLOYMENT_TARGET := 10.7
endif
SDK_PATH ?= $(shell xcodebuild -version $(SDK_PARAM) Path)
-SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(SDK_VERSION)
+SDK_FLAGS := -isysroot $(SDK_PATH) -mmacosx-version-min=$(DEPLOYMENT_TARGET)
CFLAGS := $(SDK_FLAGS) $(CFLAGS)
LDFLAGS := $(SDK_FLAGS) -Wl,-syslibroot,$(SDK_PATH) $(LDFLAGS)
CXXFLAGS := $(SDK_FLAGS) $(CXXFLAGS)
@@ -41,7 +39,7 @@ LDFLAGS += -L/usr/X11/lib
LDFLAGS += -lm -lcurl
LDFLAGS += -lssl -lcrypto
-CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -g -Os -fobjc-arc
+CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -fobjc-arc
CFLAGS += -I/usr/X11/include
CFLAGS += -include cocoa/Prefix.pch
@@ -61,6 +59,11 @@ ifneq ($(UNIVERSAL),)
CXXFLAGS += $(UNIVERSAL_FLAGS)
endif
+
+ifeq ($(VARIANT),debug)
+ CFLAGS += -g
+endif
+
# ----------------------------------------------------------------------------
# Source file setup
# ----------------------------------------------------------------------------
@@ -220,7 +223,7 @@ NetSurf.app/Contents/Info.plist: $(FRONTEND_RESOURCES_DIR)/NetSurf-Info.plist $(
$(Q)$(MKDIR) -p NetSurf.app/Contents
$(Q)sed -e 's/$${EXECUTABLE_NAME}/$(EXETARGET)/' \
-e 's/$${PRODUCT_NAME.*}/$(EXETARGET)/' \
- -e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(MACOSX_VERSION)/' \
+ -e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(DEPLOYMENT_TARGET)/' \
-e 's/$${NETSURF_VERSION}/$(VERSION_FULL)/' \
-e 's/$${NETSURF_SHORT_VERSION}/$(VERSION_MAJ).$(VERSION_MIN)/' \
< $(FRONTEND_RESOURCES_DIR)/NetSurf-Info.plist > NetSurf.app/Contents/Info.plist
diff --git a/frontends/cocoa/Makefile.defaults b/frontends/cocoa/Makefile.defaults
index 8f5792b..49e570c 100644
--- a/frontends/cocoa/Makefile.defaults
+++ b/frontends/cocoa/Makefile.defaults
@@ -26,5 +26,3 @@ NETSURF_USE_IMAGEIO := YES
MACOSX_VERSION := $(shell sw_vers -productVersion | awk -F '.' '{print $$1 "." $$2}')
-# Optimisation levels
-CFLAGS += -O2