3be7be263ac37689852f8112468c2adfdd72cb62
[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
28 nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
29         $(webkit2_built_sources) \
30         $(webkit2gtk_built_sources)
31
32 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
33         $(webkit2_sources)
34
35 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
36         -fno-strict-aliasing \
37         $(global_cppflags) \
38         -include $(srcdir)/Source/WebKit2/WebKit2Prefix.h \
39         -I$(srcdir)/Source/WebKit/gtk \
40         -I$(srcdir)/Source/WebKit2 \
41         -I$(srcdir)/Source/WebKit2/gtk \
42         -I$(srcdir)/Source/WebKit2/Platform \
43         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC \
44         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/gtk \
45         -I$(srcdir)/Source/WebKit2/Platform/gtk \
46         -I$(srcdir)/Source/WebKit2/PluginProcess \
47         -I$(srcdir)/Source/WebKit2/Shared \
48         -I$(srcdir)/Source/WebKit2/Shared/API \
49         -I$(srcdir)/Source/WebKit2/Shared/API/c \
50         -I$(srcdir)/Source/WebKit2/Shared/API/c/gtk \
51         -I$(srcdir)/Source/WebKit2/Shared/API/c/soup \
52         -I$(srcdir)/Source/WebKit2/Shared/CoreIPCSupport \
53         -I$(srcdir)/Source/WebKit2/Shared/gtk \
54         -I$(srcdir)/Source/WebKit2/Shared/Network \
55         -I$(srcdir)/Source/WebKit2/Shared/Plugins \
56         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape \
57         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape/x11 \
58         -I$(srcdir)/Source/WebKit2/Shared/soup \
59         -I$(srcdir)/Source/WebKit2/UIProcess \
60         -I$(srcdir)/Source/WebKit2/UIProcess/API \
61         -I$(srcdir)/Source/WebKit2/UIProcess/API/C \
62         -I$(srcdir)/Source/WebKit2/UIProcess/API/C/gtk \
63         -I$(srcdir)/Source/WebKit2/UIProcess/API/C/soup \
64         -I$(srcdir)/Source/WebKit2/UIProcess/API/cpp \
65         -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
66         -I$(srcdir)/Source/WebKit2/UIProcess/Authentication \
67         -I$(srcdir)/Source/WebKit2/UIProcess/Downloads \
68         -I$(srcdir)/Source/WebKit2/UIProcess/gtk \
69         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher \
70         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher/gtk \
71         -I$(srcdir)/Source/WebKit2/UIProcess/Notifications \
72         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins \
73         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins/unix \
74         -I$(srcdir)/Source/WebKit2/UIProcess/soup \
75         -I$(srcdir)/Source/WebKit2/UIProcess/InspectorServer \
76         -I$(srcdir)/Source/WebKit2/WebProcess \
77         -I$(srcdir)/Source/WebKit2/WebProcess/ApplicationCache \
78         -I$(srcdir)/Source/WebKit2/WebProcess/Authentication \
79         -I$(srcdir)/Source/WebKit2/WebProcess/Battery \
80         -I$(srcdir)/Source/WebKit2/WebProcess/Cookies \
81         -I$(srcdir)/Source/WebKit2/WebProcess/Downloads \
82         -I$(srcdir)/Source/WebKit2/WebProcess/Downloads/soup \
83         -I$(srcdir)/Source/WebKit2/WebProcess/FullScreen \
84         -I$(srcdir)/Source/WebKit2/WebProcess/Geolocation \
85         -I$(srcdir)/Source/WebKit2/WebProcess/gtk \
86         -I$(srcdir)/Source/WebKit2/WebProcess/IconDatabase \
87         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle \
88         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API \
89         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/API/c \
90         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/DOM \
91         -I$(srcdir)/Source/WebKit2/WebProcess/InjectedBundle/gtk \
92         -I$(srcdir)/Source/WebKit2/WebProcess/KeyValueStorage \
93         -I$(srcdir)/Source/WebKit2/WebProcess/Launching \
94         -I$(srcdir)/Source/WebKit2/WebProcess/MediaCache \
95         -I$(srcdir)/Source/WebKit2/WebProcess/NetworkInfo \
96         -I$(srcdir)/Source/WebKit2/WebProcess/Notifications \
97         -I$(srcdir)/Source/WebKit2/WebProcess/ResourceCache \
98         -I$(srcdir)/Source/WebKit2/WebProcess/soup \
99         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins \
100         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape \
101         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape/unix \
102         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport \
103         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/gtk \
104         -I$(srcdir)/Source/WebKit2/WebProcess/WebCoreSupport/soup \
105         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage \
106     -I$(srcdir)/Source/WebKit2/WebProcess/WebPage/atk \
107         -I$(srcdir)/Source/WebKit2/WebProcess/WebPage/gtk \
108         -I$(top_builddir)/DerivedSources/WebKit2 \
109         -I$(top_builddir)/DerivedSources/WebKit2/include \
110         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
111         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
112         -I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/webkit2 \
113         -I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
114         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
115         -I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
116         -DLIBEXECDIR=\""$(libexecdir)"\" \
117         -DWEBKIT2_COMPILATION \
118         -DENABLE_PLUGIN_PROCESS=1 \
119         $(webcore_cppflags) \
120         $(webcoregtk_cppflags) \
121         $(javascriptcore_cppflags) \
122         $(CLUTTER_CFLAGS) \
123         $(COVERAGE_CFLAGS) \
124         $(FREETYPE_CFLAGS) \
125         $(GEOCLUE_CFLAGS) \
126         $(GLIB_CFLAGS) \
127         $(GTK_CFLAGS) \
128         $(GTK_UNIX_PRINTING_CFLAGS) \
129         $(LIBSOUP_CFLAGS) \
130         $(UNICODE_CFLAGS) \
131         $(XCOMPOSITE_CFLAGS) \
132         $(XDAMAGE_CFLAGS) \
133         $(XT_CFLAGS)
134
135 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
136         $(global_cxxflags)
137
138 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
139         $(global_cflags)
140
141 # Artificial dependency to make sure libwebkit2gtk and libwebkitgtk are not linked at the same time
142 # The variable creation is to avoid having automake override the entire rule instead of adding the
143 # dependency.
144 webkit2gtk_lib_for_dep = libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
145 $(webkit2gtk_lib_for_dep): libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
146
147 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = \
148         $(libwebkit2gtkincludedir)/WebKit2
149
150 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
151 if !TARGET_WIN32
152 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
153         -DXP_UNIX
154 endif
155
156 # Add MOZ_X11 for X11 targets only
157 if TARGET_X11
158 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
159         -DMOZ_X11
160 endif
161
162 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
163         -version-info @LIBWEBKIT2GTK_VERSION@ \
164         $(version_script) \
165         $(no_undefined)
166
167 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD := \
168         -lpthread \
169         libWebCore.la \
170         libWebCorePlatform.la \
171         libWebCoreModules.la
172
173 if ENABLE_SVG
174 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
175         libWebCoreSVG.la
176 endif
177
178 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
179         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
180         libWebCoreGtk.la \
181         $(CAIRO_LIBS) \
182         $(CLUTTER_LIBS) \
183         $(COVERAGE_LDFLAGS) \
184         $(FARSTREAM_LIBS) \
185         $(FREETYPE_LIBS) \
186         $(GAIL_LIBS) \
187         $(GAMEPAD_LIBS) \
188         $(GEOCLUE_LIBS) \
189         $(GLIB_LIBS) \
190         $(GSTREAMER_LIBS) \
191         $(GTK_LIBS) \
192         $(GTK_UNIX_PRINTING_LIBS) \
193         $(JPEG_LIBS) \
194         $(LIBSECRET_LIBS) \
195         $(LIBSOUP_LIBS) \
196         $(LIBXML_LIBS) \
197         $(LIBXSLT_LIBS) \
198         $(OPENGL_LIBS) \
199         $(PANGO_LIBS) \
200         $(PNG_LIBS) \
201         $(SQLITE3_LIBS) \
202         $(UNICODE_LIBS) \
203         $(WEBP_LIBS) \
204         $(XRENDER_LIBS) \
205         $(XCOMPOSITE_LIBS) \
206         $(XDAMAGE_LIBS) \
207         $(XT_LIBS) \
208         $(ZLIB_LIBS)
209
210 if ENABLE_SPELLCHECK
211 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
212         -DENABLE_SPELLCHECK=1 \
213         $(ENCHANT_CFLAGS)
214
215 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
216         $(ENCHANT_LIBS)
217 endif
218
219
220 if ENABLE_WEBKIT2
221 pkgconfig_DATA += Source/WebKit2/webkit2gtk-@WEBKITGTK_API_VERSION@.pc
222
223 if ENABLE_INTROSPECTION
224
225 WebKit2-@WEBKITGTK_API_VERSION@.gir: $(G_IR_SCANNER) libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
226         $(AM_V_GEN)$(G_IR_SCANNER) -v --warn-all \
227              --symbol-prefix=webkit \
228              --identifier-prefix=WebKit \
229              --namespace=WebKit2 \
230              --nsversion=@WEBKITGTK_API_VERSION@ \
231              --include=GObject-2.0 \
232              --include=Gtk-3.0 \
233              --include=Soup-2.4 \
234              --library=webkit2gtk-@WEBKITGTK_API_VERSION@ \
235              --library=javascriptcoregtk-@WEBKITGTK_API_VERSION@ \
236              --libtool="$(LIBTOOL)" \
237              --pkg=gobject-2.0 \
238              --pkg=gtk+-@GTK_API_VERSION@ \
239              --pkg=libsoup-2.4 \
240              --pkg-export=webkit2gtk-@WEBKITGTK_API_VERSION@ \
241              --output=$@ \
242              --add-include-path=$(WebKit2) \
243              --add-include-path=$(top_builddir) \
244              --c-include="webkit2/webkit2.h" \
245              -I$(srcdir)/Source \
246              -I$(WebKit2) \
247              -I$(GENSOURCES) \
248              -I$(GENSOURCES_WEBKIT2) \
249              -I$(top_builddir)/Source/WebKit2/UIProcess/API/gtk \
250              -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
251              -I$(top_srcdir) \
252              -I$(GENSOURCES_WEBKIT2)/webkit2gtk/include \
253              -I$(GENSOURCES_WEBKIT2)/webkit2gtk \
254              -DWEBKIT2_COMPILATION \
255              $(GENSOURCES_WEBKIT2)/webkit2gtk/webkit2/WebKitEnumTypes.h \
256              $(webkit2gtk_h_api) \
257              $(WebKit2)/UIProcess/API/gtk/*.cpp
258
259 gir2dir = $(datadir)/gir-1.0
260 gir2_DATA = WebKit2-@WEBKITGTK_API_VERSION@.gir
261
262 typelibs2dir = $(libdir)/girepository-1.0
263 typelibs2_DATA = WebKit2-@WEBKITGTK_API_VERSION@.typelib
264
265 WebKit2-@WEBKITGTK_API_VERSION@.typelib: WebKit2-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER)
266         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit2) --includedir $(top_builddir) $< -o $@
267
268 CLEANFILES += WebKit2-@WEBKITGTK_API_VERSION@.gir WebKit2-@WEBKITGTK_API_VERSION@.typelib
269
270 endif
271 endif
272
273 # WebKit2 specific variables
274 forwarding_headers := $(GENSOURCES_WEBKIT2)/include
275 generate-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(libWebKit2_la_SOURCES)
276         $(AM_V_GEN)$(PERL) $< $(WebKit2) $(forwarding_headers) gtk
277         $(AM_V_GEN)$(PERL) $< $(WebKit2) $(forwarding_headers) soup
278
279 BUILT_SOURCES += generate-webkit2-forwarding-headers
280
281 $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2: $(libwebkit2gtkinclude_HEADERS)
282         $(AM_V_GEN)mkdir -p $(GENSOURCES_WEBKIT2)/webkit2gtk/include \
283         && ln -n -s -f ${shell pwd}/$(WebKit2)/UIProcess/API/gtk $@
284
285 BUILT_SOURCES += $(GENSOURCES_WEBKIT2)/webkit2gtk/include/webkit2
286
287 vpath %.messages.in = \
288         $(WebKit2)/PluginProcess \
289         $(WebKit2)/Shared \
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/soup \
299         $(WebKit2)/WebProcess \
300         $(WebKit2)/WebProcess/ApplicationCache \
301         $(WebKit2)/WebProcess/Authentication \
302         $(WebKit2)/WebProcess/Battery \
303         $(WebKit2)/WebProcess/Cookies \
304         $(WebKit2)/WebProcess/FullScreen \
305         $(WebKit2)/WebProcess/Geolocation \
306         $(WebKit2)/WebProcess/IconDatabase \
307         $(WebKit2)/WebProcess/KeyValueStorage \
308         $(WebKit2)/WebProcess/MediaCache \
309         $(WebKit2)/WebProcess/NetworkInfo \
310         $(WebKit2)/WebProcess/Notifications \
311         $(WebKit2)/WebProcess/Plugins \
312         $(WebKit2)/WebProcess/ResourceCache \
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         $(GLIB_CFLAGS) \
429         $(GTK_CFLAGS) \
430         $(GTK_UNIX_PRINTING_CFLAGS) \
431         $(LIBSOUP_CFLAGS) \
432         $(ZLIB_CFLAGS)
433
434 Programs_WebKitWebProcess_SOURCES = \
435         Source/WebKit2/gtk/MainGtk.cpp
436
437 Programs_WebKitWebProcess_LDADD = \
438         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
439         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
440         $(GLIB_LIBS) \
441         $(GTK_LIBS) \
442         $(GTK_UNIX_PRINTING_LIBS) \
443         $(LIBSOUP_LIBS)
444
445 libWebCoreGtk2_la_SOURCES = \
446         $(webcoregtk_sources)
447
448 libWebCoreGtk2_la_CXXFLAGS = \
449         $(SYMBOL_VISIBILITY_INLINES) \
450         $(global_cxxflags)
451
452 libWebCoreGtk2_la_CFLAGS = \
453         $(SYMBOL_VISIBILITY) \
454         $(global_cflags)
455
456 libWebCoreGtk2_la_CPPFLAGS = \
457         -DBUILDING_WEBKIT \
458         -DGTK_API_VERSION_2=1 \
459         $(global_cppflags) \
460         $(webcore_cppflags) \
461         $(webcoregtk_cppflags) \
462         $(javascriptcore_cppflags) \
463         -fno-strict-aliasing \
464         $(COVERAGE_CFLAGS) \
465         $(ENCHANT_CFLAGS) \
466         $(GEOCLUE_CFLAGS) \
467         $(FREETYPE_CFLAGS) \
468         $(FARSTREAM_CFLAGS) \
469         $(GLIB_CFLAGS) \
470         $(GSTREAMER_CFLAGS) \
471         $(GTK2_CFLAGS) \
472         $(LIBSECRET_CFLAGS) \
473         $(LIBSOUP_CFLAGS) \
474         $(LIBXML_CFLAGS) \
475         $(LIBXSLT_CFLAGS) \
476         $(SQLITE3_CFLAGS) \
477         $(UNICODE_CFLAGS) \
478         $(XRENDER_CFLAGS) \
479         $(XT_CFLAGS)
480
481 # Serialize linking of the plugin process with both webkit libraries.
482 plugin_process_for_dep = Programs/WebKitPluginProcess
483 $(plugin_process_for_dep): libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
484
485 Programs_WebKitPluginProcess_CPPFLAGS = \
486         -include $(srcdir)/Source/WebKit2/WebKit2Prefix.h \
487         -I$(srcdir)/Source/WebKit2 \
488         -I$(srcdir)/Source/WebKit2/Platform \
489         -I$(srcdir)/Source/WebKit2/Platform/CoreIPC/ \
490         -I$(srcdir)/Source/WebKit2/PluginProcess/ \
491         -I$(srcdir)/Source/WebKit2/PluginProcess/unix \
492         -I$(srcdir)/Source/WebKit2/Shared \
493         -I$(srcdir)/Source/WebKit2/Shared/Plugins \
494         -I$(srcdir)/Source/WebKit2/Shared/Plugins/Netscape/ \
495         -I$(srcdir)/Source/WebKit2/UIProcess/Plugins/ \
496         -I$(srcdir)/Source/WebKit2/UIProcess/Launcher \
497         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/ \
498         -I$(srcdir)/Source/WebKit2/WebProcess/Plugins/Netscape/ \
499         -I$(srcdir)/Source/WebKit2/Shared/soup \
500         -I$(top_builddir)/DerivedSources/WebKit2 \
501         -I$(top_builddir)/DerivedSources/WebKit2/include \
502         -I$(top_builddir)/DerivedSources/WebKit2/include/JavaScriptCore \
503         -I$(top_builddir)/DerivedSources/WebKit2/include/WebCore \
504         -I$(top_builddir)/DerivedSources/WebKit2/include/WebKit2 \
505         -DBUILDING_WEBKIT \
506         -DGTK_API_VERSION_2=1 \
507         -DENABLE_PLUGIN_PROCESS=1 \
508         -DLIBEXECDIR=\""$(libexecdir)"\" \
509         $(global_cppflags) \
510         $(webcore_cppflags) \
511         $(webcoregtk_cppflags) \
512         $(javascriptcore_cppflags) \
513         -fno-strict-aliasing \
514         $(CAIRO_CFLAGS) \
515         $(FREETYPE_CFLAGS) \
516         $(GLIB_CFLAGS) \
517         $(GSTREAMER_CFLAGS) \
518         $(GTK2_CFLAGS) \
519         $(LIBSOUP_CFLAGS) \
520         $(UNICODE_CFLAGS)
521
522 Programs_WebKitPluginProcess_CFLAGS = \
523         $(SYMBOL_VISIBILITY) \
524         $(global_cflags) \
525         $(CAIRO_CFLAGS) \
526         $(GLIB_CFLAGS) \
527         $(GSTREAMER_CFLAGS) \
528         $(GTK2_CFLAGS) \
529         $(LIBSOUP_CFLAGS) \
530         $(UNICODE_CFLAGS)
531
532 nodist_Programs_WebKitPluginProcess_SOURCES = \
533         $(webkit2_plugin_process_built_sources)
534
535 Programs_WebKitPluginProcess_SOURCES = \
536         $(webkit2_plugin_process_sources)
537
538 Programs_WebKitPluginProcess_LDADD = \
539         -lpthread \
540         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
541         libWebCore.la
542
543 #if ENABLE_SVG
544 Programs_WebKitPluginProcess_LDADD += \
545     libWebCoreSVG.la
546 #endif
547
548 Programs_WebKitPluginProcess_LDADD += \
549         libWebCorePlatform.la \
550         libWebCoreGtk2.la \
551         $(CAIRO_LIBS) \
552         $(COVERAGE_LDFLAGS) \
553         $(GEOCLUE_LIBS) \
554         $(GLIB_LIBS) \
555         $(GSTREAMER_LIBS) \
556         $(GTK2_LIBS) \
557         $(JPEG_LIBS) \
558         $(LIBSECRET_LIBS) \
559         $(LIBSOUP_LIBS) \
560         $(LIBXML_LIBS) \
561         $(LIBXSLT_LIBS) \
562         $(OLE32_LIBS) \
563         $(OPENGL_LIBS) \
564         $(PANGO_LIBS) \
565         $(PNG_LIBS) \
566         $(SHLWAPI_LIBS) \
567         $(SHM_LIBS) \
568         $(SQLITE3_LIBS) \
569         $(UNICODE_LIBS) \
570         $(WEBP_LIBS) \
571         $(XRENDER_LIBS) \
572         $(XT_LIBS) \
573         $(WINMM_LIBS) \
574         $(ZLIB_LIBS)
575
576 # libWebCore and libWebCoreModules have circular dependencies that only seem to
577 # be a problem when linking the plugin process; we don't really care about
578 # modules for the plugin process, though, so to work around that we ignore
579 # internal unresolved symbols
580 Programs_WebKitPluginProcess_LDFLAGS = \
581         -Wl,--unresolved-symbols=ignore-in-object-files
582
583 Programs_WebKitPluginProcess_CXXFLAGS = \
584         $(SYMBOL_VISIBILITY_INLINES) \
585         $(global_cxxflags)
586
587 EXTRA_DIST += \
588         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
589         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk-sections.txt \
590         $(WebKit2)/UIProcess/API/gtk/docs/webkit2gtk.types \
591         $(WebKit2)/Scripts/generate-message-receiver.py \
592         $(WebKit2)/Scripts/generate-messages-header.py \
593         $(WebKit2)/Scripts/webkit2/__init__.py \
594         $(WebKit2)/Scripts/webkit2/messages.py \
595         $(WebKit2)/Scripts/webkit2/model.py \
596         $(WebKit2)/Scripts/webkit2/parser.py \
597         $(WebKit2)/UIProcess/API/gtk/webkit2marshal.list \
598         $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html \
599         $(WebKit2)/Scripts/generate-forwarding-headers.pl \
600         $(shell ls $(WebKit2)/PluginProcess/*.in) \
601         $(shell ls $(WebKit2)/Shared/*.in) \
602         $(shell ls $(WebKit2)/Shared/Plugins/*.in) \
603         $(shell ls $(WebKit2)/UIProcess/*.in) \
604         $(shell ls $(WebKit2)/UIProcess/Downloads/*.in) \
605         $(shell ls $(WebKit2)/UIProcess/Notifications/*.in) \
606         $(shell ls $(WebKit2)/UIProcess/Plugins/*.in) \
607         $(shell ls $(WebKit2)/UIProcess/soup/*.in) \
608         $(shell ls $(WebKit2)/WebProcess/*.in) \
609         $(shell ls $(WebKit2)/WebProcess/ApplicationCache/*.in) \
610         $(shell ls $(WebKit2)/WebProcess/Authentication/*.in) \
611         $(shell ls $(WebKit2)/WebProcess/Battery/*.in) \
612         $(shell ls $(WebKit2)/WebProcess/Cookies/*.in) \
613         $(shell ls $(WebKit2)/WebProcess/FullScreen/*.in) \
614         $(shell ls $(WebKit2)/WebProcess/Geolocation/*.in) \
615         $(shell ls $(WebKit2)/WebProcess/IconDatabase/*.in) \
616         $(shell ls $(WebKit2)/WebProcess/KeyValueStorage/*.in) \
617         $(shell ls $(WebKit2)/WebProcess/MediaCache/*.in) \
618         $(shell ls $(WebKit2)/WebProcess/NetworkInfo/*.in) \
619         $(shell ls $(WebKit2)/WebProcess/Notifications/*.in) \
620         $(shell ls $(WebKit2)/WebProcess/Plugins/*.in) \
621         $(shell ls $(WebKit2)/WebProcess/ResourceCache/*.in) \
622         $(shell ls $(WebKit2)/WebProcess/WebCoreSupport/*.in) \
623         $(shell ls $(WebKit2)/WebProcess/WebPage/*.in) \
624         $(shell ls $(WebKit2)/WebProcess/soup/*.in)
625
626 # Installing remote inspector files
627 remoteinspectordir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/webinspector
628 remoteinspector_DATA = \
629         $(WebKit2)/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
630