blob: 90d0b5ab07269fc06dcf2888ba14b8b1130947c6 [file] [log] [blame]
// Copyright (C) 2018 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_BEFORE_1300 = $(WK_MACOS_BEFORE_1300_$(TARGET_MAC_OS_X_VERSION_MAJOR));
WK_MACOS_BEFORE_1300_101300 = YES;
WK_MACOS_BEFORE_1300_101400 = YES;
WK_MACOS_BEFORE_1300_101500 = YES;
WK_MACOS_BEFORE_1300_110000 = YES;
WK_MACOS_BEFORE_1300_120000 = 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_1014_1300 = $(WK_MACOS_1014_1300_$(WK_MACOS_BEFORE_1014));
WK_MACOS_1014_1300_ = $(WK_MACOS_1300);
WK_MACOS_1014_1300_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_1015_1300 = $(WK_MACOS_1015_1300_$(WK_MACOS_BEFORE_1015));
WK_MACOS_1015_1300_ = $(WK_MACOS_1300);
WK_MACOS_1015_1300_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_1016_1300 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
WK_MACOS_1016_1300 = _MACOS_SINCE_1016;
WK_MACOS_1016_1300_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_1100_1300 = $(WK_MACOS_1100_$(WK_MACOS_BEFORE_1100));
WK_MACOS_1100_1300 = _MACOS_SINCE_1100;
WK_MACOS_1100_1300_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;
WK_MACOS_1200_1300 = $(WK_MACOS_1200_$(WK_MACOS_BEFORE_1200));
WK_MACOS_1200_1300 = _MACOS_SINCE_1200;
WK_MACOS_1200_1300_YES = _MACOS_BEFORE_1200;
WK_MACOS_1300 = $(WK_MACOS_1300_$(WK_MACOS_BEFORE_1300));
WK_MACOS_1300_ = _MACOS_SINCE_1300;
WK_MACOS_1300_YES = _MACOS_BEFORE_1300;
// iOS
WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_14_13 = YES;
WK_IOS_BEFORE_15 = $(WK_IOS_BEFORE_15_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_15_13 = YES;
WK_IOS_BEFORE_15_14 = YES;
WK_IOS_BEFORE_16 = $(WK_IOS_BEFORE_16_$(IPHONEOS_DEPLOYMENT_TARGET:base));
WK_IOS_BEFORE_16_13 = YES;
WK_IOS_BEFORE_16_14 = YES;
WK_IOS_BEFORE_16_15 = YES;
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_13_15 = $(WK_IOS_13_15_$(WK_IOS_BEFORE_13));
WK_IOS_13_15_ = $(WK_IOS_15);
WK_IOS_13_15_YES = _IOS_BEFORE_13;
WK_IOS_13_16 = $(WK_IOS_13_16_$(WK_IOS_BEFORE_13));
WK_IOS_13_16_ = $(WK_IOS_16);
WK_IOS_13_16_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;
WK_IOS_14_15 = $(WK_IOS_14_15_$(WK_IOS_BEFORE_14));
WK_IOS_14_15_ = $(WK_IOS_15);
WK_IOS_14_15_YES = _IOS_BEFORE_14;
WK_IOS_14_16 = $(WK_IOS_14_16_$(WK_IOS_BEFORE_14));
WK_IOS_14_16_ = $(WK_IOS_16);
WK_IOS_14_16_YES = _IOS_BEFORE_14;
WK_IOS_15 = $(WK_IOS_15_$(WK_IOS_BEFORE_15));
WK_IOS_15_ = _IOS_SINCE_15;
WK_IOS_15_YES = _IOS_BEFORE_15;
WK_IOS_15_16 = $(WK_IOS_15_16_$(WK_IOS_BEFORE_15));
WK_IOS_15_16_ = $(WK_IOS_16);
WK_IOS_15_16_YES = _IOS_BEFORE_15;
WK_IOS_16 = $(WK_IOS_16_$(WK_IOS_BEFORE_16));
WK_IOS_16_ = _IOS_SINCE_16;
WK_IOS_16_YES = _IOS_BEFORE_16;