b5cfd7f81d5a9f3eb26962bd19d335bf22538347
[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/Scrolling \
50     $(WebKit2)/WebProcess/Storage \
51     $(WebKit2)/WebProcess/WebCoreSupport \
52     $(WebKit2)/WebProcess/WebPage \
53     $(WebKit2)/WebProcess/ios \
54     $(WebKit2)/WebProcess \
55     $(WebKit2)/UIProcess \
56     $(WebKit2)/UIProcess/Databases \
57     $(WebKit2)/UIProcess/Downloads \
58     $(WebKit2)/UIProcess/Network \
59     $(WebKit2)/UIProcess/Network/CustomProtocols \
60     $(WebKit2)/UIProcess/Notifications \
61     $(WebKit2)/UIProcess/Plugins \
62     $(WebKit2)/UIProcess/Storage \
63     $(WebKit2)/UIProcess/mac \
64     $(WebKit2)/UIProcess/ios \
65 #
66
67 MESSAGE_RECEIVERS = \
68     AuthenticationManager \
69     CustomProtocolManager \
70     CustomProtocolManagerProxy \
71     DatabaseProcess \
72     DatabaseProcessIDBConnection \
73     DatabaseProcessProxy \
74     DatabaseToWebProcessConnection \
75     DownloadProxy \
76     DrawingArea \
77     DrawingAreaProxy \
78     EventDispatcher \
79     NPObjectMessageReceiver \
80     NetworkConnectionToWebProcess \
81     NetworkProcess \
82     NetworkProcessConnection \
83     NetworkProcessProxy \
84     NetworkResourceLoader \
85     PluginControllerProxy \
86     PluginProcess \
87     PluginProcessConnection \
88     PluginProcessConnectionManager \
89     PluginProcessProxy \
90     PluginProxy \
91     RemoteLayerTreeDrawingAreaProxy \
92     RemoteObjectRegistry \
93     RemoteScrollingCoordinator \
94     SecItemShim \
95     SecItemShimProxy \
96     SmartMagnificationController \
97     StorageAreaMap \
98     StorageManager \
99     ViewGestureController \
100     ViewGestureGeometryCollector \
101     ViewUpdateDispatcher \
102     VisitedLinkProvider \
103     VisitedLinkTableController \
104     WebApplicationCacheManager \
105     WebApplicationCacheManagerProxy \
106     WebConnection \
107     WebContext \
108     WebCookieManager \
109     WebCookieManagerProxy \
110     WebDatabaseManager \
111     WebDatabaseManagerProxy \
112     WebFullScreenManager \
113     WebFullScreenManagerProxy \
114     WebGeolocationManager \
115     WebGeolocationManagerProxy \
116     WebIDBServerConnection \
117     WebIconDatabase \
118     WebIconDatabaseProxy \
119     WebInspector \
120     WebInspectorProxy \
121     WebMediaCacheManager \
122     WebMediaCacheManagerProxy \
123     WebNotificationManager \
124     WebOriginDataManager \
125     WebOriginDataManagerProxy \
126     WebPage \
127     WebPageGroupProxy \
128     WebPageProxy \
129     WebProcess \
130     WebProcessConnection \
131     WebProcessProxy \
132     WebResourceCacheManager \
133     WebResourceCacheManagerProxy \
134     WebResourceLoader \
135     WebVideoFullscreenManager \
136     WebVideoFullscreenManagerProxy \
137 #
138
139 SCRIPTS = \
140     $(WebKit2)/Scripts/generate-message-receiver.py \
141     $(WebKit2)/Scripts/generate-messages-header.py \
142     $(WebKit2)/Scripts/webkit2/__init__.py \
143     $(WebKit2)/Scripts/webkit2/messages.py \
144     $(WebKit2)/Scripts/webkit2/model.py \
145     $(WebKit2)/Scripts/webkit2/parser.py \
146 #
147
148 .PHONY : all
149
150 all : \
151     $(MESSAGE_RECEIVERS:%=%MessageReceiver.cpp) \
152     $(MESSAGE_RECEIVERS:%=%Messages.h) \
153 #
154
155 %MessageReceiver.cpp : %.messages.in $(SCRIPTS)
156         @echo Generating messages header for $*...
157         @python $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
158
159 %Messages.h : %.messages.in $(SCRIPTS)
160         @echo Generating message receiver for $*...
161         @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
162
163
164 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
165 HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
166
167 # Some versions of clang incorrectly strip out // comments in c89 code.
168 # Use -traditional as a workaround, but only when needed since that causes
169 # other problems with later versions of clang.
170 ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
171 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
172 else
173 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
174 endif
175
176 ifneq ($(SDKROOT),)
177         SDK_FLAGS=-isysroot $(SDKROOT)
178 endif
179
180 SANDBOX_PROFILES = \
181         com.apple.WebProcess.sb \
182         com.apple.WebKit.NetworkProcess.sb
183
184 all: $(SANDBOX_PROFILES)
185
186 %.sb : %.sb.in
187         @echo Pre-processing $* sandbox profile...
188         $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
189