Move loading responsibility out of WebResourceLoadScheduler into a new WebResourceLoader
[WebKit-https.git] / Source / WebKit2 / DerivedSources.make
1 # Copyright (C) 2010, 2011, 2012 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)/NetworkProcess \
26     $(WebKit2)/PluginProcess \
27     $(WebKit2)/PluginProcess/mac \
28     $(WebKit2)/Shared/Plugins \
29     $(WebKit2)/Shared \
30     $(WebKit2)/SharedWorkerProcess \
31     $(WebKit2)/WebProcess/ApplicationCache \
32     $(WebKit2)/WebProcess/Authentication \
33     $(WebKit2)/WebProcess/Cookies \
34     $(WebKit2)/WebProcess/FullScreen \
35     $(WebKit2)/WebProcess/Geolocation \
36     $(WebKit2)/WebProcess/IconDatabase \
37     $(WebKit2)/WebProcess/KeyValueStorage \
38     $(WebKit2)/WebProcess/MediaCache \
39     $(WebKit2)/WebProcess/Network \
40     $(WebKit2)/WebProcess/Network/CustomProtocols \
41     $(WebKit2)/WebProcess/Notifications \
42     $(WebKit2)/WebProcess/Plugins \
43     $(WebKit2)/WebProcess/ResourceCache \
44     $(WebKit2)/WebProcess/WebCoreSupport \
45     $(WebKit2)/WebProcess/WebPage \
46     $(WebKit2)/WebProcess \
47     $(WebKit2)/UIProcess \
48     $(WebKit2)/UIProcess/Downloads \
49     $(WebKit2)/UIProcess/Network \
50     $(WebKit2)/UIProcess/Network/CustomProtocols \
51     $(WebKit2)/UIProcess/Notifications \
52     $(WebKit2)/UIProcess/Plugins \
53     $(WebKit2)/UIProcess/SharedWorkers \
54     $(WebKit2)/UIProcess/mac \
55 #
56
57 MESSAGE_RECEIVERS = \
58     AuthenticationManager \
59     CustomProtocolManager \
60     CustomProtocolManagerProxy \
61     DrawingArea \
62     DrawingAreaProxy \
63     DownloadProxy \
64     EventDispatcher \
65     NetworkProcess \
66     NetworkProcessConnection \
67     NetworkProcessProxy \
68     NPObjectMessageReceiver \
69     PluginControllerProxy \
70     PluginProcess \
71     PluginProcessConnection \
72     PluginProcessProxy \
73     PluginProxy \
74     SharedWorkerProcess \
75     SharedWorkerProcessProxy \
76     WebApplicationCacheManager \
77     WebApplicationCacheManagerProxy \
78     WebCookieManager \
79     WebCookieManagerProxy \
80     WebConnection \
81     NetworkConnectionToWebProcess \
82     RemoteLayerTreeHost \
83     WebContext \
84     WebDatabaseManager \
85     WebDatabaseManagerProxy \
86     WebFullScreenManager \
87     WebFullScreenManagerProxy \
88     WebGeolocationManager \
89     WebGeolocationManagerProxy \
90     WebIconDatabase \
91     WebIconDatabaseProxy \
92     WebInspector \
93     WebInspectorProxy \
94     WebKeyValueStorageManager \
95     WebKeyValueStorageManagerProxy \
96     WebMediaCacheManager \
97     WebMediaCacheManagerProxy \
98     WebNotificationManagerProxy \
99     WebNotificationManager \
100     WebPage \
101     WebPageGroupProxy \
102     WebPageProxy \
103     WebProcess \
104     WebProcessConnection \
105     WebProcessProxy \
106     WebResourceCacheManager \
107     WebResourceCacheManagerProxy \
108     WebResourceLoader \
109 #
110
111 SCRIPTS = \
112     $(WebKit2)/Scripts/generate-message-receiver.py \
113     $(WebKit2)/Scripts/generate-messages-header.py \
114     $(WebKit2)/Scripts/webkit2/__init__.py \
115     $(WebKit2)/Scripts/webkit2/messages.py \
116     $(WebKit2)/Scripts/webkit2/model.py \
117     $(WebKit2)/Scripts/webkit2/parser.py \
118 #
119
120 .PHONY : all
121
122 all : \
123     $(MESSAGE_RECEIVERS:%=%MessageReceiver.cpp) \
124     $(MESSAGE_RECEIVERS:%=%Messages.h) \
125 #
126
127 %MessageReceiver.cpp : %.messages.in $(SCRIPTS)
128         @echo Generating messages header for $*...
129         @python $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
130
131 %Messages.h : %.messages.in $(SCRIPTS)
132         @echo Generating message receiver for $*...
133         @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
134
135 # Mac-specific rules
136
137 ifeq ($(OS),MACOS)
138
139 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
140 HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
141 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
142
143 ifneq ($(SDKROOT),)
144         SDK_FLAGS=-isysroot $(SDKROOT)
145 endif
146
147 SANDBOX_PROFILES = \
148         com.apple.WebProcess.sb \
149         com.apple.WebKit.PluginProcess.sb
150
151 all: $(SANDBOX_PROFILES)
152
153 %.sb : %.sb.in
154         @echo Pre-processing $* sandbox profile...
155         $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
156
157 endif # MACOS
158
159 # ------------------------
160
161 # Windows-specific rules
162
163 ifeq ($(OS),Windows_NT)
164
165 all : HeaderDetection.h
166
167 HeaderDetection.h : DerivedSources.make
168         if [ -f "$(WEBKITLIBRARIESDIR)/include/WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsBase.h" ] && [ ! -f "$(WEBKITLIBRARIESDIR)/include/cairo/cairo.h" ]; then echo "#define HAVE_WKQCA 1" > $@; else echo > $@; fi
169         if [ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFBase.h" ]; then echo "#define HAVE_AVCF 1" >> $@; else echo >> $@; fi
170
171 endif # Windows_NT