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