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