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