[GTK] Using a native window for the WebView breaks GtkOverlay
[WebKit-https.git] / Source / WebKit2 / GNUmakefile.am
1 include $(srcdir)/Source/WebKit2/GNUmakefile.list.am
2
3 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
4         $(webkit2_h_api)
5
6 libwebkit2gtkincludedir = $(libwebkitgtkincludedir)/webkit2
7 nodist_libwebkit2gtkinclude_HEADERS = \
8         DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitEnumTypes.h \
9         DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitVersion.h
10
11 libwebkit2gtkinclude_HEADERS = \
12         $(webkit2gtk_h_api)
13
14 nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
15         $(webkit2_built_sources) \
16         $(webkit2gtk_built_sources)
17
18 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
19         $(webkit2_sources)
20
21 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
22         -fno-strict-aliasing \
23         $(global_cppflags) \
24         -include $(srcdir)/Source/WebKit2/WebKit2Prefix.h \
25         -I$(srcdir)/Source/WebKit/gtk \
26         -I$(srcdir)/Source/WebKit2 \
27         -I$(srcdir)/Source/WebKit2/gtk \
28         -I$(srcdir)/Source/WebKit2/Platform \
29         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC \
30         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/gtk \
31         -I$(srcdir)/Source/WebKit2/Platform/gtk \
32         -I$(srcdir)/Source/WebKit2/PluginProcess \
33         -I$(srcdir)/Source/WebKit2/Shared \
34         -I$(srcdir)/Source/WebKit2/Shared/API \
35         -I$(srcdir)/Source/WebKit2/Shared/API/c \
36         -I$(srcdir)/Source/WebKit2/Shared/API/c/gtk \
37         -I$(srcdir)/Source/WebKit2/Shared/API/c/soup \
38         -I$(srcdir)/Source/WebKit2/Shared/CoreIPCSupport \
39         -I$(srcdir)/Source/WebKit2/Shared/gtk \
40         -I$(srcdir)/Source/WebKit2/Shared/Plugins \
41         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape \
42         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape/x11 \
43         -I$(srcdir)/Source/WebKit2/Shared/soup \
44         -I$(srcdir)/Source/WebKit2/UIProcess \
45         -I$(srcdir)/Source/WebKit2/UIProcess/API \
46         -I$(srcdir)/Source/WebKit2/UIProcess/API/C \
47         -I$(srcdir)/Source/WebKit2/UIProcess/API/C/gtk \
48         -I$(srcdir)/Source/WebKit2/UIProcess/API/C/soup \
49         -I$(srcdir)/Source/WebKit2/UIProcess/API/cpp \
50         -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
51         -I$(srcdir)/Source/WebKit2/UIProcess/Authentication \
52         -I$(srcdir)/Source/WebKit2/UIProcess/Downloads \
53         -I$(srcdir)/Source/WebKit2/UIProcess/gtk \
54         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher \
55         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher/gtk \
56         -I$(srcdir)/Source/WebKit2/UIProcess/Notifications \
57         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins \
58         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins/gtk \
59         -I$(srcdir)/Source/WebKit2/UIProcess/soup \
60         -I$(srcdir)/Source/WebKit2/WebProcess \
61         -I$(srcdir)/Source/WebKit2/WebProcess/ApplicationCache \
62         -I$(srcdir)/Source/WebKit2/WebProcess/Authentication \
63         -I$(srcdir)/Source/WebKit2/WebProcess/Battery \
64         -I$(srcdir)/Source/WebKit2/WebProcess/Cookies \
65         -I$(srcdir)/Source/WebKit2/WebProcess/Downloads \
66         -I$(srcdir)/Source/WebKit2/WebProcess/Downloads/soup \
67         -I$(srcdir)/Source/WebKit2/WebProcess/FullScreen \
68         -I$(srcdir)/Source/WebKit2/WebProcess/Geolocation \
69         -I$(srcdir)/Source/WebKit2/WebProcess/gtk \
70         -I$(srcdir)/Source/WebKit2/WebProcess/IconDatabase \
71         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
72         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API \
73         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \
74         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/DOM \
75         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/gtk \
76         -I$(srcdir)/Source/WebKit2/WebProcess/KeyValueStorage \
77         -I$(srcdir)/Source/WebKit2/WebProcess/Launching \
78         -I$(srcdir)/Source/WebKit2/WebProcess/MediaCache \
79         -I$(srcdir)/Source/WebKit2/WebProcess/NetworkInfo \
80         -I$(srcdir)/Source/WebKit2/WebProcess/Notifications \
81         -I$(srcdir)/Source/WebKit2/WebProcess/ResourceCache \
82         -I$(srcdir)/Source/WebKit2/WebProcess/soup \
83         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins \
84         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape \
85         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape/gtk \
86         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport \
87         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/gtk \
88         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/soup \
89         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage \
90         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage/gtk \
91         -I$(top_builddir)/DerivedSources/WebKit2 \
92         -I$(top_builddir)/DerivedSources/WebKit2/include \
93         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
94         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
95         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/webkit2 \
96         -I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
97         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
98         -I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
99         -DLIBEXECDIR=\""$(libexecdir)"\" \
100         -DWEBKIT2_COMPILATION \
101         $(webcore_cppflags) \
102         $(webcoregtk_cppflags) \
103         $(javascriptcore_cppflags) \
104         $(COVERAGE_CFLAGS) \
105         $(GEOCLUE_CFLAGS) \
106         $(GLIB_CFLAGS) \
107         $(GTK_CFLAGS) \
108         $(GTK_UNIX_PRINTING_CFLAGS) \
109         $(LIBSOUP_CFLAGS) \
110         $(UNICODE_CFLAGS) \
111         $(XCOMPOSITE_CFLAGS) \
112         $(XT_CFLAGS)
113
114 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
115         $(global_cxxflags)
116
117 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
118         $(global_cflags)
119
120 if ENABLE_WEBKIT2
121 # Shared libraries
122 lib_LTLIBRARIES += \
123         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
124 endif
125
126 # Artificial dependency to make sure libwebkit2gtk and libwebkitgtk are not linked at the same time
127 # The variable creation is to avoid having automake override the entire rule instead of adding the
128 # dependency.
129 webkit2gtk_lib_for_dep = libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
130 $(webkit2gtk_lib_for_dep): libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
131
132 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = \
133         $(libwebkit2gtkincludedir)/WebKit2
134
135 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
136 if !TARGET_WIN32
137 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
138         -DXP_UNIX
139 endif
140
141 # Add MOZ_X11 for X11 targets only
142 if TARGET_X11
143 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
144         -DMOZ_X11
145 endif
146
147 # Plugin process
148 if ENABLE_PLUGIN_PROCESS
149 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
150         -DENABLE_PLUGIN_PROCESS=1
151 endif
152
153 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
154         -version-info @LIBWEBKIT2GTK_VERSION@ \
155         $(version_script) \
156         $(no_undefined)
157
158 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
159         -lpthread \
160         libWebCore.la \
161         libWebCoreModules.la \
162         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
163         libWebCoreGtk.la \
164         $(CAIRO_LIBS) \
165         $(COVERAGE_LDFLAGS) \
166         $(FARSTREAM_LIBS) \
167         $(GAIL_LIBS) \
168         $(GAMEPAD_LIBS) \
169         $(GEOCLUE_LIBS) \
170         $(GLIB_LIBS) \
171         $(GSTREAMER_LIBS) \
172         $(GTK_LIBS) \
173         $(GTK_UNIX_PRINTING_LIBS) \
174         $(JPEG_LIBS) \
175         $(LIBSOUP_LIBS) \
176         $(LIBXML_LIBS) \
177         $(LIBXSLT_LIBS) \
178         $(OPENGL_LIBS) \
179         $(PANGO_LIBS) \
180         $(PNG_LIBS) \
181         $(SQLITE3_LIBS) \
182         $(UNICODE_LIBS) \
183         $(XRENDER_LIBS) \
184         $(XCOMPOSITE_LIBS) \
185         $(XT_LIBS) \
186         $(ZLIB_LIBS)
187
188 if ENABLE_SPELLCHECK
189 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
190         -DENABLE_SPELLCHECK=1 \
191         $(ENCHANT_CFLAGS)
192
193 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
194         $(ENCHANT_LIBS)
195 endif
196
197
198 if ENABLE_WEBKIT2
199 pkgconfig_DATA += Source/WebKit2/webkit2gtk-@WEBKITGTK_API_VERSION@.pc
200 endif
201
202 # WebKit2 specific variables
203 forwarding_headers := $(GENSOURCES_WEBKIT2)/include
204 generate-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(libWebKit2_la_SOURCES)
205         $(AM_V_GEN)$(PERL) $< $(WebKit2) $(forwarding_headers) gtk
206         $(AM_V_GEN)$(PERL) $< $(WebKit2) $(forwarding_headers) soup
207
208 BUILT_SOURCES += generate-webkit2-forwarding-headers
209
210 $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2: $(libwebkit2gtkinclude_HEADERS)
211         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/include \
212         && ln -n -s -f ${shell pwd}/$(WebKit2)/UIProcess/API/gtk $@
213
214 BUILT_SOURCES += $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2
215
216 vpath %.messages.in = \
217         $(WebKit2)/PluginProcess \
218         $(WebKit2)/Shared/Plugins \
219         $(WebKit2)/UIProcess \
220         $(WebKit2)/UIProcess/ApplicationCache \
221         $(WebKit2)/UIProcess/Downloads \
222         $(WebKit2)/UIProcess/Geolocation \
223         $(WebKit2)/UIProcess/Notifications \
224         $(WebKit2)/UIProcess/Plugins \
225         $(WebKit2)/UIProcess/ResourceCache \
226         $(WebKit2)/UIProcess/soup \
227         $(WebKit2)/WebProcess \
228         $(WebKit2)/WebProcess/ApplicationCache \
229         $(WebKit2)/WebProcess/Authentication \
230         $(WebKit2)/WebProcess/Battery \
231         $(WebKit2)/WebProcess/Cookies \
232         $(WebKit2)/WebProcess/FullScreen \
233         $(WebKit2)/WebProcess/Geolocation \
234         $(WebKit2)/WebProcess/IconDatabase \
235         $(WebKit2)/WebProcess/KeyValueStorage \
236         $(WebKit2)/WebProcess/MediaCache \
237         $(WebKit2)/WebProcess/NetworkInfo \
238         $(WebKit2)/WebProcess/Notifications \
239         $(WebKit2)/WebProcess/Plugins \
240         $(WebKit2)/WebProcess/ResourceCache \
241         $(WebKit2)/WebProcess/WebCoreSupport \
242         $(WebKit2)/WebProcess/WebPage \
243         $(WebKit2)/WebProcess/soup
244
245 message_gen_scripts = \
246         $(WebKit2)/Scripts/generate-message-receiver.py \
247         $(WebKit2)/Scripts/generate-messages-header.py \
248         $(WebKit2)/Scripts/webkit2/__init__.py \
249         $(WebKit2)/Scripts/webkit2/messages.py \
250         $(WebKit2)/Scripts/webkit2/model.py \
251         $(WebKit2)/Scripts/webkit2/parser.py
252
253 # Message header generation
254 DerivedSources/WebKit2/%MessageReceiver.cpp: %.messages.in $(message_gen_scripts)
255         $(AM_V_GEN)$(PYTHON) $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
256
257 DerivedSources/WebKit2/%Messages.h: %.messages.in $(message_gen_scripts)
258         $(AM_V_GEN)$(PYTHON) $(WebKit2)/Scripts/generate-messages-header.py $< > $@
259
260 webkit2gtk_built_headers_dir := $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2
261 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h: stamp-webkit2enumtypes
262         @true
263
264 stamp-webkit2enumtypes: $(libwebkit2gtkinclude_HEADERS) $(WebKit2)/GNUmakefile.am
265         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2 \
266         && glib-mkenums \
267                         --fhead "#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)\n" \
268                         --fhead "#error \"Only <webkit2/webkit2.h> can be included directly.\"\n" \
269                         --fhead "#endif\n\n" \
270                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
271                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
272                         --fhead "#include <glib-object.h>\n\n" \
273                         --fhead "#include <webkit2/WebKitDefines.h>\n\n" \
274                         --fhead "G_BEGIN_DECLS\n\n" \
275                         --ftail "G_END_DECLS\n\n" \
276                         --ftail "#endif\n" \
277                         --fprod "#include <webkit2/@basename@>\n\n" \
278                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
279                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
280                 $(libwebkit2gtkinclude_HEADERS) | \
281                 sed 's,web_kit,webkit,' | \
282                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
283                 > wk2-xgen-gth \
284         && (cmp -s wk2-xgen-gth $(webkit2gtk_built_headers_dir)/WebKitEnumTypes.h || cp wk2-xgen-gth $(webkit2gtk_built_headers_dir)/WebKitEnumTypes.h) \
285         && rm -f wk2-xgen-gth \
286         && echo timestamp > $(@F)
287
288 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.cpp: $(libwebkit2gtkinclude_HEADERS) $(WebKit2)/GNUmakefile.am
289         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2 \
290         && glib-mkenums \
291                         --fhead "#include <config.h>\n" \
292                         --fhead "#include <glib-object.h>\n" \
293                         --fhead "#include \"$(webkit2gtk_built_headers_dir)/WebKitEnumTypes.h\"\n\n" \
294                         --fhead "extern \"C\" {\n\n" \
295                         --fprod "\n/* Enumerations from \"@filename@\". */" \
296                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
297                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
298                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
299                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
300                         --vtail "    static GType type = 0;\n\n" \
301                         --vtail "    if (!type)\n" \
302                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
303                         --vtail "    return type;\n}\n\n" \
304                         --ftail "}\n" \
305                 $(libwebkit2gtkinclude_HEADERS) | \
306                 sed 's,web_kit,webkit,' \
307                 > wk2-xgen-gtc \
308         && cp wk2-xgen-gtc $@ \
309         && rm -f wk2-xgen-gtc
310
311 WEBKIT2_MARSHAL_LIST = $(WebKit2)/UIProcess/API/gtk/webkit2marshal.list
312
313 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitMarshal.cpp: stamp-webkit2marshal.cpp
314         @true
315 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitMarshal.h: stamp-webkit2marshal.h
316         @true
317
318 stamp-webkit2marshal.cpp: $(WEBKIT2_MARSHAL_LIST)
319         $(AM_V_GEN) echo "extern \"C\" {" > $(webkit2gtk_built_headers_dir)/WebKitMarshal.cpp && \
320         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT2_MARSHAL_LIST) --body >> $(webkit2gtk_built_headers_dir)/WebKitMarshal.cpp && \
321         echo '}' >> $(webkit2gtk_built_headers_dir)/WebKitMarshal.cpp && \
322         echo timestamp > $(@F)
323
324 stamp-webkit2marshal.h: $(WEBKIT2_MARSHAL_LIST)
325         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT2_MARSHAL_LIST) --header > $(webkit2gtk_built_headers_dir)/WebKitMarshal.h && \
326         echo timestamp > $(@F)
327
328 CLEANFILES += \
329         $(BUILT_SOURCES) \
330         $(top_builddir)/stamp-webkit2enumtypes \
331         $(top_builddir)/stamp-webkit2marshal.cpp \
332         $(top_builddir)/stamp-webkit2marshal.h \
333         $(top_builddir)/Programs/WebKitWebProcess
334
335 DISTCLEANFILES += \
336         $(top_builddir)/WebKit2/webkit2gtk-@WEBKITGTK_API_VERSION@.pc
337
338 if ENABLE_WEBKIT2
339 libexec_PROGRAMS += \
340         Programs/WebKitWebProcess
341 endif
342
343 Programs_WebKitWebProcess_CPPFLAGS = \
344         -I$(srcdir)/Source/WebKit2 \
345         -I$(srcdir)/Source/WebKit2/UIProcess/API/C \
346         -I$(srcdir)/Source/WebKit2/WebProcess/gtk \
347         -I$(top_builddir)/DerivedSources/WebKit2 \
348         -I$(top_builddir)/DerivedSources/WebKit2/include \
349         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
350         $(global_cppflags) \
351         $(javascriptcore_cppflags)
352
353 Programs_WebKitWebProcess_CFLAGS = \
354         $(global_cflags) \
355         $(CAIRO_CFLAGS) \
356         $(GLIB_CFLAGS) \
357         $(GTK_CFLAGS) \
358         $(GTK_UNIX_PRINTING_CFLAGS) \
359         $(LIBSOUP_CFLAGS) \
360         $(ZLIB_CFLAGS)
361
362 Programs_WebKitWebProcess_SOURCES = \
363         Source/WebKit2/gtk/MainGtk.cpp
364
365 Programs_WebKitWebProcess_LDADD = \
366         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
367         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
368         $(GLIB_LIBS) \
369         $(GTK_LIBS) \
370         $(GTK_UNIX_PRINTING_LIBS) \
371         $(LIBSOUP_LIBS)
372
373 # PluginProcess
374 if ENABLE_PLUGIN_PROCESS
375
376 # We need to make sure plugin process is always built with gtk2, because plugins like flash
377 # still use gtk2. Since webcore was built with gtk3, we need to build webcoregtk sources again with gtk2
378 noinst_LTLIBRARIES += \
379         libWebCoreGtk2.la
380
381 libWebCoreGtk2_la_SOURCES = \
382         $(webcoregtk_sources)
383
384 libWebCoreGtk2_la_CXXFLAGS = \
385         $(SYMBOL_VISIBILITY_INLINES) \
386         $(global_cxxflags)
387
388 libWebCoreGtk2_la_CFLAGS = \
389         $(SYMBOL_VISIBILITY) \
390         $(global_cflags)
391
392 libWebCoreGtk2_la_CPPFLAGS = \
393         -DBUILDING_WEBKIT \
394         -DGTK_API_VERSION_2=1 \
395         $(global_cppflags) \
396         $(webcore_cppflags) \
397         $(webcoregtk_cppflags) \
398         $(javascriptcore_cppflags) \
399         -fno-strict-aliasing \
400         $(COVERAGE_CFLAGS) \
401         $(ENCHANT_CFLAGS) \
402         $(GEOCLUE_CFLAGS) \
403         $(FARSTREAM_CFLAGS) \
404         $(GLIB_CFLAGS) \
405         $(GSTREAMER_CFLAGS) \
406         $(GTK2_CFLAGS) \
407         $(LIBSOUP_CFLAGS) \
408         $(LIBXML_CFLAGS) \
409         $(LIBXSLT_CFLAGS) \
410         $(SQLITE3_CFLAGS) \
411         $(UNICODE_CFLAGS) \
412         $(XRENDER_CFLAGS) \
413         $(XT_CFLAGS)
414
415 libexec_PROGRAMS += \
416         Programs/WebKitPluginProcess
417
418 # Serialize linking of the plugin process with both webkit libraries.
419 plugin_process_for_dep = Programs/WebKitPluginProcess
420 $(plugin_process_for_dep): libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
421
422 Programs_WebKitPluginProcess_CPPFLAGS = \
423         -include $(srcdir)/Source/WebKit2/WebKit2Prefix.h \
424         -I$(srcdir)/Source/WebKit2 \
425         -I$(srcdir)/Source/WebKit2/Platform \
426         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/ \
427         -I$(srcdir)/Source/WebKit2/PluginProcess/ \
428         -I$(srcdir)/Source/WebKit2/PluginProcess/gtk \
429         -I$(srcdir)/Source/WebKit2/Shared \
430         -I$(srcdir)/Source/WebKit2/Shared/Plugins \
431         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape/ \
432         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins/ \
433         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher \
434         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/ \
435         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape/ \
436         -I$(srcdir)/Source/WebKit2/Shared/soup \
437         -I$(top_builddir)/DerivedSources/WebKit2 \
438         -I$(top_builddir)/DerivedSources/WebKit2/include \
439         -I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
440         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
441         -I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
442         -DBUILDING_WEBKIT \
443         -DGTK_API_VERSION_2=1 \
444         -DENABLE_PLUGIN_PROCESS=1 \
445         -DLIBEXECDIR=\""$(libexecdir)"\" \
446         $(global_cppflags) \
447         $(webcore_cppflags) \
448         $(webcoregtk_cppflags) \
449         $(javascriptcore_cppflags) \
450         -fno-strict-aliasing \
451         $(CAIRO_CFLAGS) \
452         $(GLIB_CFLAGS) \
453         $(GSTREAMER_CFLAGS) \
454         $(GTK2_CFLAGS) \
455         $(LIBSOUP_CFLAGS) \
456         $(UNICODE_CFLAGS)
457
458 Programs_WebKitPluginProcess_CFLAGS = \
459         $(SYMBOL_VISIBILITY) \
460         $(global_cflags) \
461         $(CAIRO_CFLAGS) \
462         $(GLIB_CFLAGS) \
463         $(GSTREAMER_CFLAGS) \
464         $(GTK2_CFLAGS) \
465         $(LIBSOUP_CFLAGS) \
466         $(UNICODE_CFLAGS)
467
468 nodist_Programs_WebKitPluginProcess_SOURCES = \
469         $(webkit2_plugin_process_built_sources)
470
471 Programs_WebKitPluginProcess_SOURCES = \
472         $(webkit2_plugin_process_sources)
473
474 Programs_WebKitPluginProcess_LDADD = \
475         -lpthread \
476         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
477         libWebCore.la \
478         libWebCoreGtk2.la \
479         $(CAIRO_LIBS) \
480         $(COVERAGE_LDFLAGS) \
481         $(GEOCLUE_LIBS) \
482         $(GLIB_LIBS) \
483         $(GSTREAMER_LIBS) \
484         $(GTK2_LIBS) \
485         $(JPEG_LIBS) \
486         $(LIBSOUP_LIBS) \
487         $(LIBXML_LIBS) \
488         $(LIBXSLT_LIBS) \
489         $(OLE32_LIBS) \
490         $(OPENGL_LIBS) \
491         $(PANGO_LIBS) \
492         $(PNG_LIBS) \
493         $(SHLWAPI_LIBS) \
494         $(SQLITE3_LIBS) \
495         $(UNICODE_LIBS) \
496         $(XRENDER_LIBS) \
497         $(XT_LIBS) \
498         $(WINMM_LIBS) \
499         $(ZLIB_LIBS)
500
501 # libWebCore and libWebCoreModules have circular dependencies that only seem to
502 # be a problem when linking the plugin process; we don't really care about
503 # modules for the plugin process, though, so to work around that we ignore
504 # internal unresolved symbols
505 Programs_WebKitPluginProcess_LDFLAGS = \
506         -Wl,--unresolved-symbols=ignore-in-object-files
507
508 Programs_WebKitPluginProcess_CXXFLAGS = \
509         $(SYMBOL_VISIBILITY_INLINES) \
510         $(global_cxxflags)
511
512 endif # ENABLE_PLUGIN_PROCESS
513
514 EXTRA_DIST += \
515         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
516         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-sections.txt \
517         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk.types \
518         $(WebKit2)/Scripts/generate-message-receiver.py \
519         $(WebKit2)/Scripts/generate-messages-header.py \
520         $(WebKit2)/Scripts/webkit2/__init__.py \
521         $(WebKit2)/Scripts/webkit2/messages.py \
522         $(WebKit2)/Scripts/webkit2/model.py \
523         $(WebKit2)/Scripts/webkit2/parser.py \
524         $(WebKit2)/UIProcess/API/gtk/webkit2marshal.list \
525         $(WebKit2)/Scripts/generate-forwarding-headers.pl \
526         $(shell ls $(WebKit2)/PluginProcess/*.in) \
527         $(shell ls $(WebKit2)/Shared/Plugins/*.in) \
528         $(shell ls $(WebKit2)/UIProcess/*.in) \
529         $(shell ls $(WebKit2)/UIProcess/Downloads/*.in) \
530         $(shell ls $(WebKit2)/UIProcess/Notifications/*.in) \
531         $(shell ls $(WebKit2)/UIProcess/Plugins/*.in) \
532         $(shell ls $(WebKit2)/UIProcess/soup/*.in) \
533         $(shell ls $(WebKit2)/WebProcess/*.in) \
534         $(shell ls $(WebKit2)/WebProcess/ApplicationCache/*.in) \
535         $(shell ls $(WebKit2)/WebProcess/Authentication/*.in) \
536         $(shell ls $(WebKit2)/WebProcess/Battery/*.in) \
537         $(shell ls $(WebKit2)/WebProcess/Cookies/*.in) \
538         $(shell ls $(WebKit2)/WebProcess/FullScreen/*.in) \
539         $(shell ls $(WebKit2)/WebProcess/Geolocation/*.in) \
540         $(shell ls $(WebKit2)/WebProcess/IconDatabase/*.in) \
541         $(shell ls $(WebKit2)/WebProcess/KeyValueStorage/*.in) \
542         $(shell ls $(WebKit2)/WebProcess/MediaCache/*.in) \
543         $(shell ls $(WebKit2)/WebProcess/NetworkInfo/*.in) \
544         $(shell ls $(WebKit2)/WebProcess/Notifications/*.in) \
545         $(shell ls $(WebKit2)/WebProcess/Plugins/*.in) \
546         $(shell ls $(WebKit2)/WebProcess/ResourceCache/*.in) \
547         $(shell ls $(WebKit2)/WebProcess/WebCoreSupport/*.in) \
548         $(shell ls $(WebKit2)/WebProcess/WebPage/*.in) \
549         $(shell ls $(WebKit2)/WebProcess/soup/*.in)