2011-01-29 Dan Winship <danw@gnome.org>
[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/WebCore/platform/network/soup/cache/webkit/soup-cache.h \
102         $(srcdir)/Source/WebKit/gtk/webkit/webkit.h \
103         $(srcdir)/Source/WebKit/gtk/webkit/webkitdefines.h \
104         $(srcdir)/Source/WebKit/gtk/webkit/webkitdownload.h \
105         $(srcdir)/Source/WebKit/gtk/webkit/webkiterror.h \
106         $(srcdir)/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
107         $(srcdir)/Source/WebKit/gtk/webkit/webkitglobals.h \
108         $(srcdir)/Source/WebKit/gtk/webkit/webkithittestresult.h \
109         $(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkrequest.h \
110         $(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkresponse.h \
111         $(srcdir)/Source/WebKit/gtk/webkit/webkitsecurityorigin.h \
112         $(srcdir)/Source/WebKit/gtk/webkit/webkitsoupauthdialog.h \
113         $(srcdir)/Source/WebKit/gtk/webkit/webkitviewportattributes.h \
114         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
115         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatabase.h \
116         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatasource.h \
117         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebframe.h \
118         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebhistoryitem.h \
119         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebinspector.h \
120         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebnavigationaction.h \
121         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugin.h \
122         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugindatabase.h \
123         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebpolicydecision.h \
124         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebresource.h \
125         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebsettings.h \
126         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
127         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebview.h
128
129 webkitgtk_built_h_api += \
130         Source/WebKit/gtk/webkit/webkitversion.h
131
132 webkitgtk_h_api += \
133         $(webkitgtk_built_h_api) \
134         $(webkitgtk_static_h_api)
135
136 # webkitenumtypes.{h,cpp} cannot be in webkitgtk_built_h_api, because
137 # the rule that builds it depends on webkitgtk_built_h_api (circular dependency).
138 webkitgtk_built_sources += \
139         DerivedSources/webkit/webkitenumtypes.cpp \
140         DerivedSources/webkit/webkitenumtypes.h \
141         DerivedSources/webkit/webkitmarshal.cpp \
142         DerivedSources/webkit/webkitmarshal.h \
143         $(webkitgtk_built_h_api) \
144         $(webkitgtk_gdom_built_sources) 
145 BUILT_SOURCES += $(webkitgtk_built_sources)
146
147 webkitgtk_sources += \
148         Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp \
149         Source/WebCore/bindings/gobject/ConvertToUTF8String.h \
150         Source/WebCore/bindings/gobject/DOMObjectCache.cpp \
151         Source/WebCore/bindings/gobject/DOMObjectCache.h \
152         Source/WebCore/bindings/gobject/GObjectEventListener.cpp \
153         Source/WebCore/bindings/gobject/GObjectEventListener.h \
154         Source/WebCore/bindings/gobject/WebKitDOMBinding.cpp \
155         Source/WebCore/bindings/gobject/WebKitDOMBinding.h \
156         Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp \
157         Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h \
158         Source/WebCore/bindings/gobject/WebKitDOMEventTargetPrivate.h \
159         Source/WebCore/bindings/gobject/WebKitDOMObject.cpp \
160         Source/WebCore/bindings/gobject/WebKitDOMObject.h \
161         Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp \
162         Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h \
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$(top_srcdir)/Source/WebCore/platform/network/soup/cache \
265              -I$(WebKit) \
266              -I$(GENSOURCES) \
267              -I$(GENSOURCES_WEBKIT) \
268              -I$(top_builddir)/Source/WebKit/gtk \
269              -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
270              -I$(top_srcdir) \
271              $(GENSOURCES_WEBKIT)/webkitenumtypes.h \
272              $(webkitgtk_h_api) \
273              $(WebKit)/webkit/*.cpp \
274              $(WebKit)/webkit/*.c
275
276 girdir = $(datadir)/gir-1.0
277 gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
278
279 typelibsdir += $(libdir)/girepository-1.0
280 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
281
282 %.typelib: %.gir $(G_IR_COMPILER)
283         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@
284
285 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
286
287 endif
288
289 EXTRA_DIST += $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
290
291 WEBKIT_MARSHAL_LIST = $(WebKit)/webkitmarshal.list
292 $(GENSOURCES_WEBKIT)/webkitmarshal.cpp: stamp-webkitmarshal.cpp
293         @true
294 $(GENSOURCES_WEBKIT)/webkitmarshal.h: stamp-webkitmarshal.h
295         @true
296
297 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
298         $(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
299         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
300         echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
301         echo timestamp > $(@F)
302
303 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
304         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(GENSOURCES_WEBKIT)/webkitmarshal.h && \
305         echo timestamp > $(@F)
306
307 $(GENSOURCES_WEBKIT)/webkitenumtypes.h: stamp-webkitenumtypes.h
308         @true
309 stamp-webkitenumtypes.h: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
310         $(AM_V_GEN)glib-mkenums \
311                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
312                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
313                         --fhead "#include <glib-object.h>\n\n" \
314                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
315                         --fhead "G_BEGIN_DECLS\n\n" \
316                         --ftail "G_END_DECLS\n\n" \
317                         --ftail "#endif\n" \
318                         --fprod "#include <webkit/@basename@>\n\n" \
319                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
320                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
321                 $(webkitgtk_h_api) | \
322                 sed 's,web_kit,webkit,' | \
323                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
324                 > xgen-gth \
325         && (cmp -s xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h || cp xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h) \
326         && rm -f xgen-gth \
327         && echo timestamp > $(@F)
328
329 $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
330         $(AM_V_GEN)glib-mkenums \
331                         --fhead "#include <config.h>\n" \
332                         --fhead "#include <glib-object.h>\n" \
333                         --fhead "#include \"$(GENSOURCES_WEBKIT)/webkitenumtypes.h\"\n\n" \
334                         --fhead "extern \"C\" {\n\n" \
335                         --fprod "\n/* enumerations from \"@filename@\" */" \
336                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
337                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
338                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
339                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
340                         --vtail "    static GType type = 0;\n\n" \
341                         --vtail "    if (!type)\n" \
342                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
343                         --vtail "    return type;\n}\n\n" \
344                         --ftail "}\n" \
345                 $(webkitgtk_h_api) | \
346                 sed 's,web_kit,webkit,' \
347                 > xgen-gtc \
348         && cp xgen-gtc $@ \
349         && rm -f xgen-gtc
350
351 # GSettings
352 gsettings_SCHEMAS = $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml
353 @GSETTINGS_RULES@
354
355 EXTRA_DIST += \
356         $(WebKit)/ChangeLog \
357         $(WebKit)/NEWS \
358         $(WebKit)/webkitmarshal.list \
359         $(WebKit)/docs/GNUmakefile.* \
360         $(WebKit)/docs/webkitenvironment.xml \
361         $(WebKit)/docs/webkitgtk-docs.sgml \
362         $(WebKit)/docs/webkitgtk-sections.txt \
363         $(WebKit)/docs/version.xml.in \
364         $(WebKit)/po/* \
365         $(WebKit)/resources/* \
366         $(WebKit)/tests/resources/* \
367         $(WebKit)/tests/test_utils.h \
368         $(WebKit)/org.webkitgtk.gschema.xml.in
369
370 # extra resource files
371 resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
372 dist_resources_DATA = \
373         $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
374
375 # Build unit tests
376 noinst_PROGRAMS += $(TEST_PROGS)
377 webkit_tests_cflags = \
378         -fno-strict-aliasing \
379         -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
380         -I$(WebCore)/platform/network/soup/cache \
381         -I$(WebKit) \
382         -I$(GENSOURCES) \
383         -I$(top_builddir)/Source/WebKit/gtk \
384         -I$(top_srcdir)/Source/WebCore/bindings \
385         -I$(top_srcdir)/Source/WebCore/bindings/gobject \
386         $(global_cppflags) \
387         $(global_cflags) \
388         $(javascriptcore_cppflags) \
389         $(GLIB_CFLAGS) \
390         $(GTK_CFLAGS) \
391         $(LIBSOUP_CFLAGS)
392
393 webkit_tests_ldadd = \
394         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
395         $(GTK_LIBS) \
396         $(GLIB_LIBS) \
397         $(LIBSOUP_LIBS)
398
399 webkit_tests_ldflags = \
400         -no-install \
401         -no-fast-install
402
403 TEST_PROGS += \
404         Programs/unittests/testdomdocument \
405         Programs/unittests/testdomdomwindow \
406         Programs/unittests/testdomnode \
407         Programs/unittests/testhttpbackend \
408         Programs/unittests/testloading \
409         Programs/unittests/testglobals \
410         Programs/unittests/testmimehandling \
411         Programs/unittests/testnetworkrequest \
412         Programs/unittests/testnetworkresponse \
413         Programs/unittests/testwebframe \
414         Programs/unittests/testwebbackforwardlist \
415         Programs/unittests/testwebhistoryitem \
416         Programs/unittests/testwindow \
417         Programs/unittests/testdownload \
418         Programs/unittests/testatk \
419         Programs/unittests/testatkroles \
420         Programs/unittests/testhittestresult \
421         Programs/unittests/testwebsettings \
422         Programs/unittests/testwebresource \
423         Programs/unittests/testwebdatasource \
424         Programs/unittests/testwebplugindatabase \
425         Programs/unittests/testwebview \
426         Programs/unittests/testkeyevents \
427         Programs/unittests/testcopyandpaste
428
429 # Add additional tests here
430 Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
431 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
432 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
433 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
434
435 Programs_unittests_testdomdomwindow_SOURCES = Source/WebKit/gtk/tests/testdomdomwindow.c
436 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
437 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
438 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
439
440 Programs_unittests_testdomnode_SOURCES = Source/WebKit/gtk/tests/testdomnode.c
441 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
442 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
443 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
444
445 Programs_unittests_testhttpbackend_SOURCES = Source/WebKit/gtk/tests/testhttpbackend.c
446 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
447 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
448 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
449
450 Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
451 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
452 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
453 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
454
455 Programs_unittests_testloading_SOURCES = Source/WebKit/gtk/tests/testloading.c
456 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
457 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
458 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
459
460 Programs_unittests_testmimehandling_SOURCES = Source/WebKit/gtk/tests/testmimehandling.c Source/WebKit/gtk/tests/test_utils.c
461 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
462 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
463 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
464
465 Programs_unittests_testnetworkrequest_SOURCES = Source/WebKit/gtk/tests/testnetworkrequest.c
466 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
467 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
468 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
469
470 Programs_unittests_testnetworkresponse_SOURCES = Source/WebKit/gtk/tests/testnetworkresponse.c
471 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
472 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
473 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
474
475 Programs_unittests_testwebframe_SOURCES = Source/WebKit/gtk/tests/testwebframe.c
476 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
477 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
478 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
479
480 Programs_unittests_testwebplugindatabase_SOURCES = Source/WebKit/gtk/tests/testwebplugindatabase.c
481 Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" $(webkit_tests_cflags)
482 Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
483 Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
484
485 Programs_unittests_testwebbackforwardlist_SOURCES = Source/WebKit/gtk/tests/testwebbackforwardlist.c
486 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
487 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
488 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
489
490 Programs_unittests_testwebhistoryitem_SOURCES = Source/WebKit/gtk/tests/testwebhistoryitem.c
491 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
492 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
493 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
494
495 Programs_unittests_testwindow_SOURCES = Source/WebKit/gtk/tests/testwindow.c
496 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
497 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
498 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
499
500 Programs_unittests_testdownload_SOURCES = Source/WebKit/gtk/tests/testdownload.c
501 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
502 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
503 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
504
505 Programs_unittests_testatk_SOURCES = Source/WebKit/gtk/tests/testatk.c
506 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
507 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
508 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
509
510 Programs_unittests_testatkroles_SOURCES = Source/WebKit/gtk/tests/testatkroles.c
511 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
512 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
513 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
514
515 Programs_unittests_testwebsettings_SOURCES = Source/WebKit/gtk/tests/testwebsettings.c
516 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
517 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
518 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
519
520 Programs_unittests_testwebresource_SOURCES = Source/WebKit/gtk/tests/testwebresource.c
521 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
522 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
523
524 Programs_unittests_testwebdatasource_SOURCES = Source/WebKit/gtk/tests/testwebdatasource.c
525 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
526 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
527
528 Programs_unittests_testwebview_SOURCES = Source/WebKit/gtk/tests/testwebview.c Source/WebKit/gtk/tests/test_utils.c
529 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
530 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
531 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
532
533 Programs_unittests_testhittestresult_SOURCES = Source/WebKit/gtk/tests/testhittestresult.c
534 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
535 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
536
537 Programs_unittests_testkeyevents_SOURCES = Source/WebKit/gtk/tests/testkeyevents.c
538 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
539 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
540 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
541
542 Programs_unittests_testcopyandpaste_SOURCES = Source/WebKit/gtk/tests/testcopyandpaste.c \
543         Source/WebCore/platform/gtk/GtkVersioning.c
544 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
545         -I$(srcdir)/Source/WebCore/platform/gtk \
546         -I$(srcdir)/Source/WebCore
547 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
548 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
549
550 # Project-wide clean rules
551 # Files that will be cleaned
552 CLEANFILES += \
553         $(BUILT_SOURCES) \
554         $(top_builddir)/stamp-webkitmarshal.cpp \
555         $(top_builddir)/stamp-webkitmarshal.h \
556         $(top_builddir)/stamp-webkitenumtypes.cpp \
557         $(top_builddir)/stamp-webkitenumtypes.h \
558         $(top_builddir)/Programs/GtkLauncher
559
560 DISTCLEANFILES += \
561         $(top_builddir)/Source/WebKit/gtk/docs/version.xml \
562         $(top_builddir)/Source/WebKit/gtk/docs/GNUmakefile \
563         $(top_builddir)/Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
564         $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml \
565         $(top_builddir)/Source/WebKit/gtk/webkit/webkitversion.h
566
567 dist-hook:
568         cp $(WebKit)/NEWS $(distdir)
569 install-data-local: po-install-data-local
570 installdirs-data-local: po-installdirs-data-local
571 uninstall-local: po-uninstall-local
572
573 # Run all tests in cwd
574 # FIXME: we should run this under xvfb
575 test: $(TEST_PROGS)
576         $(GTESTER) --verbose $(TEST_PROGS);
577
578 # test-report: run tests in cwd and generate report
579 # full-report: run tests in cwd with -m perf and -m slow and generate report
580 # perf-report: run tests in cwd with -m perf and generate report
581 test-report full-report perf-report: $(TEST_PROGS)
582         @ case $@ in \
583           test-report) test_options="-k";; \
584           full-report) test_options="-k -m=perf";; \
585           perf-report) test_options="-k -m=perf -m=slow";; \
586           esac ; \
587           $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
588           $(GTESTER_REPORT) test-report.xml > test-report.html ;
589
590 .PHONY: test test-report perf-report full-report
591 check-local: test