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