[GTK] Use XDamage to simplify RedirectedXCompositeWindow
[WebKit-https.git] / Source / WebKit / gtk / GNUmakefile.am
1 lib_LTLIBRARIES += \
2         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
3
4 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
5         $(webkitgtk_built_sources)
6
7 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(libwebkitgtkincludedir)/webkit
8 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
9         $(webkitgtk_static_h_api)
10
11 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
12         $(webkitgtk_built_h_api) \
13         $(GENSOURCES_WEBKIT)/webkitenumtypes.h
14
15 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
16         $(webkitgtk_sources)
17
18 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
19         $(SYMBOL_VISIBILITY_INLINES) \
20         $(global_cxxflags)
21
22 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
23         $(SYMBOL_VISIBILITY) \
24         $(global_cflags)
25
26 if ENABLE_SPELLCHECK
27 webkitgtk_cppflags += \
28         -DENABLE_SPELLCHECK=1
29
30 webkitgtk_sources += \
31         Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp \
32         Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
33 endif
34
35 # When building WebCore/WebKit, we want WebCore/config.h and NOT JavaScriptCore/config.h,
36 # hence, it's important that WebCore/ should come first before JavaScriptCore in the
37 # include path.
38 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
39         -DBUILDING_WEBKIT \
40         -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
41         -DDATA_DIR=\"${datadir}\" \
42         -I$(WebCore)/bindings \
43         -I$(WebCore)/bindings/gobject \
44         -I$(WebKit) \
45         -I$(WebKit)/WebCoreSupport \
46         -I$(WebKit)/webkit \
47         -I$(GENSOURCES_WEBKIT) \
48         -ISource/WebKit/gtk/webkit \
49         $(global_cppflags) \
50         $(webcore_cppflags) \
51         $(webcoregtk_cppflags) \
52         $(javascriptcore_cppflags) \
53         $(webkitgtk_cppflags) \
54         -fno-strict-aliasing \
55         $(CLUTTER_CFLAGS) \
56         $(CLUTTER_GTK_CFLAGS) \
57         $(COVERAGE_CFLAGS) \
58         $(ENCHANT_CFLAGS) \
59         $(GAIL_CFLAGS) \
60         $(GEOCLUE_CFLAGS) \
61         $(GLIB_CFLAGS) \
62         $(GSTREAMER_CFLAGS) \
63         $(GTK_CFLAGS) \
64         $(LIBSOUP_CFLAGS) \
65         $(LIBXML_CFLAGS) \
66         $(LIBXSLT_CFLAGS) \
67         $(SQLITE3_CFLAGS) \
68         $(UNICODE_CFLAGS) \
69         $(XCOMPOSITE_LIBS) \
70         $(XDAMAGE_LIBS) \
71         $(XT_CFLAGS) \
72         $(ZLIB_CFLAGS)
73
74 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
75         -version-info @LIBWEBKITGTK_VERSION@ \
76         $(version_script) \
77         $(no_undefined)
78
79 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
80         -lpthread \
81         libWebCore.la \
82         libWebCoreModules.la \
83         libWebCoreGtk.la \
84         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
85         $(CAIRO_LIBS) \
86         $(CLUTTER_LIBS) \
87         $(CLUTTER_GTK_LIBS) \
88         $(COVERAGE_LDFLAGS) \
89         $(ENCHANT_LIBS) \
90         $(FREETYPE_LIBS) \
91         $(GAIL_LIBS) \
92         $(GAMEPAD_LIBS) \
93         $(GEOCLUE_LIBS) \
94         $(GLIB_LIBS) \
95         $(GSTREAMER_LIBS) \
96         $(GTK_LIBS) \
97         $(JPEG_LIBS) \
98         $(LIBSOUP_LIBS) \
99         $(LIBXML_LIBS) \
100         $(LIBXSLT_LIBS) \
101         $(OPENGL_LIBS) \
102         $(PANGO_LIBS) \
103         $(PNG_LIBS) \
104         $(SQLITE3_LIBS) \
105         $(UNICODE_LIBS) \
106         $(XCOMPOSITE_LIBS) \
107         $(XDAMAGE_LIBS) \
108         $(XRENDER_LIBS) \
109         $(XT_LIBS) \
110         $(WINMM_LIBS) \
111         $(SHLWAPI_LIBS) \
112         $(OLE32_LIBS) \
113         $(ZLIB_LIBS)
114
115 webkitgtk_static_h_api += \
116         $(srcdir)/Source/WebKit/gtk/webkit/webkit.h \
117         $(srcdir)/Source/WebKit/gtk/webkit/webkitapplicationcache.h \
118         $(srcdir)/Source/WebKit/gtk/webkit/webkitdefines.h \
119         $(srcdir)/Source/WebKit/gtk/webkit/webkitdownload.h \
120         $(srcdir)/Source/WebKit/gtk/webkit/webkiterror.h \
121         $(srcdir)/Source/WebKit/gtk/webkit/webkitfavicondatabase.h \
122         $(srcdir)/Source/WebKit/gtk/webkit/webkitfilechooserrequest.h \
123         $(srcdir)/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
124         $(srcdir)/Source/WebKit/gtk/webkit/webkitglobals.h \
125         $(srcdir)/Source/WebKit/gtk/webkit/webkithittestresult.h \
126         $(srcdir)/Source/WebKit/gtk/webkit/webkiticondatabase.h \
127         $(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkrequest.h \
128         $(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkresponse.h \
129         $(srcdir)/Source/WebKit/gtk/webkit/webkitsecurityorigin.h \
130         $(srcdir)/Source/WebKit/gtk/webkit/webkitsoupauthdialog.h \
131         $(srcdir)/Source/WebKit/gtk/webkit/webkitspellchecker.h \
132         $(srcdir)/Source/WebKit/gtk/webkit/webkitviewportattributes.h \
133         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
134         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatabase.h \
135         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatasource.h \
136         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebframe.h \
137         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebhistoryitem.h \
138         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebinspector.h \
139         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebnavigationaction.h \
140         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugin.h \
141         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugindatabase.h \
142         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebpolicydecision.h \
143         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebresource.h \
144         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebsettings.h \
145         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
146         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebview.h
147
148 webkitgtk_built_h_api += \
149         Source/WebKit/gtk/webkit/webkitversion.h
150
151 webkitgtk_h_api += \
152         $(webkitgtk_built_h_api) \
153         $(webkitgtk_static_h_api)
154
155 # webkitenumtypes.{h,cpp} cannot be in webkitgtk_built_h_api, because
156 # the rule that builds it depends on webkitgtk_built_h_api (circular dependency).
157 webkitgtk_built_sources += \
158         DerivedSources/webkit/webkitenumtypes.cpp \
159         DerivedSources/webkit/webkitenumtypes.h \
160         DerivedSources/webkit/webkitmarshal.cpp \
161         DerivedSources/webkit/webkitmarshal.h \
162         $(webkitgtk_built_h_api) \
163         $(webkitgtk_gdom_built_sources) 
164 BUILT_SOURCES += $(webkitgtk_built_sources)
165
166 webkitgtk_sources += \
167         Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp \
168         Source/WebCore/bindings/gobject/ConvertToUTF8String.h \
169         Source/WebCore/bindings/gobject/DOMObjectCache.cpp \
170         Source/WebCore/bindings/gobject/DOMObjectCache.h \
171         Source/WebCore/bindings/gobject/GObjectEventListener.cpp \
172         Source/WebCore/bindings/gobject/GObjectEventListener.h \
173         Source/WebCore/bindings/gobject/WebKitDOMBinding.cpp \
174         Source/WebCore/bindings/gobject/WebKitDOMBinding.h \
175         Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp \
176         Source/WebCore/bindings/gobject/WebKitDOMCustom.h \
177         Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp \
178         Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h \
179         Source/WebCore/bindings/gobject/WebKitDOMEventTargetPrivate.h \
180         Source/WebCore/bindings/gobject/WebKitDOMObject.cpp \
181         Source/WebCore/bindings/gobject/WebKitDOMObject.h \
182         Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp \
183         Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h \
184         Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h \
185         Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp \
186         Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp \
187         Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp \
188         Source/WebKit/gtk/WebCoreSupport/AssertMatchingEnums.cpp \
189         Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
190         Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
191         Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
192         Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
193         Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.cpp \
194         Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.h \
195         Source/WebKit/gtk/WebCoreSupport/DeviceOrientationClientGtk.cpp \
196         Source/WebKit/gtk/WebCoreSupport/DeviceOrientationClientGtk.h \
197         Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
198         Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
199         Source/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
200         Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h \
201         Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
202         Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
203         Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
204         Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
205         Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
206         Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
207         Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp \
208         Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
209         Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp \
210         Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h \
211         Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp \
212         Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h \
213         Source/WebKit/gtk/WebCoreSupport/GtkAdjustmentWatcher.cpp \
214         Source/WebKit/gtk/WebCoreSupport/GtkAdjustmentWatcher.h \
215         Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
216         Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
217         Source/WebKit/gtk/WebCoreSupport/NavigatorContentUtilsClientGtk.h \
218         Source/WebKit/gtk/WebCoreSupport/NavigatorContentUtilsClientGtk.cpp \
219         Source/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
220         Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h \
221         Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp \
222         Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp \
223         Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h \
224         Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp \
225         Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h \
226         Source/WebKit/gtk/webkit/webkitapplicationcache.cpp \
227         Source/WebKit/gtk/webkit/webkitdownload.cpp \
228         Source/WebKit/gtk/webkit/webkitdownloadprivate.h \
229         Source/WebKit/gtk/webkit/webkiterror.cpp \
230         Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp \
231         Source/WebKit/gtk/webkit/webkitfavicondatabaseprivate.h \
232         Source/WebKit/gtk/webkit/webkitfilechooserrequest.cpp \
233         Source/WebKit/gtk/webkit/webkitfilechooserrequest.h \
234         Source/WebKit/gtk/webkit/webkitfilechooserrequestprivate.h \
235         Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
236         Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h \
237         Source/WebKit/gtk/webkit/webkitglobals.cpp \
238         Source/WebKit/gtk/webkit/webkitglobals.h \
239         Source/WebKit/gtk/webkit/webkitglobalsprivate.h \
240         Source/WebKit/gtk/webkit/webkithittestresult.cpp \
241         Source/WebKit/gtk/webkit/webkithittestresultprivate.h \
242         Source/WebKit/gtk/webkit/webkiticondatabase.cpp \
243         Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp \
244         Source/WebKit/gtk/webkit/webkitnetworkrequestprivate.h \
245         Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp \
246         Source/WebKit/gtk/webkit/webkitnetworkresponseprivate.h \
247         Source/WebKit/gtk/webkit/webkitsecurityorigin.cpp \
248         Source/WebKit/gtk/webkit/webkitsecurityoriginprivate.h \
249         Source/WebKit/gtk/webkit/webkitsoupauthdialog.cpp \
250         Source/WebKit/gtk/webkit/webkitspellchecker.cpp \
251         Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp \
252         Source/WebKit/gtk/webkit/webkitspellcheckerenchant.h \
253         Source/WebKit/gtk/webkit/webkitversion.cpp \
254         Source/WebKit/gtk/webkit/webkitviewportattributes.cpp \
255         Source/WebKit/gtk/webkit/webkitviewportattributesprivate.h \
256         Source/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
257         Source/WebKit/gtk/webkit/webkitwebbackforwardlistprivate.h \
258         Source/WebKit/gtk/webkit/webkitwebdatabase.cpp \
259         Source/WebKit/gtk/webkit/webkitwebdatasource.cpp \
260         Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h \
261         Source/WebKit/gtk/webkit/webkitwebframe.cpp \
262         Source/WebKit/gtk/webkit/webkitwebframeprivate.h \
263         Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
264         Source/WebKit/gtk/webkit/webkitwebhistoryitemprivate.h \
265         Source/WebKit/gtk/webkit/webkitwebinspector.cpp \
266         Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h \
267         Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
268         Source/WebKit/gtk/webkit/webkitwebnavigationactionprivate.h \
269         Source/WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
270         Source/WebKit/gtk/webkit/webkitwebpolicydecisionprivate.h \
271         Source/WebKit/gtk/webkit/webkitwebresource.cpp \
272         Source/WebKit/gtk/webkit/webkitwebresourceprivate.h \
273         Source/WebKit/gtk/webkit/webkitwebplugin.cpp \
274         Source/WebKit/gtk/webkit/webkitwebpluginprivate.h \
275         Source/WebKit/gtk/webkit/webkitwebplugindatabase.cpp \
276         Source/WebKit/gtk/webkit/webkitwebplugindatabaseprivate.h \
277         Source/WebKit/gtk/webkit/webkitwebsettings.cpp \
278         Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h \
279         Source/WebKit/gtk/webkit/webkitwebview.cpp \
280         Source/WebKit/gtk/webkit/webkitwebviewprivate.h \
281         Source/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
282         Source/WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h
283
284 pkgconfig_DATA += Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
285
286 if ENABLE_INTROSPECTION
287
288 JSCore-@WEBKITGTK_API_VERSION@.gir: $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
289         $(AM_V_GEN)cp $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(top_builddir)/
290
291 JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
292 WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
293
294 $(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
295         $(AM_V_GEN)$(G_IR_SCANNER) -v --warn-all \
296              --symbol-prefix=webkit \
297              --identifier-prefix=WebKit \
298              --namespace=WebKit \
299              --nsversion=@WEBKITGTK_API_VERSION@ \
300              --include=GObject-2.0 \
301              --include=Gtk-@GTK_API_VERSION@ \
302              --include=JSCore-@WEBKITGTK_API_VERSION@ \
303              --include=Soup-2.4 \
304              --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
305              --library=javascriptcoregtk-@WEBKITGTK_API_VERSION@ \
306              --libtool="$(LIBTOOL)" \
307              --pkg=gobject-2.0 \
308              --pkg=gtk+-@GTK_API_VERSION@ \
309              --pkg=libsoup-2.4 \
310              --pkg-export=webkitgtk-@WEBKITGTK_API_VERSION@ \
311              --output=$@ \
312              --add-include-path=$(WebKit) \
313              --add-include-path=$(top_builddir) \
314              --c-include="webkit/webkit.h" \
315              -I$(srcdir)/Source \
316              -I$(WebKit) \
317              -I$(GENSOURCES) \
318              -I$(GENSOURCES_WEBKIT) \
319              -I$(top_builddir)/Source/WebKit/gtk \
320              -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
321              -I$(top_srcdir) \
322              $(GENSOURCES_WEBKIT)/webkitenumtypes.h \
323              $(webkitgtk_h_api) \
324              $(WebKit)/webkit/*.cpp
325
326 girdir = $(datadir)/gir-1.0
327 gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
328
329 typelibsdir += $(libdir)/girepository-1.0
330 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
331
332 %.typelib: %.gir $(G_IR_COMPILER)
333         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@
334
335 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
336
337 endif
338
339 EXTRA_DIST += $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
340
341 WEBKIT_MARSHAL_LIST = $(WebKit)/webkitmarshal.list
342 $(GENSOURCES_WEBKIT)/webkitmarshal.cpp: stamp-webkitmarshal.cpp
343         @true
344 $(GENSOURCES_WEBKIT)/webkitmarshal.h: stamp-webkitmarshal.h
345         @true
346
347 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
348         $(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
349         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
350         echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
351         echo timestamp > $(@F)
352
353 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
354         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(GENSOURCES_WEBKIT)/webkitmarshal.h && \
355         echo timestamp > $(@F)
356
357 $(GENSOURCES_WEBKIT)/webkitenumtypes.h: stamp-webkitenumtypes.h
358         @true
359 stamp-webkitenumtypes.h: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
360         $(AM_V_GEN)glib-mkenums \
361                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
362                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
363                         --fhead "#include <glib-object.h>\n\n" \
364                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
365                         --fhead "G_BEGIN_DECLS\n\n" \
366                         --ftail "G_END_DECLS\n\n" \
367                         --ftail "#endif\n" \
368                         --fprod "#include <webkit/@basename@>\n\n" \
369                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
370                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
371                 $(webkitgtk_h_api) | \
372                 sed 's,web_kit,webkit,' | \
373                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
374                 > xgen-gth \
375         && (cmp -s xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h || cp xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h) \
376         && rm -f xgen-gth \
377         && echo timestamp > $(@F)
378
379 $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
380         $(AM_V_GEN)glib-mkenums \
381                         --fhead "#include <config.h>\n" \
382                         --fhead "#include <glib-object.h>\n" \
383                         --fhead "#include \"$(GENSOURCES_WEBKIT)/webkitenumtypes.h\"\n\n" \
384                         --fhead "extern \"C\" {\n\n" \
385                         --fprod "\n/* enumerations from \"@filename@\" */" \
386                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
387                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
388                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
389                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
390                         --vtail "    static GType type = 0;\n\n" \
391                         --vtail "    if (!type)\n" \
392                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
393                         --vtail "    return type;\n}\n\n" \
394                         --ftail "}\n" \
395                 $(webkitgtk_h_api) | \
396                 sed 's,web_kit,webkit,' \
397                 > xgen-gtc \
398         && cp xgen-gtc $@ \
399         && rm -f xgen-gtc
400
401 EXTRA_DIST += \
402         $(WebKit)/ChangeLog \
403         $(WebKit)/NEWS \
404         $(WebKit)/docs/webkitgtk-docs.sgml \
405         $(WebKit)/docs/webkitgtk-sections.txt \
406         $(WebKit)/docs/webkitgtk.types \
407         $(WebKit)/docs/webkitenvironment.xml \
408         $(WebKit)/docs/webkitgtk-overrides.txt \
409         $(WebKit)/webkitmarshal.list \
410         $(WebKit)/po/* \
411         $(WebKit)/resources/* \
412         $(WebKit)/tests/resources/* \
413         $(WebKit)/tests/test_utils.h
414
415 # extra resource files
416 resourcesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/resources
417 dist_resources_DATA = \
418         $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
419
420 # Build unit tests
421 webkit_tests_cflags = \
422         -fno-strict-aliasing \
423         -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
424         -I$(WebKit) \
425         -I$(GENSOURCES) \
426         -I$(top_builddir)/Source/WebKit/gtk \
427         -I$(top_srcdir)/Source/WebCore/bindings \
428         -I$(top_srcdir)/Source/WebCore/bindings/gobject \
429         $(global_cppflags) \
430         $(global_cflags) \
431         $(javascriptcore_cppflags) \
432         $(GLIB_CFLAGS) \
433         $(GTK_CFLAGS) \
434         $(LIBSOUP_CFLAGS) \
435         $(XRENDER_LIBS) \
436         $(XT_LIBS)
437
438 webkit_tests_ldadd = \
439         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
440         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
441         $(GTK_LIBS) \
442         $(GLIB_LIBS) \
443         $(LIBSOUP_LIBS)
444
445 webkit_tests_ldflags = \
446         -no-install \
447         -no-fast-install
448
449 noinst_PROGRAMS += \
450         Programs/unittests/testapplicationcache \
451         Programs/unittests/testcontextmenu \
452         Programs/unittests/testdomdocument \
453         Programs/unittests/testdomdomwindow \
454         Programs/unittests/testdomnode \
455         Programs/unittests/testhttpbackend \
456         Programs/unittests/testfavicondatabase \
457         Programs/unittests/testloading \
458         Programs/unittests/testglobals \
459         Programs/unittests/testmimehandling \
460         Programs/unittests/testnetworkrequest \
461         Programs/unittests/testnetworkresponse \
462         Programs/unittests/testwebframe \
463         Programs/unittests/testwebbackforwardlist \
464         Programs/unittests/testwebhistoryitem \
465         Programs/unittests/testwindow \
466         Programs/unittests/testdownload \
467         Programs/unittests/testatk \
468         Programs/unittests/testatkroles \
469         Programs/unittests/testhittestresult \
470         Programs/unittests/testwebinspector \
471         Programs/unittests/testwebsettings \
472         Programs/unittests/testwebresource \
473         Programs/unittests/testwebdatasource \
474         Programs/unittests/testwebplugindatabase \
475         Programs/unittests/testwebview \
476         Programs/unittests/testkeyevents \
477         Programs/unittests/testcopyandpaste
478
479 # Add additional tests here
480 Programs_unittests_testapplicationcache_SOURCES = Source/WebKit/gtk/tests/testapplicationcache.c
481 Programs_unittests_testapplicationcache_CFLAGS = $(webkit_tests_cflags)
482 Programs_unittests_testapplicationcache_LDADD = $(webkit_tests_ldadd)
483 Programs_unittests_testapplicationcache_LDFLAGS = $(webkit_tests_ldflags)
484
485 Programs_unittests_testcontextmenu_SOURCES = Source/WebKit/gtk/tests/testcontextmenu.c
486 Programs_unittests_testcontextmenu_CFLAGS = $(webkit_tests_cflags)
487 Programs_unittests_testcontextmenu_LDADD = $(webkit_tests_ldadd)
488 Programs_unittests_testcontextmenu_LDFLAGS = $(webkit_tests_ldflags)
489
490 Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
491 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
492 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
493 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
494
495 Programs_unittests_testdomdomwindow_SOURCES = Source/WebKit/gtk/tests/testdomdomwindow.c
496 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
497 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
498 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
499
500 Programs_unittests_testdomnode_SOURCES = Source/WebKit/gtk/tests/testdomnode.c
501 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
502 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
503 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
504
505 Programs_unittests_testhttpbackend_SOURCES = Source/WebKit/gtk/tests/testhttpbackend.c
506 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
507 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
508 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
509
510 Programs_unittests_testfavicondatabase_SOURCES = Source/WebKit/gtk/tests/testfavicondatabase.c Source/WebKit/gtk/tests/test_utils.c
511 Programs_unittests_testfavicondatabase_CFLAGS = $(webkit_tests_cflags)
512 Programs_unittests_testfavicondatabase_LDADD = $(webkit_tests_ldadd)
513 Programs_unittests_testfavicondatabase_LDFLAGS = $(webkit_tests_ldflags)
514
515 Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
516 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
517 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
518 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
519
520 Programs_unittests_testloading_SOURCES = Source/WebKit/gtk/tests/testloading.c
521 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
522 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
523 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
524
525 Programs_unittests_testmimehandling_SOURCES = Source/WebKit/gtk/tests/testmimehandling.c Source/WebKit/gtk/tests/test_utils.c
526 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
527 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
528 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
529
530 Programs_unittests_testnetworkrequest_SOURCES = Source/WebKit/gtk/tests/testnetworkrequest.c
531 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
532 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
533 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
534
535 Programs_unittests_testnetworkresponse_SOURCES = Source/WebKit/gtk/tests/testnetworkresponse.c
536 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
537 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
538 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
539
540 Programs_unittests_testwebframe_SOURCES = Source/WebKit/gtk/tests/testwebframe.c
541 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
542 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
543 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
544
545 Programs_unittests_testwebplugindatabase_SOURCES = Source/WebKit/gtk/tests/testwebplugindatabase.c
546 Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" $(webkit_tests_cflags)
547 Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
548 Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
549
550 Programs_unittests_testwebbackforwardlist_SOURCES = Source/WebKit/gtk/tests/testwebbackforwardlist.c
551 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
552 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
553 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
554
555 Programs_unittests_testwebhistoryitem_SOURCES = Source/WebKit/gtk/tests/testwebhistoryitem.c
556 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
557 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
558 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
559
560 Programs_unittests_testwindow_SOURCES = Source/WebKit/gtk/tests/testwindow.c
561 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
562 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
563 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
564
565 Programs_unittests_testdownload_SOURCES = Source/WebKit/gtk/tests/testdownload.c
566 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
567 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
568 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
569
570 Programs_unittests_testatk_SOURCES = Source/WebKit/gtk/tests/testatk.c
571 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
572 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
573 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
574
575 Programs_unittests_testatkroles_SOURCES = Source/WebKit/gtk/tests/testatkroles.c
576 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
577 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
578 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
579
580 Programs_unittests_testwebinspector_SOURCES = Source/WebKit/gtk/tests/testwebinspector.c Source/WebKit/gtk/tests/test_utils.c
581 Programs_unittests_testwebinspector_CFLAGS = $(webkit_tests_cflags)
582 Programs_unittests_testwebinspector_LDADD = $(webkit_tests_ldadd)
583 Programs_unittests_testwebinspector_LDFLAGS = $(webkit_tests_ldflags)
584
585 Programs_unittests_testwebsettings_SOURCES = Source/WebKit/gtk/tests/testwebsettings.c
586 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
587 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
588 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
589
590 Programs_unittests_testwebresource_SOURCES = Source/WebKit/gtk/tests/testwebresource.c
591 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
592 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
593
594 Programs_unittests_testwebdatasource_SOURCES = Source/WebKit/gtk/tests/testwebdatasource.c
595 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
596 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
597
598 Programs_unittests_testwebview_SOURCES = Source/WebKit/gtk/tests/testwebview.c Source/WebKit/gtk/tests/test_utils.c
599 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
600 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
601 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
602
603 Programs_unittests_testhittestresult_SOURCES = Source/WebKit/gtk/tests/testhittestresult.c
604 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
605 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
606
607 Programs_unittests_testkeyevents_SOURCES = Source/WebKit/gtk/tests/testkeyevents.c
608 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
609 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
610 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
611
612 Programs_unittests_testcopyandpaste_SOURCES = Source/WebKit/gtk/tests/testcopyandpaste.c \
613         Source/WebCore/platform/gtk/GtkVersioning.c
614 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
615         -I$(srcdir)/Source/WebCore/platform/gtk \
616         -I$(srcdir)/Source/WebCore
617 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
618 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
619
620 # Project-wide clean rules
621 # Files that will be cleaned
622 CLEANFILES += \
623         $(BUILT_SOURCES) \
624         $(top_builddir)/stamp-webkitmarshal.cpp \
625         $(top_builddir)/stamp-webkitmarshal.h \
626         $(top_builddir)/stamp-webkitenumtypes.cpp \
627         $(top_builddir)/stamp-webkitenumtypes.h \
628         $(top_builddir)/Programs/GtkLauncher
629
630 DISTCLEANFILES += \
631         $(top_builddir)/Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
632         $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml \
633         $(top_builddir)/Source/WebKit/gtk/webkit/webkitversion.h
634
635 install-data-local: po-install-data-local
636 installdirs-data-local: po-installdirs-data-local
637 uninstall-local: po-uninstall-local
638