dd79f8e6f354520e3ab8db10e6a0591184327d9c
[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 #
109
110 SCRIPTS = \
111     $(WebKit2)/Scripts/generate-message-receiver.py \
112     $(WebKit2)/Scripts/generate-messages-header.py \
113     $(WebKit2)/Scripts/webkit2/__init__.py \
114     $(WebKit2)/Scripts/webkit2/messages.py \
115     $(WebKit2)/Scripts/webkit2/model.py \
116     $(WebKit2)/Scripts/webkit2/parser.py \
117 #
118
119 .PHONY : all
120
121 all : \
122     $(MESSAGE_RECEIVERS:%=%MessageReceiver.cpp) \
123     $(MESSAGE_RECEIVERS:%=%Messages.h) \
124 #
125
126 %MessageReceiver.cpp : %.messages.in $(SCRIPTS)
127         @echo Generating messages header for $*...
128         @python $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
129
130 %Messages.h : %.messages.in $(SCRIPTS)
131         @echo Generating message receiver for $*...
132         @python $(WebKit2)/Scripts/generate-messages-header.py $< > $@
133
134 # Mac-specific rules
135
136 ifeq ($(OS),MACOS)
137
138 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
139 HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
140 TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
141
142 ifneq ($(SDKROOT),)
143         SDK_FLAGS=-isysroot $(SDKROOT)
144 endif
145
146 SANDBOX_PROFILES = \
147         com.apple.WebProcess.sb \
148         com.apple.WebKit.PluginProcess.sb
149
150 all: $(SANDBOX_PROFILES)
151
152 %.sb : %.sb.in
153         @echo Pre-processing $* sandbox profile...
154         $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
155
156 endif # MACOS
157
158 # ------------------------
159
160 # Windows-specific rules
161
162 ifeq ($(OS),Windows_NT)
163
164 all : HeaderDetection.h
165
166 HeaderDetection.h : DerivedSources.make
167         if [ -f "$(WEBKITLIBRARIESDIR)/include/WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsBase.h" ] && [ ! -f "$(WEBKITLIBRARIESDIR)/include/cairo/cairo.h" ]; then echo "#define HAVE_WKQCA 1" > $@; else echo > $@; fi
168         if [ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFBase.h" ]; then echo "#define HAVE_AVCF 1" >> $@; else echo >> $@; fi
169
170 endif # Windows_NT