Update macOS version macros
[WebKit-https.git] / Source / WebCore / Configurations / WebKitTargetConditionals.xcconfig
1 // Copyright (C) 2018 Apple Inc. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions
5 // are met:
6 // 1. Redistributions of source code must retain the above copyright
7 //    notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright
9 //    notice, this list of conditions and the following disclaimer in the
10 //    documentation and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
16 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24 // Use the following helpers to define build settings whose value depends on the target
25 // macOS version in a succinct and future-proof way.
26 //
27 // Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
28 // value 2 in earlier versions, write:
29 //
30 //     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
31 //     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
32 //     SMOOTHNESS_MACOS_SINCE_1012 = 3;
33 //
34 // Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
35 // earlier write:
36 //
37 //     ENABLE_COLOR = ENABLE_COLOR;
38 //     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
39 //     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
40 //
41 // Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
42 // macOS 10.13, and a third value in macOS 10.14 and later, write:
43 //
44 //     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
45 //     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
46 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
47 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
48
49 // macOS
50
51 WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
52 WK_MACOS_BEFORE_1014_101300 = YES;
53
54 WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
55 WK_MACOS_BEFORE_1015_101300 = YES;
56 WK_MACOS_BEFORE_1015_101400 = YES;
57
58 WK_MACOS_BEFORE_1016 = $(WK_MACOS_BEFORE_1016_$(TARGET_MAC_OS_X_VERSION_MAJOR));
59 WK_MACOS_BEFORE_1016_101300 = YES;
60 WK_MACOS_BEFORE_1016_101400 = YES;
61 WK_MACOS_BEFORE_1016_101500 = YES;
62
63 WK_MACOS_BEFORE_1100 = $(WK_MACOS_BEFORE_1100_$(TARGET_MAC_OS_X_VERSION_MAJOR));
64 WK_MACOS_BEFORE_1100_101300 = YES;
65 WK_MACOS_BEFORE_1100_101400 = YES;
66 WK_MACOS_BEFORE_1100_101500 = YES;
67
68 WK_MACOS_BEFORE_1017 = $(WK_MACOS_BEFORE_1017_$(TARGET_MAC_OS_X_VERSION_MAJOR));
69 WK_MACOS_BEFORE_1017_101300 = YES;
70 WK_MACOS_BEFORE_1017_101400 = YES;
71 WK_MACOS_BEFORE_1017_101500 = YES;
72 WK_MACOS_BEFORE_1017_101600 = YES;
73 WK_MACOS_BEFORE_1017_110000 = YES;
74
75 WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
76 WK_MACOS_1014_ = _MACOS_SINCE_1014;
77 WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
78
79 WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
80 WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
81 WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
82
83 WK_MACOS_1014_1016 = $(WK_MACOS_1014_1016_$(WK_MACOS_BEFORE_1014));
84 WK_MACOS_1014_1016_ = $(WK_MACOS_1016);
85 WK_MACOS_1014_1016_YES = _MACOS_BEFORE_1014;
86
87 WK_MACOS_1014_1100 = $(WK_MACOS_1014_1100_$(WK_MACOS_BEFORE_1014));
88 WK_MACOS_1014_1100_ = $(WK_MACOS_1100);
89 WK_MACOS_1014_1100_YES = _MACOS_BEFORE_1014;
90
91 WK_MACOS_1014_1017 = $(WK_MACOS_1014_1017_$(WK_MACOS_BEFORE_1014));
92 WK_MACOS_1014_1017_ = $(WK_MACOS_1017);
93 WK_MACOS_1014_1017_YES = _MACOS_BEFORE_1014;
94
95 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
96 WK_MACOS_1015_ = _MACOS_SINCE_1015;
97 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
98
99 WK_MACOS_1015_1016 = $(WK_MACOS_1015_1016_$(WK_MACOS_BEFORE_1015));
100 WK_MACOS_1015_1016_ = $(WK_MACOS_1016);
101 WK_MACOS_1015_1016_YES = _MACOS_BEFORE_1015;
102
103 WK_MACOS_1015_1100 = $(WK_MACOS_1015_1100_$(WK_MACOS_BEFORE_1015));
104 WK_MACOS_1015_1100_ = $(WK_MACOS_1100);
105 WK_MACOS_1015_1100_YES = _MACOS_BEFORE_1015;
106
107 WK_MACOS_1015_1017 = $(WK_MACOS_1015_1017_$(WK_MACOS_BEFORE_1015));
108 WK_MACOS_1015_1017_ = $(WK_MACOS_1017);
109 WK_MACOS_1015_1017_YES = _MACOS_BEFORE_1015;
110
111 WK_MACOS_1016 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
112 WK_MACOS_1016_ = _MACOS_SINCE_1016;
113 WK_MACOS_1016_YES = _MACOS_BEFORE_1016;
114
115 WK_MACOS_1016_1100 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
116 WK_MACOS_1016_1100 = _MACOS_SINCE_1016;
117 WK_MACOS_1016_1100_YES = _MACOS_BEFORE_1016;
118
119 WK_MACOS_1016_1017 = $(WK_MACOS_1016_$(WK_MACOS_BEFORE_1016));
120 WK_MACOS_1016_1017 = _MACOS_SINCE_1016;
121 WK_MACOS_1016_1017_YES = _MACOS_BEFORE_1016;
122
123 WK_MACOS_1100 = $(WK_MACOS_1100_$(WK_MACOS_BEFORE_1100));
124 WK_MACOS_1100_ = _MACOS_SINCE_1100;
125 WK_MACOS_1100_YES = _MACOS_BEFORE_1100;
126
127 WK_MACOS_1100_1017 = $(WK_MACOS_1100_$(WK_MACOS_BEFORE_1100));
128 WK_MACOS_1100_1017 = _MACOS_SINCE_1100;
129 WK_MACOS_1100_1017_YES = _MACOS_BEFORE_1100;
130
131 WK_MACOS_1017 = $(WK_MACOS_1017_$(WK_MACOS_BEFORE_1017));
132 WK_MACOS_1017_ = _MACOS_SINCE_1017;
133 WK_MACOS_1017_YES = _MACOS_BEFORE_1017;
134
135 // iOS
136
137 WK_IOS_BEFORE_11 = $(WK_IOS_BEFORE_11_$(IPHONEOS_DEPLOYMENT_TARGET:base));
138
139 WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
140 WK_IOS_BEFORE_12_11 = YES;
141
142 WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
143 WK_IOS_BEFORE_13_11 = YES;
144 WK_IOS_BEFORE_13_12 = YES;
145
146 WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
147 WK_IOS_BEFORE_14_11 = YES;
148 WK_IOS_BEFORE_14_12 = YES;
149 WK_IOS_BEFORE_14_13 = YES;
150
151 WK_IOS_11 = $(WK_IOS_11_$(WK_IOS_BEFORE_11));
152 WK_IOS_11_ = _IOS_SINCE_11;
153 WK_IOS_11_YES = _IOS_BEFORE_11;
154
155 WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
156 WK_IOS_12_ = _IOS_SINCE_12;
157 WK_IOS_12_YES = _IOS_BEFORE_12;
158
159 WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
160 WK_IOS_12_13_ = $(WK_IOS_13);
161 WK_IOS_12_13_YES = _IOS_BEFORE_12;
162
163 WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
164 WK_IOS_12_14_ = $(WK_IOS_14);
165 WK_IOS_12_14_YES = _IOS_BEFORE_12;
166
167 WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
168 WK_IOS_13_ = _IOS_SINCE_13;
169 WK_IOS_13_YES = _IOS_BEFORE_13;
170
171 WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
172 WK_IOS_13_14_ = $(WK_IOS_14);
173 WK_IOS_13_14_YES = _IOS_BEFORE_13;
174
175 WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
176 WK_IOS_14_ = _IOS_SINCE_14;
177 WK_IOS_14_YES = _IOS_BEFORE_14;