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