Weak link the GameController.framework on macOS.
[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) $(inherited);
29
30 WK_XCODE_SUPPORTS_TEXT_BASED_STUBS = $(WK_NOT_$(WK_EMPTY_$(TAPI_VERIFY_MODE)));
31 WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
32 WK_PRIVATE_FRAMEWORKS_DIR_YES = $(PRODUCTION_FRAMEWORKS_DIR);
33 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphonesimulator*] = $(PRODUCTION_FRAMEWORKS_DIR);
34 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphoneos*] = $(WK_PRIVATE_FRAMEWORKS_DIR_iphoneos_$(WK_XCODE_SUPPORTS_TEXT_BASED_STUBS));
35 WK_PRIVATE_FRAMEWORKS_DIR_iphoneos_YES = $(SRCROOT)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
36 WK_PRIVATE_FRAMEWORKS_DIR_iphoneos_NO = $(PRODUCTION_FRAMEWORKS_DIR);
37
38 FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(FRAMEWORK_SEARCH_PATHS_ios_$(CONFIGURATION));
39 FRAMEWORK_SEARCH_PATHS_ios_Debug = $(BUILT_PRODUCTS_DIR) $(WK_PRIVATE_FRAMEWORKS_DIR);
40 FRAMEWORK_SEARCH_PATHS_ios_Release = $(FRAMEWORK_SEARCH_PATHS_ios_Debug);
41 FRAMEWORK_SEARCH_PATHS_ios_Production = $(PRODUCTION_FRAMEWORKS_DIR);
42 FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR) $(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
43
44 OTHER_CFLAGS = $(inherited) -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 -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
45 OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS);
46
47 WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
48
49 HEADER_SEARCH_PATHS = ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 "$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS);
50 INFOPLIST_FILE = Info.plist;
51 INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
52 INSTALL_PATH[sdk=macosx*] = $(WEBCORE_FRAMEWORKS_DIR);
53 DYLIB_INSTALL_NAME_BASE = $(DYLIB_INSTALL_NAME_BASE_PLATFORM);
54 DYLIB_INSTALL_NAME_BASE_PLATFORM[sdk=iphone*] = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
55 DYLIB_INSTALL_NAME_BASE_PLATFORM[sdk=macosx*] = $(NORMAL_WEBCORE_FRAMEWORKS_DIR);
56 INSTALLHDRS_COPY_PHASE = YES;
57 INSTALLHDRS_SCRIPT_PHASE = YES;
58 PRODUCT_NAME = WebCore;
59 UNEXPORTED_SYMBOLS_FILE = Configurations/WebCore.unexp;
60
61 WK_PREFIXED_IPHONEOS_DEPLOYMENT_TARGET = V$(IPHONEOS_DEPLOYMENT_TARGET);
62
63 WK_IOS_BINCOMPAT_LDFLAGS = $(WK_IOS_BINCOMPAT_LDFLAGS_$(WK_PREFIXED_IPHONEOS_DEPLOYMENT_TARGET:identifier));
64 WK_IOS_BINCOMPAT_LDFLAGS_V9_0 = -Wl,-reexport_library,$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/PhonyWebKitLegacy/WebKitLegacy.framework/WebKitLegacy.tbd;
65 WK_IOS_BINCOMPAT_LDFLAGS_V9_3 = $(WK_IOS_BINCOMPAT_LDFLAGS_V9_0);
66 WK_IOS_BINCOMPAT_LDFLAGS_V10_0 = $(WK_IOS_BINCOMPAT_LDFLAGS_V9_3);
67
68 WK_GAMECONTROLLER_LDFLAGS = $(WK_GAMECONTROLLER_LDFLAGS_$(ENABLE_GAMEPAD));
69 WK_GAMECONTROLLER_LDFLAGS_ENABLE_GAMEPAD[sdk=iphone*] = -framework GameController;
70 WK_GAMECONTROLLER_LDFLAGS_ENABLE_GAMEPAD[sdk=macosx*] = -weak_framework GameController;
71
72 OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM) $(WK_GAMECONTROLLER_LDFLAGS);
73 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE;
74 OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework OpenGLES -lMobileGestalt $(WK_IOS_BINCOMPAT_LDFLAGS);
75 OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface;
76 OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = $(OTHER_LDFLAGS_BASE_ios);
77 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client WebKit2 -allowable_client WebKitLegacy -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework CoreAudio -framework DataDetectorsCore -framework IOSurface -framework OpenGL -framework SystemConfiguration;
78
79 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
80 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebCore.order;
81 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,WebCore.order;
82
83 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=iphone*] = $(PRODUCTION_FRAMEWORKS_DIR);
84 NORMAL_WEBCORE_FRAMEWORKS_DIR[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
85
86 WEBCORE_FRAMEWORKS_DIR = $(WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
87 WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_WEBCORE_FRAMEWORKS_DIR);
88 WEBCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
89
90 NORMAL_PRODUCTION_FRAMEWORKS_DIR[sdk=iphone*] = $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
91 NORMAL_PRODUCTION_FRAMEWORKS_DIR[sdk=macosx*] = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks;
92
93 PRODUCTION_FRAMEWORKS_DIR[sdk=iphone*] = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
94 PRODUCTION_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
95 PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(NORMAL_PRODUCTION_FRAMEWORKS_DIR);
96 PRODUCTION_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
97
98 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION));
99 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Release = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
100 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Debug = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
101 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production[sdk=iphone*] = $(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaScriptCore.framework/PrivateHeaders;
102 JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production[sdk=macosx*] = $(SDKROOT)$(PRODUCTION_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders;
103 JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders;
104
105 EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS = $(EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS_IF_ENABLED_$(ENABLE_TOUCH_EVENTS));
106 EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS_IF_ENABLED_ = JSTouch*;
107
108 EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS = $(EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS_IF_ENABLED_$(ENABLE_IOS_GESTURE_EVENTS)$(ENABLE_MAC_GESTURE_EVENTS));
109 EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS_IF_ENABLED_ = JSGesture* DOMGesture*;
110
111 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm RunLoopMac.mm SSLKeyGeneratorMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreView.m WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm DisplayRefreshMonitorMac.cpp npapi.h npfunctions.h npruntime.h npruntime_internal.h $(EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS) $(EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS);
112 EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.h *IOS.cpp *IOS.mm KillRingNone.cpp WAKAppKitStubs.h WAKClipView.h WAKResponder.h WAKScrollView.h WAKView.h WAKViewPrivate.h WAKWindow.h WKContentObservation.h WKGraphics.h WKTypes.h WKUtilities.h WKView.h WKViewPrivate.h WebCoreThread.h WebCoreThreadMessage.h WebCoreThreadRun.h WebCoreThreadSystemInterface.h $(EXCLUDED_SOURCE_FILE_NAMES_FOR_TOUCH_EVENTS) $(EXCLUDED_SOURCE_FILE_NAMES_FOR_GESTURE_EVENTS);
113
114 WK_EMPTY_ = YES;
115 WK_NOT_ = YES;
116 WK_NOT_YES = NO;
117
118 WK_USE_OVERRIDE_FRAMEWORKS_DIR = $(WK_NOT_$(WK_EMPTY_$(WK_OVERRIDE_FRAMEWORKS_DIR)));
119
120 WK_OVERRIDE_FRAMEWORKS_DIR = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_$(USE_STAGING_INSTALL_PATH));
121 WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
122
123 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
124 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_YES = "$(WK_OVERRIDE_FRAMEWORKS_DIR)";
125
126 // Enable InstallAPI support, when built with WEBCORE_ENABLE_INSTALLAPI=YES.
127 SUPPORTS_TEXT_BASED_API = $(SUPPORTS_TEXT_BASED_API_$(TARGET_NAME))
128 SUPPORTS_TEXT_BASED_API_WebCore = $(WEBCORE_ENABLE_INSTALLAPI)
129 TEXT_BASED_API_FILE = WebCore.tbd