2010-11-17 Martin Robinson <mrobinson@igalia.com>
[WebKit-https.git] / WebKit / gtk / GNUmakefile.am
1
2 # Programs to run the WebKitGtk unit tests
3 GTESTER = gtester
4 GTESTER_REPORT = gtester-report
5
6 lib_LTLIBRARIES += \
7         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
8
9 nodist_EXTRA_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
10         $(webcore_built_nosources)
11
12 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
13         $(webcore_built_sources) \
14         $(webkitgtk_built_sources)
15
16 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
17 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
18         $(webkitgtk_static_h_api)
19
20 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
21         $(webkitgtk_built_h_api) \
22         $(GENSOURCES_WEBKIT)/webkitenumtypes.h
23
24 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
25         $(webcore_sources) \
26         $(webcoregtk_sources) \
27         $(webkitgtk_sources)
28
29 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
30         $(global_cxxflags)
31
32 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
33         $(global_cflags)
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         -IWebKit/gtk/webkit \
49         $(global_cppflags) \
50         $(webcore_cppflags) \
51         $(webcoregtk_cppflags) \
52         $(javascriptcore_cppflags) \
53         -fno-strict-aliasing \
54         $(HILDON_CPPFLAGS) \
55         $(COVERAGE_CFLAGS) \
56         $(ENCHANT_CFLAGS) \
57         $(GAIL_CFLAGS) \
58         $(GEOCLUE_CFLAGS) \
59         $(GLIB_CFLAGS) \
60         $(GSTREAMER_CFLAGS) \
61         $(GTK_CFLAGS) \
62         $(HILDON_CFLAGS) \
63         $(LIBSOUP_CFLAGS) \
64         $(LIBXML_CFLAGS) \
65         $(LIBXSLT_CFLAGS) \
66         $(SQLITE3_CFLAGS) \
67         $(UNICODE_CFLAGS) \
68         $(XT_CFLAGS)
69
70 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
71 if !TARGET_WIN32
72 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS += \
73         -DXP_UNIX
74 endif
75
76 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
77         -version-info @LIBWEBKITGTK_VERSION@ \
78         $(version_script) \
79         $(no_undefined)
80
81 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
82         -lpthread \
83         libJavaScriptCore.la \
84         $(webcore_ldflags) \
85         $(CAIRO_LIBS) \
86         $(COVERAGE_LDFLAGS) \
87         $(ENCHANT_LIBS) \
88         $(FREETYPE_LIBS) \
89         $(GAIL_LIBS) \
90         $(GEOCLUE_LIBS) \
91         $(GLIB_LIBS) \
92         $(GSTREAMER_LIBS) \
93         $(GTK_LIBS) \
94         $(HILDON_LIBS) \
95         $(JPEG_LIBS) \
96         $(LIBSOUP_LIBS) \
97         $(LIBXML_LIBS) \
98         $(LIBXSLT_LIBS) \
99         $(PANGO_LIBS) \
100         $(PNG_LIBS) \
101         $(SQLITE3_LIBS) \
102         $(UNICODE_LIBS) \
103         $(XT_LIBS) \
104         $(WINMM_LIBS) \
105         $(SHLWAPI_LIBS) \
106         $(OLE32_LIBS)
107
108 webkitgtk_static_h_api += \
109         $(srcdir)/WebCore/platform/network/soup/cache/webkit/soup-cache.h \
110         $(srcdir)/WebKit/gtk/webkit/webkit.h \
111         $(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
112         $(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
113         $(srcdir)/WebKit/gtk/webkit/webkiterror.h \
114         $(srcdir)/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
115         $(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
116         $(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
117         $(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
118         $(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h \
119         $(srcdir)/WebKit/gtk/webkit/webkitsoupauthdialog.h \
120         $(srcdir)/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
121         $(srcdir)/WebKit/gtk/webkit/webkitwebdatabase.h \
122         $(srcdir)/WebKit/gtk/webkit/webkitwebdatasource.h \
123         $(srcdir)/WebKit/gtk/webkit/webkitwebframe.h \
124         $(srcdir)/WebKit/gtk/webkit/webkitwebhistoryitem.h \
125         $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
126         $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
127         $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
128         $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
129         $(srcdir)/WebKit/gtk/webkit/webkitwebsettings.h \
130         $(srcdir)/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
131         $(srcdir)/WebKit/gtk/webkit/webkitwebview.h
132
133 webkitgtk_built_h_api += \
134         WebKit/gtk/webkit/webkitversion.h
135
136 webkitgtk_h_api += \
137         $(webkitgtk_built_h_api) \
138         $(webkitgtk_static_h_api)
139
140 # webkitenumtypes.{h,cpp} cannot be in webkitgtk_built_h_api, because
141 # the rule that builds it depends on webkitgtk_built_h_api (circular dependency).
142 webkitgtk_built_sources += \
143         DerivedSources/webkit/webkitenumtypes.cpp \
144         DerivedSources/webkit/webkitenumtypes.h \
145         DerivedSources/webkit/webkitmarshal.cpp \
146         DerivedSources/webkit/webkitmarshal.h \
147         $(webkitgtk_built_h_api) \
148         $(webkitgtk_gdom_built_sources) 
149 BUILT_SOURCES += $(webkitgtk_built_sources)
150
151 webkitgtk_sources += \
152         WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
153         WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
154         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
155         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
156         WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
157         WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
158         WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
159         WebKit/gtk/WebCoreSupport/DragClientGtk.h \
160         WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
161         WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
162         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
163         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
164         WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
165         WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
166         WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
167         WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp \
168         WebKit/gtk/WebCoreSupport/FullscreenVideoController.h \
169         WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
170         WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
171         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
172         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
173         WebKit/gtk/webkit/webkitapplicationcache.cpp \
174         WebKit/gtk/webkit/webkitdownload.cpp \
175         WebKit/gtk/webkit/webkiterror.cpp \
176         WebKit/gtk/webkit/webkithittestresult.cpp \
177         WebKit/gtk/webkit/webkitnetworkrequest.cpp \
178         WebKit/gtk/webkit/webkitnetworkresponse.cpp \
179         WebKit/gtk/webkit/webkitprivate.cpp \
180         WebKit/gtk/webkit/webkitprivate.h \
181         WebKit/gtk/webkit/webkitsoupauthdialog.c \
182         WebKit/gtk/webkit/webkitversion.cpp \
183         WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
184         WebKit/gtk/webkit/webkitwebdatasource.cpp \
185         WebKit/gtk/webkit/webkitwebframe.cpp \
186         WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
187         WebKit/gtk/webkit/webkitwebinspector.cpp \
188         WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
189         WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
190         WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
191         WebKit/gtk/webkit/webkitwebresource.cpp \
192         WebKit/gtk/webkit/webkitwebdatabase.cpp \
193         WebKit/gtk/webkit/webkitsecurityorigin.cpp \
194         WebKit/gtk/webkit/webkitwebsettings.cpp \
195         WebKit/gtk/webkit/webkitwebview.cpp \
196         WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
197         WebKit/gtk/webkit/webkitworkers.cpp
198
199 pkgconfigdir = $(libdir)/pkgconfig
200 pkgconfig_DATA = WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
201
202 if ENABLE_INTROSPECTION
203
204 JSCore-@WEBKITGTK_API_VERSION@.gir: $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
205         $(AM_V_GEN)cp $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(builddir)/
206
207 JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
208 WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
209
210 $(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
211         $(AM_V_GEN)$(G_IR_SCANNER) -v --warn-all \
212              --symbol-prefix=webkit \
213              --identifier-prefix=WebKit \
214              --namespace=WebKit \
215              --nsversion=@WEBKITGTK_API_VERSION@ \
216              --include=GObject-2.0 \
217              --include=Gtk-@GTK_API_VERSION@ \
218              --include=JSCore-@WEBKITGTK_API_VERSION@ \
219              --include=Soup-2.4 \
220              --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
221              --libtool="$(LIBTOOL)" \
222              --pkg=gobject-2.0 \
223              --pkg=gtk+-@GTK_API_VERSION@ \
224              --pkg=libsoup-2.4 \
225              --output=$@ \
226              --add-include-path=$(WebKit) \
227              --add-include-path=$(builddir) \
228              -I$(top_srcdir)/WebCore/platform/network/soup/cache \
229              -I$(WebKit) \
230              -I$(GENSOURCES) \
231              -I$(GENSOURCES_WEBKIT) \
232              -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
233              -I$(top_srcdir) \
234              $(GENSOURCES_WEBKIT)/webkitenumtypes.h \
235              $(webkitgtk_h_api) \
236              $(WebKit)/webkit/*.cpp \
237              $(WebKit)/webkit/*.c
238
239 girdir = $(datadir)/gir-1.0
240 gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
241
242 typelibsdir += $(libdir)/girepository-1.0
243 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
244
245 %.typelib: %.gir $(G_IR_COMPILER)
246         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(builddir) $< -o $@
247
248 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
249
250 endif
251
252 EXTRA_DIST += $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
253
254 WEBKIT_MARSHAL_LIST = $(WebKit)/webkitmarshal.list
255 $(GENSOURCES_WEBKIT)/webkitmarshal.cpp: stamp-webkitmarshal.cpp
256         @true
257 $(GENSOURCES_WEBKIT)/webkitmarshal.h: stamp-webkitmarshal.h
258         @true
259
260 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
261         $(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
262         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
263         echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
264         echo timestamp > $(@F)
265
266 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
267         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(GENSOURCES_WEBKIT)/webkitmarshal.h && \
268         echo timestamp > $(@F)
269
270 $(GENSOURCES_WEBKIT)/webkitenumtypes.h: stamp-webkitenumtypes.h
271         @true
272 stamp-webkitenumtypes.h: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
273         $(AM_V_GEN)glib-mkenums \
274                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
275                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
276                         --fhead "#include <glib-object.h>\n\n" \
277                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
278                         --fhead "G_BEGIN_DECLS\n\n" \
279                         --ftail "G_END_DECLS\n\n" \
280                         --ftail "#endif\n" \
281                         --fprod "#include <webkit/@basename@>\n\n" \
282                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
283                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
284                 $(webkitgtk_h_api) | \
285                 sed 's,web_kit,webkit,' | \
286                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
287                 > xgen-gth \
288         && (cmp -s xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h || cp xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h) \
289         && rm -f xgen-gth \
290         && echo timestamp > $(@F)
291
292 $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
293         $(AM_V_GEN)glib-mkenums \
294                         --fhead "#include <config.h>\n" \
295                         --fhead "#include <glib-object.h>\n" \
296                         --fhead "#include \"$(GENSOURCES_WEBKIT)/webkitenumtypes.h\"\n\n" \
297                         --fhead "extern \"C\" {\n\n" \
298                         --fprod "\n/* enumerations from \"@filename@\" */" \
299                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
300                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
301                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
302                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
303                         --vtail "    static GType type = 0;\n\n" \
304                         --vtail "    if (!type)\n" \
305                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
306                         --vtail "    return type;\n}\n\n" \
307                         --ftail "}\n" \
308                 $(webkitgtk_h_api) | \
309                 sed 's,web_kit,webkit,' \
310                 > xgen-gtc \
311         && cp xgen-gtc $@ \
312         && rm -f xgen-gtc
313
314 # GSettings
315 if USE_GSETTINGS
316 gsettings_SCHEMAS = $(top_builddir)/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml
317 @GSETTINGS_RULES@
318 endif
319
320 EXTRA_DIST += \
321         $(WebKit)/ChangeLog \
322         $(WebKit)/NEWS \
323         $(WebKit)/webkitmarshal.list \
324         $(WebKit)/docs/GNUmakefile.* \
325         $(WebKit)/docs/webkitenvironment.xml \
326         $(WebKit)/docs/webkitgtk-docs.sgml \
327         $(WebKit)/docs/webkitgtk-sections.txt \
328         $(WebKit)/docs/version.xml.in \
329         $(WebKit)/po/* \
330         $(WebKit)/resources/* \
331         $(WebKit)/tests/resources/* \
332         $(WebKit)/tests/test_utils.h \
333         $(WebKit)/org.webkitgtk.gschema.xml.in
334
335 # extra resource files
336 resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
337 dist_resources_DATA = \
338         $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
339
340 # Build unit tests
341 noinst_PROGRAMS += $(TEST_PROGS)
342 webkit_tests_cflags = \
343         -fno-strict-aliasing \
344         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
345         -I$(WebCore)/platform/network/soup/cache \
346         -I$(WebKit) \
347         -I$(GENSOURCES) \
348         -I$(top_builddir)/WebKit/gtk \
349         -I$(top_srcdir)/WebCore/bindings \
350         -I$(top_srcdir)/WebCore/bindings/gobject \
351         $(global_cppflags) \
352         $(global_cflags) \
353         $(GLIB_CFLAGS) \
354         $(GTK_CFLAGS) \
355         $(LIBSOUP_CFLAGS)
356
357 webkit_tests_ldadd = \
358         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
359         $(GTK_LIBS) \
360         $(GLIB_LIBS) \
361         $(LIBSOUP_LIBS)
362
363 webkit_tests_ldflags = \
364         -no-install \
365         -no-fast-install
366
367 TEST_PROGS += \
368         Programs/unittests/testdomdocument \
369         Programs/unittests/testdomdomwindow \
370         Programs/unittests/testdomnode \
371         Programs/unittests/testhttpbackend \
372         Programs/unittests/testloading \
373         Programs/unittests/testglobals \
374         Programs/unittests/testmimehandling \
375         Programs/unittests/testnetworkrequest \
376         Programs/unittests/testnetworkresponse \
377         Programs/unittests/testwebframe \
378         Programs/unittests/testwebbackforwardlist \
379         Programs/unittests/testwebhistoryitem \
380         Programs/unittests/testwindow \
381         Programs/unittests/testdownload \
382         Programs/unittests/testatk \
383         Programs/unittests/testatkroles \
384         Programs/unittests/testhittestresult \
385         Programs/unittests/testwebsettings \
386         Programs/unittests/testwebresource \
387         Programs/unittests/testwebdatasource \
388         Programs/unittests/testwebview \
389         Programs/unittests/testkeyevents \
390         Programs/unittests/testcopyandpaste
391
392 # Add additional tests here
393 Programs_unittests_testdomdocument_SOURCES = WebKit/gtk/tests/testdomdocument.c
394 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
395 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
396 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
397
398 Programs_unittests_testdomdomwindow_SOURCES = WebKit/gtk/tests/testdomdomwindow.c
399 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
400 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
401 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
402
403 Programs_unittests_testdomnode_SOURCES = WebKit/gtk/tests/testdomnode.c
404 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
405 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
406 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
407
408 Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
409 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
410 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
411 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
412
413 Programs_unittests_testglobals_SOURCES = WebKit/gtk/tests/testglobals.c
414 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
415 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
416 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
417
418 Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
419 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
420 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
421 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
422
423 Programs_unittests_testmimehandling_SOURCES = WebKit/gtk/tests/testmimehandling.c WebKit/gtk/tests/test_utils.c
424 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
425 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
426 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
427
428 Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
429 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
430 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
431 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
432
433 Programs_unittests_testnetworkresponse_SOURCES = WebKit/gtk/tests/testnetworkresponse.c
434 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
435 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
436 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
437
438 Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
439 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
440 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
441 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
442
443 Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
444 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
445 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
446 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
447
448 Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
449 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
450 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
451 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
452
453 Programs_unittests_testwindow_SOURCES = WebKit/gtk/tests/testwindow.c
454 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
455 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
456 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
457
458 Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
459 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
460 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
461 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
462
463 Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
464 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
465 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
466 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
467
468 Programs_unittests_testatkroles_SOURCES = WebKit/gtk/tests/testatkroles.c
469 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
470 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
471 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
472
473 Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
474 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
475 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
476 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
477
478 Programs_unittests_testwebresource_SOURCES = WebKit/gtk/tests/testwebresource.c
479 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
480 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
481
482 Programs_unittests_testwebdatasource_SOURCES = WebKit/gtk/tests/testwebdatasource.c
483 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
484 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
485
486 Programs_unittests_testwebview_SOURCES = WebKit/gtk/tests/testwebview.c WebKit/gtk/tests/test_utils.c
487 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
488 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
489 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
490
491 Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c
492 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
493 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
494
495 Programs_unittests_testkeyevents_SOURCES = WebKit/gtk/tests/testkeyevents.c
496 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
497 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
498 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
499
500 Programs_unittests_testcopyandpaste_SOURCES = WebKit/gtk/tests/testcopyandpaste.c \
501         WebCore/platform/gtk/GtkVersioning.c
502 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
503         -I$(srcdir)/WebCore/platform/gtk \
504         -I$(srcdir)/WebCore
505 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
506 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
507
508 # Project-wide clean rules
509 # Files that will be cleaned
510 CLEANFILES += \
511         $(BUILT_SOURCES) \
512         $(top_builddir)/stamp-webkitmarshal.cpp \
513         $(top_builddir)/stamp-webkitmarshal.h \
514         $(top_builddir)/stamp-webkitenumtypes.cpp \
515         $(top_builddir)/stamp-webkitenumtypes.h \
516         $(top_builddir)/Programs/GtkLauncher
517
518 DISTCLEANFILES += \
519         $(top_builddir)/WebKit/gtk/docs/version.xml \
520         $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
521         $(top_builddir)/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
522         $(top_builddir)/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml \
523         $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
524
525 dist-hook:
526         cp $(WebKit)/NEWS $(distdir)
527 install-data-local: po-install-data-local
528 installdirs-data-local: po-installdirs-data-local
529 uninstall-local: po-uninstall-local
530
531 # Run all tests in cwd
532 # FIXME: we should run this under xvfb
533 test: $(TEST_PROGS)
534         $(GTESTER) --verbose $(TEST_PROGS);
535
536 # test-report: run tests in cwd and generate report
537 # full-report: run tests in cwd with -m perf and -m slow and generate report
538 # perf-report: run tests in cwd with -m perf and generate report
539 test-report full-report perf-report: $(TEST_PROGS)
540         @ case $@ in \
541           test-report) test_options="-k";; \
542           full-report) test_options="-k -m=perf";; \
543           perf-report) test_options="-k -m=perf -m=slow";; \
544           esac ; \
545           $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
546           $(GTESTER_REPORT) test-report.xml > test-report.html ;
547
548 .PHONY: test test-report perf-report full-report
549 check-local: test