Introduce PLATFORM(IOSMAC)
[WebKit-https.git] / Source / WebCore / Configurations / WebCore.xcconfig
1 // Copyright (C) 2009, 2010, 2014 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 #include "FeatureDefines.xcconfig"
25 #include "Version.xcconfig"
26
27 GCC_PREFIX_HEADER = WebCorePrefix.h;
28 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) BUILDING_WEBKIT U_DISABLE_RENAMING=1 U_SHOW_CPLUSPLUS_API=0 GL_SILENCE_DEPRECATION=1 GLES_SILENCE_DEPRECATION=1 $(inherited);
29
30 WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
31 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphone*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
32
33 FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(FRAMEWORK_SEARCH_PATHS_ios_$(CONFIGURATION));
34 FRAMEWORK_SEARCH_PATHS_ios_Debug = $(BUILT_PRODUCTS_DIR) $(WK_PRIVATE_FRAMEWORKS_DIR);
35 FRAMEWORK_SEARCH_PATHS_ios_Release = $(FRAMEWORK_SEARCH_PATHS_ios_Debug);
36 FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR);
37
38 SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks
39
40 LIBRARY_SEARCH_PATHS = $(inherited) "$(WK_LIBWEBRTC_LIBRARY_DIR)";
41 ADDITIONAL_CFLAGS = -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks;
42 OTHER_CFLAGS = $(inherited) $(ADDITIONAL_CFLAGS);
43 OTHER_CPLUSPLUSFLAGS = $(inherited) $(ADDITIONAL_CFLAGS);
44
45 WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
46 LIBWEBRTC_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc $(SDKROOT)/usr/local/include/webrtc $(BUILT_PRODUCTS_DIR)/usr/local/include/webrtc/sdk/objc/Framework/Headers $(SDKROOT)/usr/local/include/webrtc/sdk/objc/Framework/Headers;
47
48 HEADER_SEARCH_PATHS = PAL ForwardingHeaders /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(LIBWEBRTC_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS) $(SRCROOT);
49 INFOPLIST_FILE = Info.plist;
50
51 INSTALL_PATH = $(INSTALL_PATH_$(WK_COCOA_TOUCH));
52 INSTALL_PATH_cocoatouch = $(WK_ALTERNATE_WEBKIT_SDK_PATH)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
53 INSTALL_PATH_ = $(WEBCORE_FRAMEWORKS_DIR);
54
55 DYLIB_INSTALL_NAME_BASE = $(DYLIB_INSTALL_NAME_BASE_PLATFORM);
56 DYLIB_INSTALL_NAME_BASE_PLATFORM[sdk=iphone*] = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
57 DYLIB_INSTALL_NAME_BASE_PLATFORM[sdk=macosx*] = $(DYLIB_INSTALL_NAME_BASE_PLATFORM_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
58 DYLIB_INSTALL_NAME_BASE_PLATFORM_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR);
59 DYLIB_INSTALL_NAME_BASE_PLATFORM_YES = $(DYLIB_INSTALL_NAME_BASE);
60 INSTALLHDRS_COPY_PHASE = YES;
61 INSTALLHDRS_SCRIPT_PHASE = YES;
62 PRODUCT_NAME = WebCore;
63 PRODUCT_BUNDLE_IDENTIFIER = com.apple.$(PRODUCT_NAME:rfc1034identifier);
64 UNEXPORTED_SYMBOLS_FILE = Configurations/WebCore.unexp;
65
66 WK_LIBWEBRTC_LIBRARY_DIR = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Frameworks
67 WK_LIBWEBRTC_LIBRARY_DIR[sdk=macosx*] = $(WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
68 WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
69 WK_LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
70
71 WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME));
72 WK_APPKIT_LDFLAGS_macosx = -framework AppKit;
73
74 WK_APPSUPPORT_LDFLAGS = $(WK_APPSUPPORT_LDFLAGS_$(WK_COCOA_TOUCH));
75 WK_APPSUPPORT_LDFLAGS_cocoatouch = -framework AppSupport;
76
77 WK_AUDIO_UNIT_LDFLAGS = $(WK_AUDIO_UNIT_LDFLAGS_$(WK_PLATFORM_NAME));
78 WK_AUDIO_UNIT_LDFLAGS_macosx = -framework AudioUnit;
79
80 WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME));
81 WK_CARBON_LDFLAGS_macosx = -framework Carbon;
82
83 WK_CORE_UI_LDFLAGS = $(WK_CORE_UI_LDFLAGS_$(WK_PLATFORM_NAME));
84 WK_CORE_UI_LDFLAGS_macosx = -framework CoreUI;
85
86 WK_DATA_DETECTORS_CORE_LDFLAGS = $(WK_DATA_DETECTORS_CORE_LDFLAGS_$(WK_PLATFORM_NAME));
87 WK_DATA_DETECTORS_CORE_LDFLAGS_macosx = -framework DataDetectorsCore;
88
89 WK_DEVICE_IDENTITY_LDFLAGS = $(WK_DEVICE_IDENTITY_LDFLAGS_$(WK_HAVE_DEVICE_IDENTITY));
90 WK_DEVICE_IDENTITY_LDFLAGS_YES = -framework DeviceIdentity;
91
92 WK_GRAPHICS_SERVICES_LDFLAGS = $(WK_GRAPHICS_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
93 WK_GRAPHICS_SERVICES_LDFLAGS_cocoatouch = -framework GraphicsServices;
94
95 WK_IOSURFACE_LDFLAGS = $(WK_IOSURFACE_LDFLAGS_$(WK_PLATFORM_NAME));
96 WK_IOSURFACE_LDFLAGS_iphoneos = -framework IOSurface -framework IOSurfaceAccelerator;
97 WK_IOSURFACE_LDFLAGS_iosmac = -framework IOSurface;
98 WK_IOSURFACE_LDFLAGS_watchos = $(WK_IOSURFACE_LDFLAGS_iphoneos);
99 WK_IOSURFACE_LDFLAGS_appletvos = $(WK_IOSURFACE_LDFLAGS_iphoneos);
100 WK_IOSURFACE_LDFLAGS_macosx = -framework IOSurface;
101
102 WK_LIBWEBRTC_LDFLAGS = $(WK_LIBWEBRTC_LDFLAGS_$(ENABLE_WEB_RTC));
103 WK_LIBWEBRTC_LDFLAGS_ENABLE_WEB_RTC = -framework VideoToolbox -framework CoreMedia -weak-lwebrtc;
104
105 WK_MOBILE_CORE_SERVICES_LDFLAGS = $(WK_MOBILE_CORE_SERVICES_LDFLAGS_$(WK_COCOA_TOUCH));
106 WK_MOBILE_CORE_SERVICES_LDFLAGS_cocoatouch = -framework MobileCoreServices;
107
108 WK_MOBILE_GESTALT_LDFLAGS = $(WK_MOBILE_GESTALT_LDFLAGS_$(WK_COCOA_TOUCH));
109 WK_MOBILE_GESTALT_LDFLAGS_cocoatouch = -lMobileGestalt;
110
111 WK_OPENGL_LDFLAGS = $(WK_OPENGL_LDFLAGS_$(WK_PLATFORM_NAME));
112 WK_OPENGL_LDFLAGS_iphoneos = -framework OpenGLES;
113 WK_OPENGL_LDFLAGS_iosmac = -framework OpenGL;
114 WK_OPENGL_LDFLAGS_iphonesimulator = -framework OpenGLES;
115 WK_OPENGL_LDFLAGS_watchos = $(WK_OPENGL_LDFLAGS_iphoneos);
116 WK_OPENGL_LDFLAGS_watchsimulator = $(WK_OPENGL_LDFLAGS_iphonesimulator);
117 WK_OPENGL_LDFLAGS_appletvos = $(WK_OPENGL_LDFLAGS_iphoneos);
118 WK_OPENGL_LDFLAGS_appletvsimulator = $(WK_OPENGL_LDFLAGS_iphonesimulator);
119 WK_OPENGL_LDFLAGS_macosx = -framework OpenGL;
120
121 WK_SYSTEM_CONFIGURATION_LDFLAGS = $(WK_SYSTEM_CONFIGURATION_LDFLAGS_$(WK_PLATFORM_NAME));
122 WK_SYSTEM_CONFIGURATION_LDFLAGS_macosx = -framework SystemConfiguration;
123
124 WK_SYSTEM_PREVIEW_LDFLAGS = $(WK_SYSTEM_PREVIEW_LDFLAGS_$(WK_PLATFORM_NAME));
125 WK_SYSTEM_PREVIEW_LDFLAGS_iphoneos = -framework CoreImage;
126 WK_SYSTEM_PREVIEW_LDFLAGS_iphonesimulator = -framework CoreImage;
127
128 WK_URL_FORMATTING_LDFLAGS = $(WK_URL_FORMATTING_LDFLAGS_$(WK_HAVE_URL_FORMATTING));
129 WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting;
130
131 // FIXME: Reduce the number of allowable_clients <rdar://problem/31823969>
132 OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_UI_LDFLAGS) $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS);
133
134 OTHER_LDFLAGS_PLATFORM_cocoatouch = -allowable_client WebKit -allowable_client iTunesU -allowable_client Casablanca -allowable_client Remote -allowable_client TVBooks -allowable_client DumpRenderTree -allowable_client WebKitTestRunner -allowable_client TestWebKitAPI;
135 OTHER_LDFLAGS_PLATFORM_macosx = -sub_library libobjc -umbrella WebKit;
136
137 WK_UNDEFINED_SYMBOLS_LDFLAGS[sdk=macosx*] = $(WK_UNDEFINED_SYMBOLS_LDFLAGS$(WK_MACOS_1013));
138 WK_UNDEFINED_SYMBOLS_LDFLAGS_MACOS_BEFORE_1013 = -Wl,-U,_CTFontCreatePhysicalFontForCharactersWithLanguage;
139 WK_UNDEFINED_SYMBOLS_LDFLAGS_MACOS_BEFORE_1013[sdk=macosx10.12*] =;
140
141 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
142 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebCore.order;
143 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,WebCore.order;
144
145 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=iphone*] = $(PRODUCTION_FRAMEWORKS_DIR);
146 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
147
148 WEBCORE_FRAMEWORKS_DIR = $(WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
149 WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR);
150 WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
151
152 NORMAL_PRODUCTION_FRAMEWORKS_DIR[sdk=iphone*] = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
153 NORMAL_PRODUCTION_FRAMEWORKS_DIR[sdk=macosx*] = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks;
154
155 PRODUCTION_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
156 PRODUCTION_FRAMEWORKS_DIR_COCOA_TOUCH_YES = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
157 PRODUCTION_FRAMEWORKS_DIR_COCOA_TOUCH_NO = $(PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
158 PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
159 PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
160
161 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION));
162 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Release = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
163 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Debug = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
164 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
165 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_COCOA_TOUCH_YES = $(SDKROOT)$(WK_ALTERNATE_WEBKIT_SDK_PATH)$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaScriptCore.framework/PrivateHeaders;
166 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_COCOA_TOUCH_NO = $(SDKROOT)$(PRODUCTION_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders;
167 JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders;
168
169 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.tiff *Cursor.png npapi.h npfunctions.h npruntime.h npruntime_internal.h;
170
171 WK_EMPTY_ = YES;
172 WK_NOT_ = YES;
173 WK_NOT_YES = NO;
174
175 WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
176
177 WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
178 WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
179
180 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
181 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_YES = "$(WK_OVERRIDE_FRAMEWORKS_DIR)";
182
183 WK_RELOCATABLE_FRAMEWORK_LDFLAGS = $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS_$(WK_RELOCATABLE_FRAMEWORKS));
184 WK_RELOCATABLE_FRAMEWORK_LDFLAGS_YES = -Wl,-not_for_dyld_shared_cache;
185
186 // Enable InstallAPI support, when built with WEBCORE_ENABLE_INSTALLAPI=YES.
187 SUPPORTS_TEXT_BASED_API = $(SUPPORTS_TEXT_BASED_API_$(TARGET_NAME))
188 SUPPORTS_TEXT_BASED_API_WebCore = $(WEBCORE_ENABLE_INSTALLAPI)
189 TEXT_BASED_API_FILE = WebCore.tbd
190
191 WK_HAVE_DEVICE_IDENTITY = $(WK_HAVE_DEVICE_IDENTITY_$(PLATFORM_NAME));
192 WK_HAVE_DEVICE_IDENTITY_iphoneos = YES;
193
194 WK_HAVE_URL_FORMATTING = $(WK_HAVE_URL_FORMATTING_$(WK_PLATFORM_NAME));
195 WK_HAVE_URL_FORMATTING_iphoneos = $(WK_HAVE_URL_FORMATTING$(WK_IOS_12));
196 WK_HAVE_URL_FORMATTING_iosmac = $(WK_HAVE_URL_FORMATTING$(WK_IOS_12));
197 WK_HAVE_URL_FORMATTING_iphonesimulator = $(WK_HAVE_URL_FORMATTING$(WK_IOS_12));
198 WK_HAVE_URL_FORMATTING_watchos = $(WK_HAVE_URL_FORMATTING$(WK_IOS_12));
199 WK_HAVE_URL_FORMATTING_watchsimulator = $(WK_HAVE_URL_FORMATTING$(WK_IOS_12));
200 WK_HAVE_URL_FORMATTING_appletvos = NO
201 WK_HAVE_URL_FORMATTING_appletvsimulator = NO;
202 WK_HAVE_URL_FORMATTING_macosx = $(WK_HAVE_URL_FORMATTING$(WK_MACOS_1014));
203 WK_HAVE_URL_FORMATTING_MACOS_SINCE_1014 = YES;
204 WK_HAVE_URL_FORMATTING_IOS_SINCE_12 = YES;