Make WKObjectRegistry objects be per page
[WebKit-https.git] / Source / WebKit2 / DerivedSources.make
1 # Copyright (C) 2010, 2011, 2012, 2013 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. AND ITS CONTRIBUTORS ``AS IS'' AND
13 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23 VPATH = \
24     $(WebKit2) \
25     $(WebKit2)/DatabaseProcess \
26     $(WebKit2)/DatabaseProcess/IndexedDB \
27     $(WebKit2)/NetworkProcess \
28     $(WebKit2)/NetworkProcess/mac \
29     $(WebKit2)/PluginProcess \
30     $(WebKit2)/PluginProcess/mac \
31     $(WebKit2)/Shared/Plugins \
32     $(WebKit2)/Shared \
33     $(WebKit2)/Shared/API/Cocoa \
34     $(WebKit2)/Shared/Authentication \
35     $(WebKit2)/Shared/Network/CustomProtocols \
36     $(WebKit2)/Shared/mac \
37     $(WebKit2)/WebProcess/ApplicationCache \
38     $(WebKit2)/WebProcess/Cookies \
39     $(WebKit2)/WebProcess/Databases/IndexedDB \
40     $(WebKit2)/WebProcess/FullScreen \
41     $(WebKit2)/WebProcess/Geolocation \
42     $(WebKit2)/WebProcess/IconDatabase \
43     $(WebKit2)/WebProcess/MediaCache \
44     $(WebKit2)/WebProcess/Network \
45     $(WebKit2)/WebProcess/Notifications \
46     $(WebKit2)/WebProcess/OriginData \
47     $(WebKit2)/WebProcess/Plugins \
48     $(WebKit2)/WebProcess/ResourceCache \
49     $(WebKit2)/WebProcess/Storage \
50     $(WebKit2)/WebProcess/WebCoreSupport \
51     $(WebKit2)/WebProcess/WebPage \
52     $(WebKit2)/WebProcess \
53     $(WebKit2)/UIProcess \
54     $(WebKit2)/UIProcess/Databases \
55     $(WebKit2)/UIProcess/Downloads \
56     $(WebKit2)/UIProcess/Network \
57     $(WebKit2)/UIProcess/Network/CustomProtocols \
58     $(WebKit2)/UIProcess/Notifications \
59     $(WebKit2)/UIProcess/Plugins \
60     $(WebKit2)/UIProcess/Storage \
61     $(WebKit2)/UIProcess/mac \
62 #
63
64 MESSAGE_RECEIVERS = \
65     AuthenticationManager \
66     CustomProtocolManager \
67     CustomProtocolManagerProxy \
68     DatabaseProcess \
69     DatabaseProcessIDBConnection \
70     DatabaseProcessProxy \
71     DatabaseToWebProcessConnection \
72     DownloadProxy \
73     DrawingArea \
74     DrawingAreaProxy \
75     EventDispatcher \
76     NPObjectMessageReceiver \
77     NetworkConnectionToWebProcess \
78     NetworkProcess \
79     NetworkProcessConnection \
80     NetworkProcessProxy \
81     NetworkResourceLoader \
82     PluginControllerProxy \
83     PluginProcess \
84     PluginProcessConnection \
85     PluginProcessConnectionManager \
86     PluginProcessProxy \
87     PluginProxy \
88     RemoteLayerTreeHost \
89     RemoteObjectRegistry \
90     SecItemShim \
91     SecItemShimProxy \
92     StorageAreaMap \
93     StorageManager \
94     ViewGestureController \
95     WebApplicationCacheManager \
96     WebApplicationCacheManagerProxy \
97     WebConnection \
98     WebContext \
99     WebCookieManager \
100     WebCookieManagerProxy \
101     WebDatabaseManager \
102     WebDatabaseManagerProxy \
103     WebFullScreenManager \
104     WebFullScreenManagerProxy \
105     WebGeolocationManager \
106     WebGeolocationManagerProxy \
107     WebIDBServerConnection \
108     WebIconDatabase \
109     WebIconDatabaseProxy \
110     WebInspector \
111     WebInspectorProxy \
112     WebMediaCacheManager \
113     WebMediaCacheManagerProxy \
114     WebNotificationManager \
115     WebOriginDataManager \
116     WebOriginDataManagerProxy \
117     WebPage \
118     WebPageGroupProxy \
119     WebPageProxy \
120     WebProcess \
121     WebProcessConnection \
122     WebProcessProxy \
123     WebResourceCacheManager \
124     WebResourceCacheManagerProxy \
125     WebResourceLoader \
126 #
127
128 SCRIPTS = \
129     $(WebKit2)/Scripts/generate-message-receiver.py \
130     $(WebKit2)/Scripts/generate-messages-header.py \
131     $(WebKit2)/Scripts/webkit2/__init__.py \
132     $(WebKit2)/Scripts/webkit2/messages.py \
133     $(WebKit2)/Scripts/webkit2/model.py \
134     $(WebKit2)/Scripts/webkit2/parser.py \
135 #
136
137 .PHONY : all
138
139 all : \
140     $(MESSAGE_RECEIVERS:%=%MessageReceiver.cpp) \
141     $(MESSAGE_RECEIVERS:%=%Messages.h) \
142 #
143
144 %MessageReceiver.cpp : %.messages.in $(SCRIPTS)
145         @echo Generating messages header for $*...
146         @python $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
147
148 %Messages.h : %.messages.in $(SCRIPTS)
149         @echo Generating message receiver for $*...
150         @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
151
152
153 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
154 HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
155
156 # Some versions of clang incorrectly strip out // comments in c89 code.
157 # Use -traditional as a workaround, but only when needed since that causes
158 # other problems with later versions of clang.
159 ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
160 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
161 else
162 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
163 endif
164
165 ifneq ($(SDKROOT),)
166         SDK_FLAGS=-isysroot $(SDKROOT)
167 endif
168
169 SANDBOX_PROFILES = \
170         com.apple.WebProcess.sb \
171         com.apple.WebKit.NetworkProcess.sb
172
173 all: $(SANDBOX_PROFILES)
174
175 %.sb : %.sb.in
176         @echo Pre-processing $* sandbox profile...
177         $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
178