blob: 35890083952c7a8fbf4c043eb2293ca1ed8af6a9 [file] [log] [blame]
// Copyright (C) 2019 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Use the following helpers to define build settings whose value depends on the target
// macOS version in a succinct and future-proof way.
//
// Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
// value 2 in earlier versions, write:
//
// SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
// SMOOTHNESS_MACOS_BEFORE_1012 = 2;
// SMOOTHNESS_MACOS_SINCE_1012 = 3;
//
// Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
// earlier write:
//
// ENABLE_COLOR = ENABLE_COLOR;
// ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
// ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
//
// Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
// macOS 10.13, and a third value in macOS 10.14 and later, write:
//
// EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
// EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
// EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
// EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
// macOS
WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
WK_MACOS_BEFORE_1014_101300 = YES;
WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
WK_MACOS_BEFORE_1015_101300 = YES;
WK_MACOS_BEFORE_1015_101400 = YES;
WK_MACOS_BEFORE_1016 = $(WK_MACOS_BEFORE_1016_$(TARGET_MAC_OS_X_VERSION_MAJOR));
WK_MACOS_BEFORE_1016_101300 = YES;
WK_MACOS_BEFORE_1016_101400 = YES;
WK_MACOS_BEFORE_1016_101500 = YES;
WK_MACOS_BEFORE_1100 = $(WK_MACOS_BEFORE_1100_$(TARGET_MAC_OS_X_VERSION_MAJOR));
WK_MACOS_BEFORE_1100_101300 = YES;
WK_MACOS_BEFORE_1100_101400 = YES;
WK_MACOS_BEFORE_1100_101500 = YES;
WK_MACOS_BEFORE_1200 = $(WK_MACOS_BEFORE_1200_$(TARGET_MAC_OS_X_VERSION_MAJOR));
WK_MACOS_BEFORE_1200_101300 = YES;
WK_MACOS_BEFORE_1200_101400 = YES;
WK_MACOS_BEFORE_1200_101500 = YES;
WK_MACOS_BEFORE_1200_110000 = YES;
WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
WK_MACOS_1014_ = _MACOS_SINCE_1014;
WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
WK_MACOS_1014_1016 = $(WK_MACOS_1014_1016_$(WK_MACOS_BEFORE_1014));
WK_MACOS_1014_1016_ = $(WK_MACOS_1016);
WK_MACOS_1014_1016_YES = _MACOS_BEFORE_1014;
WK_MACOS_1014_1100 = $(WK_MACOS_1014_1100_$(WK_MACOS_BEFORE_1014));
WK_MACOS_1014_1100_ = $(WK_MACOS_1100);
WK_MACOS_1014_1100_YES = _MACOS_BEFORE_1014;
WK_MACOS_1014_1200 = $(WK_MACOS_1014_1200_$(WK_MACOS_BEFORE_1014));
WK_MACOS_1014_1200_ = $(WK_MACOS_1200);
WK_MACOS_1014_1200_YES = _MACOS_BEFORE_1014;
WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
WK_MACOS_1015_ = _MACOS_SINCE_1015;
WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
WK_MACOS_1015_1016 = $(WK_MACOS_1015_1016_$(WK_MACOS_BEFORE_1015));
WK_MACOS_1015_1016_ = $(WK_MACOS_1016);
WK_MACOS_1015_1016_YES = _MACOS_BEFORE_1015;
WK_MACOS_1015_1100 = $(WK_MACOS_1015_1100_$(WK_MACOS_BEFORE_1015));
WK_MACOS_1015_1100_ = $(WK_MACOS_1100);
WK_MACOS_1015_1100_YES = _MACOS_BEFORE_1015;
WK_MACOS_1015_1200 = $(WK_MACOS_1015_1200_$(WK_MACOS_BEFORE_1015));
WK_MACOS_1015_1200_ = $(WK_MACOS_1200);
WK_MACOS_1015_1200_YES = _MACOS_BEFORE_1015;
WK_MACOS_1016 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
WK_MACOS_1016_ = _MACOS_SINCE_1016;
WK_MACOS_1016_YES = _MACOS_BEFORE_1016;
WK_MACOS_1016_1100 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
WK_MACOS_1016_1100 = _MACOS_SINCE_1016;
WK_MACOS_1016_1100_YES = _MACOS_BEFORE_1016;
WK_MACOS_1016_1200 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
WK_MACOS_1016_1200 = _MACOS_SINCE_1016;
WK_MACOS_1016_1200_YES = _MACOS_BEFORE_1016;
WK_MACOS_1100 = $(WK_MACOS_1100_$(WK_MACOS_BEFORE_1100));
WK_MACOS_1100_ = _MACOS_SINCE_1100;
WK_MACOS_1100_YES = _MACOS_BEFORE_1100;
WK_MACOS_1100_1200 = $(WK_MACOS_1100_$(WK_MACOS_BEFORE_1100));
WK_MACOS_1100_1200 = _MACOS_SINCE_1100;
WK_MACOS_1100_1200_YES = _MACOS_BEFORE_1100;
WK_MACOS_1200 = $(WK_MACOS_1200_$(WK_MACOS_BEFORE_1200));
WK_MACOS_1200_ = _MACOS_SINCE_1200;
WK_MACOS_1200_YES = _MACOS_BEFORE_1200;
// iOS
WK_IOS_BEFORE_11 = $(WK_IOS_BEFORE_11_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_12_11 = YES;
WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_13_11 = YES;
WK_IOS_BEFORE_13_12 = YES;
WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_14_11 = YES;
WK_IOS_BEFORE_14_12 = YES;
WK_IOS_BEFORE_14_13 = YES;
WK_IOS_11 = $(WK_IOS_11_$(WK_IOS_BEFORE_11));
WK_IOS_11_ = _IOS_SINCE_11;
WK_IOS_11_YES = _IOS_BEFORE_11;
WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
WK_IOS_12_ = _IOS_SINCE_12;
WK_IOS_12_YES = _IOS_BEFORE_12;
WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
WK_IOS_12_13_ = $(WK_IOS_13);
WK_IOS_12_13_YES = _IOS_BEFORE_12;
WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
WK_IOS_12_14_ = $(WK_IOS_14);
WK_IOS_12_14_YES = _IOS_BEFORE_12;
WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
WK_IOS_13_ = _IOS_SINCE_13;
WK_IOS_13_YES = _IOS_BEFORE_13;
WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
WK_IOS_13_14_ = $(WK_IOS_14);
WK_IOS_13_14_YES = _IOS_BEFORE_13;
WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
WK_IOS_14_ = _IOS_SINCE_14;
WK_IOS_14_YES = _IOS_BEFORE_14;