[GTK] Compile everything in C++11 mode
[WebKit-https.git] / Source / WebKit2 / GNUmakefile.am
1 include $(srcdir)/Source/WebKit2/GNUmakefile.list.am
2
3 if ENABLE_WEBKIT2
4 # Shared libraries
5 lib_LTLIBRARIES += \
6         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
7
8 # Static libraries
9 noinst_LTLIBRARIES += \
10         libWebKit2Platform.la
11
12 # We need to make sure plugin process is always built with gtk2, because plugins like flash
13 # still use gtk2. Since webcore was built with gtk3, we need to build webcoregtk sources again with gtk2
14 noinst_LTLIBRARIES += \
15         libPlatformGtk2.la \
16         libWebCoreGtk2.la
17
18 libexec_PROGRAMS += \
19         Programs/WebKitPluginProcess
20 endif
21
22 # Platform
23 libWebKit2Platform_la_SOURCES = \
24         $(webkit2platform_sources)
25
26 libWebKit2Platform_la_CXXFLAGS = \
27         -fvisibility-inlines-hidden \
28         $(global_cxxflags)
29
30 libWebKit2Platform_la_CFLAGS = \
31         -fvisibility=hidden \
32         $(global_cflags)
33
34 libWebKit2Platform_la_CPPFLAGS = \
35         -DBUILDING_WEBKIT \
36         $(global_cppflags) \
37         -fno-strict-aliasing \
38         -I$(srcdir)/Source \
39         -I$(srcdir)/Source/WTF \
40         -I$(srcdir)/Source/WebKit2/Platform \
41         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC \
42         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/gtk \
43         -I$(srcdir)/Source/WebKit2/Platform/gtk \
44         -I$(top_builddir)/DerivedSources/WebKit2/include \
45         $(COVERAGE_CFLAGS) \
46         $(GLIB_CFLAGS)
47
48
49 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
50         $(webkit2_h_api)
51
52 libwebkit2gtkincludedir = $(libwebkitgtkincludedir)/webkit2
53 nodist_libwebkit2gtkinclude_HEADERS = \
54         DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitEnumTypes.h \
55         DerivedSources/WebKit2/webkit2gtk/webkit2/WebKitVersion.h
56
57 libwebkit2gtkinclude_HEADERS = \
58         $(webkit2gtk_h_api) \
59         $(webkit2_web_extension_h_api)
60
61 nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
62         $(webkit2_built_sources) \
63         $(webkit2gtk_built_sources)
64
65 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
66         $(webkit2_sources)
67
68 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
69         -fno-strict-aliasing \
70         -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
71         $(global_cppflags) \
72         -include $(srcdir)/Source/WebKit2/WebKit2Prefix.h \
73         -I$(srcdir)/Source/WebKit/gtk \
74         -I$(srcdir)/Source/WebKit2 \
75         -I$(srcdir)/Source/WebKit2/gtk \
76         -I$(srcdir)/Source/WebKit2/Platform \
77         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC \
78         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/gtk \
79         -I$(srcdir)/Source/WebKit2/Platform/gtk \
80         -I$(srcdir)/Source/WebKit2/PluginProcess \
81         -I$(srcdir)/Source/WebKit2/Shared \
82         -I$(srcdir)/Source/WebKit2/Shared/API \
83         -I$(srcdir)/Source/WebKit2/Shared/API/c \
84         -I$(srcdir)/Source/WebKit2/Shared/API/c/gtk \
85         -I$(srcdir)/Source/WebKit2/Shared/API/c/soup \
86         -I$(srcdir)/Source/WebKit2/Shared/Authentication \
87         -I$(srcdir)/Source/WebKit2/Shared/CoreIPCSupport \
88         -I$(srcdir)/Source/WebKit2/Shared/Downloads \
89         -I$(srcdir)/Source/WebKit2/Shared/Downloads/soup \
90         -I$(srcdir)/Source/WebKit2/Shared/gtk \
91         -I$(srcdir)/Source/WebKit2/Shared/Network \
92         -I$(srcdir)/Source/WebKit2/Shared/Plugins \
93         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape \
94         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape/x11 \
95         -I$(srcdir)/Source/WebKit2/Shared/soup \
96         -I$(srcdir)/Source/WebKit2/UIProcess \
97         -I$(srcdir)/Source/WebKit2/UIProcess/API \
98         -I$(srcdir)/Source/WebKit2/UIProcess/API/C \
99         -I$(srcdir)/Source/WebKit2/UIProcess/API/C/gtk \
100         -I$(srcdir)/Source/WebKit2/UIProcess/API/C/soup \
101         -I$(srcdir)/Source/WebKit2/UIProcess/API/cpp \
102         -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
103         -I$(srcdir)/Source/WebKit2/UIProcess/Authentication \
104         -I$(srcdir)/Source/WebKit2/UIProcess/Downloads \
105         -I$(srcdir)/Source/WebKit2/UIProcess/gtk \
106         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher \
107         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher/gtk \
108         -I$(srcdir)/Source/WebKit2/UIProcess/Notifications \
109         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins \
110         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins/unix \
111         -I$(srcdir)/Source/WebKit2/UIProcess/Storage \
112         -I$(srcdir)/Source/WebKit2/UIProcess/soup \
113         -I$(srcdir)/Source/WebKit2/UIProcess/InspectorServer \
114         -I$(srcdir)/Source/WebKit2/WebProcess \
115         -I$(srcdir)/Source/WebKit2/WebProcess/ApplicationCache \
116         -I$(srcdir)/Source/WebKit2/WebProcess/Battery \
117         -I$(srcdir)/Source/WebKit2/WebProcess/Cookies \
118         -I$(srcdir)/Source/WebKit2/WebProcess/FullScreen \
119         -I$(srcdir)/Source/WebKit2/WebProcess/Geolocation \
120         -I$(srcdir)/Source/WebKit2/WebProcess/gtk \
121         -I$(srcdir)/Source/WebKit2/WebProcess/IconDatabase \
122         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
123         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API \
124         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \
125         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/gtk \
126         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/DOM \
127         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/gtk \
128         -I$(srcdir)/Source/WebKit2/WebProcess/KeyValueStorage \
129         -I$(srcdir)/Source/WebKit2/WebProcess/Launching \
130         -I$(srcdir)/Source/WebKit2/WebProcess/MediaCache \
131         -I$(srcdir)/Source/WebKit2/WebProcess/NetworkInfo \
132         -I$(srcdir)/Source/WebKit2/WebProcess/Notifications \
133         -I$(srcdir)/Source/WebKit2/WebProcess/ResourceCache \
134         -I$(srcdir)/Source/WebKit2/WebProcess/Storage \
135         -I$(srcdir)/Source/WebKit2/WebProcess/soup \
136         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins \
137         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape \
138         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape/unix \
139         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport \
140         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/gtk \
141         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/soup \
142         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage \
143         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage/atk \
144         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage/gtk \
145         -I$(top_builddir)/DerivedSources/WebKit2 \
146         -I$(top_builddir)/DerivedSources/WebKit2/include \
147         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
148         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
149         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/webkit2 \
150         -I$(top_builddir)/DerivedSources/WebKit2/webkit2extension/include \
151         -I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
152         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
153         -I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
154         -I$(top_builddir)/DerivedSources/webkitdom \
155         -DLIBEXECDIR=\""$(libexecdir)"\" \
156         -DLIBDIR=\""$(libdir)"\" \
157         -DBUILDING_WEBKIT \
158         -DWEBKIT2_COMPILATION \
159         -DENABLE_PLUGIN_PROCESS=1 \
160         $(platform_cppflags) \
161         $(platformgtk_cppflags) \
162         $(webcore_cppflags) \
163         $(webcoregtk_cppflags) \
164         $(javascriptcore_cppflags) \
165         $(CLUTTER_CFLAGS) \
166         $(COVERAGE_CFLAGS) \
167         $(ENCHANT_CFLAGS) \
168         $(FREETYPE_CFLAGS) \
169         $(GEOCLUE_CFLAGS) \
170         $(GLIB_CFLAGS) \
171         $(GTK_CFLAGS) \
172         $(GTK_UNIX_PRINTING_CFLAGS) \
173         $(LIBSOUP_CFLAGS) \
174         $(UNICODE_CFLAGS) \
175         $(XCOMPOSITE_CFLAGS) \
176         $(XDAMAGE_CFLAGS) \
177         $(XT_CFLAGS)
178
179 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
180         $(global_cxxflags)
181
182 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
183         $(global_cflags)
184
185 # Artificial dependency to make sure libwebkit2gtk and libwebkitgtk are not linked at the same time
186 # The variable creation is to avoid having automake override the entire rule instead of adding the
187 # dependency.
188 if ENABLE_WEBKIT1
189 webkit2gtk_lib_for_dep = libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
190 $(webkit2gtk_lib_for_dep): libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
191 endif
192
193 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = \
194         $(libwebkit2gtkincludedir)/WebKit2
195
196 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
197         -version-info @LIBWEBKIT2GTK_VERSION@ \
198         $(version_script) \
199         $(no_undefined)
200
201 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD := \
202         -lpthread \
203         libWebCore.la \
204         libWebCorePlatform.la \
205         libWebCoreModules.la
206
207 if ENABLE_INDEXED_DATABASE
208 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
209         libLevelDB.la
210 endif
211
212 if USE_OPENGL
213 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
214         libANGLE.la
215 endif
216
217 if ENABLE_SVG
218 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
219         libWebCoreSVG.la
220 endif
221
222 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
223         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
224         libPlatform.la \
225         libPlatformGtk.la \
226         libWebCoreDOM.la \
227         libWebCoreGtk.la \
228         libWebKit2Platform.la \
229         $(CAIRO_LIBS) \
230         $(CLUTTER_LIBS) \
231         $(COVERAGE_LDFLAGS) \
232         $(ENCHANT_LIBS) \
233         $(FREETYPE_LIBS) \
234         $(GAIL_LIBS) \
235         $(GAMEPAD_LIBS) \
236         $(GEOCLUE_LIBS) \
237         $(GLIB_LIBS) \
238         $(GSTREAMER_LIBS) \
239         $(GTK_LIBS) \
240         $(GTK_UNIX_PRINTING_LIBS) \
241         $(JPEG_LIBS) \
242         $(LIBSECRET_LIBS) \
243         $(LIBSOUP_LIBS) \
244         $(LIBXML_LIBS) \
245         $(LIBXSLT_LIBS) \
246         $(OPENGL_LIBS) \
247         $(PANGO_LIBS) \
248         $(PNG_LIBS) \
249         $(SQLITE3_LIBS) \
250         $(UNICODE_LIBS) \
251         $(WEBP_LIBS) \
252         $(XRENDER_LIBS) \
253         $(XCOMPOSITE_LIBS) \
254         $(XDAMAGE_LIBS) \
255         $(XT_LIBS) \
256         $(ZLIB_LIBS)
257
258 if ENABLE_WEBKIT2
259 pkgconfig_DATA += Source/WebKit2/webkit2gtk-@WEBKITGTK_API_VERSION@.pc
260
261 if ENABLE_INTROSPECTION
262
263 WebKit2-@WEBKITGTK_API_VERSION@.gir: $(G_IR_SCANNER) libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
264         $(AM_V_GEN) \
265              CFLAGS="$(CFLAGS) -Wno-deprecated-declarations" \
266              $(G_IR_SCANNER) \
267              --quiet \
268              --warn-all \
269              --symbol-prefix=webkit \
270              --identifier-prefix=WebKit \
271              --namespace=WebKit2 \
272              --nsversion=@WEBKITGTK_API_VERSION@ \
273              --include=GObject-2.0 \
274              --include=Gtk-3.0 \
275              --include=JavaScriptCore-@WEBKITGTK_API_VERSION@ \
276              --include=Soup-2.4 \
277              --library=webkit2gtk-@WEBKITGTK_API_VERSION@ \
278              --library=javascriptcoregtk-@WEBKITGTK_API_VERSION@ \
279              --libtool="$(LIBTOOL)" \
280              --pkg=gobject-2.0 \
281              --pkg=gtk+-@GTK_API_VERSION@ \
282              --pkg=libsoup-2.4 \
283              --pkg-export=webkit2gtk-@WEBKITGTK_API_VERSION@ \
284              --output=$@ \
285              --add-include-path=$(WebKit2) \
286              --add-include-path=$(top_builddir) \
287              --c-include="webkit2/webkit2.h" \
288              -I$(srcdir)/Source \
289              -I$(WebKit2) \
290              -I$(GENSOURCES) \
291              -I$(GENSOURCES_WEBKITDOM) \
292              -I$(GENSOURCES_WEBKIT2) \
293              -I$(top_builddir)/Source/WebKit2/UIProcess/API/gtk \
294              -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
295              -I$(top_srcdir) \
296              -I$(GENSOURCES_WEBKIT2)/webkit2gtk/include \
297              -I$(GENSOURCES_WEBKIT2)/webkit2gtk \
298              -DBUILDING_WEBKIT \
299              -DWEBKIT2_COMPILATION \
300              $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h \
301              $(webkit2gtk_h_api) \
302              $(webkitgtk_gdom_built_h_api) \
303              $(WebKit2)/UIProcess/API/gtk/*.cpp
304
305 WebKit2-@WEBKITGTK_API_VERSION@.typelib: WebKit2-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER)
306         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit2) --includedir $(top_builddir) $< -o $@
307
308 gir_DATA += WebKit2-@WEBKITGTK_API_VERSION@.gir
309 typelibs_DATA += WebKit2-@WEBKITGTK_API_VERSION@.typelib
310
311 CLEANFILES += WebKit2-@WEBKITGTK_API_VERSION@.gir WebKit2-@WEBKITGTK_API_VERSION@.typelib
312
313 endif
314 endif
315
316 stamp-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(webkit2_sources)
317         $(AM_V_GEN)$(PERL) $< $(WebKit2) $(GENSOURCES_WEBKIT2)/include gtk \
318         && $(PERL) $< $(WebKit2) $(GENSOURCES_WEBKIT2)/include soup \
319         && echo timestamp > $(@F)
320
321 BUILT_SOURCES += $(top_builddir)/stamp-webkit2-forwarding-headers
322
323 $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2: $(libwebkit2gtkinclude_HEADERS)
324         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/include \
325         && ln -n -s -f ${shell pwd}/$(WebKit2)/UIProcess/API/gtk $@
326
327 $(GENSOURCES_WEBKIT2)/webkit2extension/include/webkit2: $(libwebkit2gtkinclude_HEADERS)
328         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2extension/include \
329         && ln -n -s -f ${shell pwd}/$(WebKit2)/WebProcess/InjectedBundle/API/gtk $@
330
331 BUILT_SOURCES += \
332         $(GENSOURCES_WEBKIT2)/webkit2extension/include/webkit2 \
333         $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2
334
335 vpath %.messages.in = \
336         $(WebKit2)/PluginProcess \
337         $(WebKit2)/Shared \
338         $(WebKit2)/Shared/Authentication \
339         $(WebKit2)/Shared/Plugins \
340         $(WebKit2)/UIProcess \
341         $(WebKit2)/UIProcess/ApplicationCache \
342         $(WebKit2)/UIProcess/Downloads \
343         $(WebKit2)/UIProcess/Geolocation \
344         $(WebKit2)/UIProcess/Notifications \
345         $(WebKit2)/UIProcess/Plugins \
346         $(WebKit2)/UIProcess/ResourceCache \
347         $(WebKit2)/UIProcess/Storage \
348         $(WebKit2)/UIProcess/soup \
349         $(WebKit2)/WebProcess \
350         $(WebKit2)/WebProcess/ApplicationCache \
351         $(WebKit2)/WebProcess/Battery \
352         $(WebKit2)/WebProcess/Cookies \
353         $(WebKit2)/WebProcess/FullScreen \
354         $(WebKit2)/WebProcess/Geolocation \
355         $(WebKit2)/WebProcess/IconDatabase \
356         $(WebKit2)/WebProcess/MediaCache \
357         $(WebKit2)/WebProcess/NetworkInfo \
358         $(WebKit2)/WebProcess/Notifications \
359         $(WebKit2)/WebProcess/Plugins \
360         $(WebKit2)/WebProcess/ResourceCache \
361         $(WebKit2)/WebProcess/Storage \
362         $(WebKit2)/WebProcess/WebCoreSupport \
363         $(WebKit2)/WebProcess/WebPage \
364         $(WebKit2)/WebProcess/soup
365
366 message_gen_scripts = \
367         $(WebKit2)/Scripts/generate-message-receiver.py \
368         $(WebKit2)/Scripts/generate-messages-header.py \
369         $(WebKit2)/Scripts/webkit2/__init__.py \
370         $(WebKit2)/Scripts/webkit2/messages.py \
371         $(WebKit2)/Scripts/webkit2/model.py \
372         $(WebKit2)/Scripts/webkit2/parser.py
373
374 # Message header generation
375 DerivedSources/WebKit2/%MessageReceiver.cpp: %.messages.in $(message_gen_scripts)
376         $(AM_V_GEN)$(PYTHON) $(WebKit2)/Scripts/generate-message-receiver.py $< > $@
377
378 DerivedSources/WebKit2/%Messages.h: %.messages.in $(message_gen_scripts)
379         $(AM_V_GEN)$(PYTHON) $(WebKit2)/Scripts/generate-messages-header.py $< > $@
380
381 webkit2gtk_built_headers_dir := $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2
382 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h: stamp-webkit2enumtypes
383         @true
384
385 stamp-webkit2enumtypes: $(libwebkit2gtkinclude_HEADERS) $(WebKit2)/GNUmakefile.am
386         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2 \
387         && glib-mkenums --template $(WebKit2)/UIProcess/API/gtk/WebKitEnumTypes.h.template $(libwebkit2gtkinclude_HEADERS) | \
388                 sed 's,web_kit,webkit,' | \
389                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
390                 > wk2-xgen-gth \
391         && (cmp -s wk2-xgen-gth $(webkit2gtk_built_headers_dir)/WebKitEnumTypes.h || cp wk2-xgen-gth $(webkit2gtk_built_headers_dir)/WebKitEnumTypes.h) \
392         && rm -f wk2-xgen-gth \
393         && echo timestamp > $(@F)
394
395 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.cpp: $(libwebkit2gtkinclude_HEADERS) $(WebKit2)/GNUmakefile.am
396         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2 \
397         && glib-mkenums --template $(WebKit2)/UIProcess/API/gtk/WebKitEnumTypes.cpp.template $(libwebkit2gtkinclude_HEADERS) | \
398                 sed 's,web_kit,webkit,' \
399                 > wk2-xgen-gtc \
400         && cp wk2-xgen-gtc $@ \
401         && rm -f wk2-xgen-gtc
402
403 WEBKIT2_MARSHAL_LIST = $(WebKit2)/UIProcess/API/gtk/webkit2marshal.list
404
405 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitMarshal.cpp: stamp-webkit2marshal.cpp
406         @true
407 $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitMarshal.h: stamp-webkit2marshal.h
408         @true
409
410 stamp-webkit2marshal.cpp: $(WEBKIT2_MARSHAL_LIST)
411         $(AM_V_GEN) echo "extern \"C\" {" > $(webkit2gtk_built_headers_dir)/WebKitMarshal.cpp && \
412         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT2_MARSHAL_LIST) --body >> $(webkit2gtk_built_headers_dir)/WebKitMarshal.cpp && \
413         echo '}' >> $(webkit2gtk_built_headers_dir)/WebKitMarshal.cpp && \
414         echo timestamp > $(@F)
415
416 stamp-webkit2marshal.h: $(WEBKIT2_MARSHAL_LIST)
417         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT2_MARSHAL_LIST) --header > $(webkit2gtk_built_headers_dir)/WebKitMarshal.h && \
418         echo timestamp > $(@F)
419
420 CLEANFILES += \
421         $(BUILT_SOURCES) \
422         $(top_builddir)/stamp-webkit2enumtypes \
423         $(top_builddir)/stamp-webkit2marshal.cpp \
424         $(top_builddir)/stamp-webkit2marshal.h \
425         $(top_builddir)/Programs/WebKitWebProcess
426
427 DISTCLEANFILES += \
428         $(top_builddir)/WebKit2/webkit2gtk-@WEBKITGTK_API_VERSION@.pc
429
430 if ENABLE_WEBKIT2
431 libexec_PROGRAMS += \
432         Programs/WebKitWebProcess
433 endif
434
435 Programs_WebKitWebProcess_CPPFLAGS = \
436         -I$(srcdir)/Source/WebKit2 \
437         -I$(srcdir)/Source/WebKit2/UIProcess/API/C \
438         -I$(srcdir)/Source/WebKit2/WebProcess/gtk \
439         -I$(top_builddir)/DerivedSources/WebKit2 \
440         -I$(top_builddir)/DerivedSources/WebKit2/include \
441         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
442         $(global_cppflags) \
443         $(javascriptcore_cppflags)
444
445 Programs_WebKitWebProcess_CFLAGS = \
446         $(global_cflags) \
447         $(CAIRO_CFLAGS) \
448         $(FREETYPE_CFLAGS) \
449         $(GLIB_CFLAGS) \
450         $(GTK_CFLAGS) \
451         $(GTK_UNIX_PRINTING_CFLAGS) \
452         $(LIBSOUP_CFLAGS) \
453         $(ZLIB_CFLAGS)
454
455 Programs_WebKitWebProcess_SOURCES = \
456         Source/WebKit2/gtk/MainGtk.cpp
457
458 Programs_WebKitWebProcess_LDADD = \
459         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
460         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
461         $(FREETYPE_LIBS) \
462         $(GLIB_LIBS) \
463         $(GTK_LIBS) \
464         $(GTK_UNIX_PRINTING_LIBS) \
465         $(LIBSOUP_LIBS)
466
467 libWebCoreGtk2_la_SOURCES = \
468         $(webcoregtk_sources)
469
470 libWebCoreGtk2_la_CXXFLAGS = \
471         -fvisibility-inlines-hidden \
472         $(global_cxxflags)
473
474 libWebCoreGtk2_la_CFLAGS = \
475         -fvisibility=hidden \
476         $(global_cflags)
477
478 libWebCoreGtk2_la_CPPFLAGS = \
479         -DBUILDING_WEBKIT \
480         -DGTK_API_VERSION_2=1 \
481         $(global_cppflags) \
482         $(platform_cppflags) \
483         $(platformgtk_cppflags) \
484         $(webcore_cppflags) \
485         $(webcoregtk_cppflags) \
486         $(javascriptcore_cppflags) \
487         -fno-strict-aliasing \
488         $(COVERAGE_CFLAGS) \
489         $(ENCHANT_CFLAGS) \
490         $(GEOCLUE_CFLAGS) \
491         $(FREETYPE_CFLAGS) \
492         $(GLIB_CFLAGS) \
493         $(GSTREAMER_CFLAGS) \
494         $(GTK2_CFLAGS) \
495         $(LIBSECRET_CFLAGS) \
496         $(LIBSOUP_CFLAGS) \
497         $(LIBXML_CFLAGS) \
498         $(LIBXSLT_CFLAGS) \
499         $(SQLITE3_CFLAGS) \
500         $(UNICODE_CFLAGS) \
501         $(XRENDER_CFLAGS) \
502         $(XT_CFLAGS)
503
504 libPlatformGtk2_la_SOURCES = \
505         $(platformgtk_sources)
506
507 libPlatformGtk2_la_CXXFLAGS = \
508         -fvisibility-inlines-hidden \
509         $(global_cxxflags)
510
511 libPlatformGtk2_la_CFLAGS = \
512         -fvisibility=hidden \
513         $(global_cflags)
514
515 libPlatformGtk2_la_CPPFLAGS = \
516         -DBUILDING_WEBKIT \
517         -DGTK_API_VERSION_2=1 \
518         $(global_cppflags) \
519         $(platform_cppflags) \
520         $(platformgtk_cppflags) \
521         $(platform_webcore_cppflags) \
522         $(javascriptcore_cppflags) \
523         -fno-strict-aliasing \
524         $(GTK2_CFLAGS) \
525         $(LIBSECRET_CFLAGS) \
526         $(LIBSOUP_CFLAGS)
527
528 # Injected Bundle
529 injectedbundledir = $(libdir)/webkit2gtk-3.0/injected-bundle
530 if ENABLE_WEBKIT2
531 injectedbundle_LTLIBRARIES = libwebkit2gtkinjectedbundle.la
532 endif
533
534 libwebkit2gtkinjectedbundle_la_SOURCES = \
535         Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp
536
537 libwebkit2gtkinjectedbundle_la_LDFLAGS = \
538         $(no_undefined) \
539         -module \
540         -avoid-version
541
542 libwebkit2gtkinjectedbundle_la_CPPFLAGS = \
543         -fno-strict-aliasing \
544         -I$(srcdir)/Source/WebKit2/Platform \
545         -I$(srcdir)/Source/WebKit2/Shared \
546         -I$(srcdir)/Source/WebKit2/Shared/API/c \
547         -I$(srcdir)/Source/WebKit2/UIProcess/API/C \
548         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
549         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \
550         -I$(top_builddir)/DerivedSources/InjectedBundle \
551         -I$(top_builddir)/DerivedSources/WebKit2/include \
552         $(global_cppflags) \
553         $(javascriptcore_cppflags) \
554         $(GLIB_CFLAGS)
555
556 # Serialize linking of the plugin process with both webkit libraries.
557 plugin_process_for_dep = Programs/WebKitPluginProcess
558 plugin_process_for_dep_list = libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
559 if ENABLE_WEBKIT1
560 plugin_process_for_dep_list += \
561         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
562 endif
563 $(plugin_process_for_dep): $(plugin_process_for_dep_list)
564
565 webcore_layer_gtk2_deps = \
566         libPlatform.la \
567         libPlatformGtk2.la \
568         libWebCorePlatform.la \
569         libWebCoreGtk2.la \
570         libWebCore.la \
571         libWebCoreModules.la
572 if ENABLE_SVG
573 webcore_layer_gtk2_deps += \
574         libWebCoreSVG.la
575 endif
576 if ENABLE_INDEXED_DATABASE
577 webcore_layer_gtk2_deps += \
578         libLevelDB.la
579 endif
580 if USE_OPENGL
581 webcore_layer_gtk2_deps += \
582         libANGLE.la
583 endif
584
585 webcore_layer_gtk2_archives = $(foreach lib, $(webcore_layer_gtk2_deps), $(shell echo $(lib) | sed "s/\(.*\)\.la/.libs\/\1.a/"))
586
587 WebCoreLayerGtk2.a: $(webcore_layer_gtk2_deps)
588         $(AM_V_GEN)
589         $(AM_V_at)$(foreach archive, $(webcore_layer_gtk2_archives), $(shell ar t $(archive) | xargs -n50 ar cruT $@))
590
591 Programs_WebKitPluginProcess_CPPFLAGS = \
592         -include $(srcdir)/Source/WebKit2/WebKit2Prefix.h \
593         -I$(srcdir)/Source/WebKit2 \
594         -I$(srcdir)/Source/WebKit2/Platform \
595         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/ \
596         -I$(srcdir)/Source/WebKit2/PluginProcess/ \
597         -I$(srcdir)/Source/WebKit2/PluginProcess/unix \
598         -I$(srcdir)/Source/WebKit2/Shared \
599         -I$(srcdir)/Source/WebKit2/Shared/Plugins \
600         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape/ \
601         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins/ \
602         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher \
603         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/ \
604         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape/ \
605         -I$(srcdir)/Source/WebKit2/Shared/soup \
606         -I$(top_builddir)/DerivedSources/WebKit2 \
607         -I$(top_builddir)/DerivedSources/WebKit2/include \
608         -I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
609         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
610         -I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
611         -DBUILDING_WEBKIT \
612         -DGTK_API_VERSION_2=1 \
613         -DENABLE_PLUGIN_PROCESS=1 \
614         -DLIBEXECDIR=\""$(libexecdir)"\" \
615         $(global_cppflags) \
616         $(platform_cppflags) \
617         $(platformgtk_cppflags) \
618         $(webcore_cppflags) \
619         $(webcoregtk_cppflags) \
620         $(javascriptcore_cppflags) \
621         -fno-strict-aliasing \
622         $(CAIRO_CFLAGS) \
623         $(FREETYPE_CFLAGS) \
624         $(GLIB_CFLAGS) \
625         $(GSTREAMER_CFLAGS) \
626         $(GTK2_CFLAGS) \
627         $(LIBSOUP_CFLAGS) \
628         $(UNICODE_CFLAGS)
629
630 Programs_WebKitPluginProcess_CFLAGS = \
631         -fvisibility-inlines-hidden \
632         $(global_cflags) \
633         $(CAIRO_CFLAGS) \
634         $(GLIB_CFLAGS) \
635         $(GSTREAMER_CFLAGS) \
636         $(GTK2_CFLAGS) \
637         $(LIBSOUP_CFLAGS) \
638         $(UNICODE_CFLAGS)
639
640 nodist_Programs_WebKitPluginProcess_SOURCES = \
641         $(webkit2_plugin_process_built_sources)
642
643 Programs_WebKitPluginProcess_SOURCES = \
644         $(webkit2_plugin_process_sources)
645
646 Programs_WebKitPluginProcess_LDADD = \
647         -lpthread \
648         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
649         WebCoreLayerGtk2.a \
650         libWebKit2Platform.la \
651         $(CAIRO_LIBS) \
652         $(COVERAGE_LDFLAGS) \
653         $(FREETYPE_LIBS) \
654         $(GAMEPAD_LIBS) \
655         $(GEOCLUE_LIBS) \
656         $(GLIB_LIBS) \
657         $(GSTREAMER_LIBS) \
658         $(GTK2_LIBS) \
659         $(JPEG_LIBS) \
660         $(LIBSECRET_LIBS) \
661         $(LIBSOUP_LIBS) \
662         $(LIBXML_LIBS) \
663         $(LIBXSLT_LIBS) \
664         $(OLE32_LIBS) \
665         $(OPENGL_LIBS) \
666         $(PANGO_LIBS) \
667         $(PNG_LIBS) \
668         $(SHLWAPI_LIBS) \
669         $(SHM_LIBS) \
670         $(SQLITE3_LIBS) \
671         $(UNICODE_LIBS) \
672         $(WEBP_LIBS) \
673         $(XRENDER_LIBS) \
674         $(XT_LIBS) \
675         $(WINMM_LIBS) \
676         $(ZLIB_LIBS)
677
678 Programs_WebKitPluginProcess_CXXFLAGS = \
679         -fvisibility-inlines-hidden \
680         $(global_cxxflags)
681
682 EXTRA_DIST += \
683         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
684         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-sections.txt \
685         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk.types \
686         $(WebKit2)/Scripts/generate-message-receiver.py \
687         $(WebKit2)/Scripts/generate-messages-header.py \
688         $(WebKit2)/Scripts/webkit2/__init__.py \
689         $(WebKit2)/Scripts/webkit2/messages.py \
690         $(WebKit2)/Scripts/webkit2/model.py \
691         $(WebKit2)/Scripts/webkit2/parser.py \
692         $(WebKit2)/UIProcess/API/gtk/webkit2marshal.list \
693         $(WebKit2)/UIProcess/API/gtk/WebKitEnumTypes.h.template \
694         $(WebKit2)/UIProcess/API/gtk/WebKitEnumTypes.cpp.template \
695         $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html \
696         $(WebKit2)/Scripts/generate-forwarding-headers.pl \
697         $(shell ls $(WebKit2)/PluginProcess/*.in) \
698         $(shell ls $(WebKit2)/Shared/*.in) \
699         $(shell ls $(WebKit2)/Shared/Authentication/*.in) \
700         $(shell ls $(WebKit2)/Shared/Plugins/*.in) \
701         $(shell ls $(WebKit2)/UIProcess/*.in) \
702         $(shell ls $(WebKit2)/UIProcess/Downloads/*.in) \
703         $(shell ls $(WebKit2)/UIProcess/Notifications/*.in) \
704         $(shell ls $(WebKit2)/UIProcess/Plugins/*.in) \
705         $(shell ls $(WebKit2)/UIProcess/Storage/*.in) \
706         $(shell ls $(WebKit2)/UIProcess/soup/*.in) \
707         $(shell ls $(WebKit2)/WebProcess/*.in) \
708         $(shell ls $(WebKit2)/WebProcess/ApplicationCache/*.in) \
709         $(shell ls $(WebKit2)/WebProcess/Battery/*.in) \
710         $(shell ls $(WebKit2)/WebProcess/Cookies/*.in) \
711         $(shell ls $(WebKit2)/WebProcess/FullScreen/*.in) \
712         $(shell ls $(WebKit2)/WebProcess/Geolocation/*.in) \
713         $(shell ls $(WebKit2)/WebProcess/IconDatabase/*.in) \
714         $(shell ls $(WebKit2)/WebProcess/MediaCache/*.in) \
715         $(shell ls $(WebKit2)/WebProcess/NetworkInfo/*.in) \
716         $(shell ls $(WebKit2)/WebProcess/Notifications/*.in) \
717         $(shell ls $(WebKit2)/WebProcess/Plugins/*.in) \
718         $(shell ls $(WebKit2)/WebProcess/ResourceCache/*.in) \
719         $(shell ls $(WebKit2)/WebProcess/Storage/*.in) \
720         $(shell ls $(WebKit2)/WebProcess/WebCoreSupport/*.in) \
721         $(shell ls $(WebKit2)/WebProcess/WebPage/*.in) \
722         $(shell ls $(WebKit2)/WebProcess/soup/*.in)
723
724 # Installing remote inspector files
725 remoteinspectordir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector
726 remoteinspector_DATA = \
727         $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
728