Try some more to fix the Windows build.
[WebKit-https.git] / GNUmakefile.am
1 # Top-level Makefile rule for automake
2 #
3 # Variable conventions:
4 #
5 # _h_api            = API headers that will be installed and included in the distribution
6 # _cppflags         = flags that will be passed to the C/CXX Preprocessor
7 # _sources          = sources that will be compiled and included in the distribution
8 # _built_sources    = files that will be autogenerated by the build system and
9 #                     will be part of the _SOURCES primary
10 # _built_nosources  = files that are autogenerated but are not part of the
11 #                     _SOURCES primary
12 # _cleanfiles       = files that will be removed by the clean target
13 #
14 # Sources, headers, flags, etc... should be added to the respective variables
15 # with the above suffix, e.g, webcore-specific sources should go to
16 # webcore_sources, gtk port API and WebCoreSupport parts to webkitgtk_sources,
17 # etc... The only exceptions are the global variables. See Global Variables
18 # below.
19 #
20 # Global Variables
21 #
22 # global_cppflags   = CPPFLAGS that apply to JSC, WebCore, and to any
23 #                     specific port
24 # global_cflags     = CFLAGS that apply to JSC, WebCore, and to
25 #                     any specific port
26 # global_cxxflags   = CXXFLAGS that apply to JSC, WebCore, and to any
27 #                     specific port
28
29 srcdir = @srcdir@
30 VPATH = @srcdir@
31
32 # Directory for autogenerated sources
33 GENSOURCES := $(top_builddir)/DerivedSources
34 GENPROGRAMS := $(top_builddir)/Programs
35
36 # Script for creating hash tables
37 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
38
39 # Programs to run the WebKitGtk unit tests
40 GTESTER = gtester
41 GTESTER_REPORT = gtester-report
42
43 # Libraries and support components
44 bin_PROGRAMS :=
45 noinst_PROGRAMS :=
46 noinst_HEADERS :=
47 lib_LIBRARIES :=
48 IDL_BINDINGS :=
49 TEST_PROGS :=
50 POFILES :=
51 MOFILES :=
52 javascriptcore_h_api :=
53 javascriptcore_cppflags:=
54 javascriptcore_sources :=
55 javascriptcore_built_sources :=
56 javascriptcore_built_nosources :=
57 javascriptcore_dist :=
58 webcore_cppflags :=
59 webcore_sources :=
60 webcore_libadd :=
61 webcore_built_sources :=
62 webcore_built_nosources :=
63 webcore_dist :=
64 webcoregtk_cppflags :=
65 webcoregtk_sources :=
66 webkitgtk_h_api :=
67 webkitgtk_sources :=
68 webkitgtk_cppflags :=
69 webkitgtk_built_sources :=
70 webkitgtk_built_nosources :=
71 webkitgtk_cleanfiles :=
72 global_cppflags :=
73 global_cflags :=
74 global_cxxflags :=
75 corekit_cflags :=
76 corekit_cppflags :=
77
78 # CFLAGS/CXXFLAGS used by WebCore and WebKit
79 #
80 # gtk+.pc already include glib, cairo, freetype and pango CFLAGS
81 # Don't include them for now to reduce the noise when compiling
82 # $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS)  $(FREETYPE_CFLAGS)
83 corekit_cflags += \
84         -fno-strict-aliasing \
85         $(COVERAGE_CFLAGS) \
86         $(ENCHANT_CFLAGS) \
87         $(GAIL_CFLAGS) \
88         $(GEOCLUE_CFLAGS) \
89         $(GLIB_CFLAGS) \
90         $(GSTREAMER_CFLAGS) \
91         $(GTK_CFLAGS) \
92         $(HILDON_CFLAGS) \
93         $(LIBSOUP_CFLAGS) \
94         $(LIBXML_CFLAGS) \
95         $(LIBXSLT_CFLAGS) \
96         $(SQLITE3_CFLAGS) \
97         $(UNICODE_CFLAGS) \
98         $(XT_CFLAGS)
99
100 # When building webcore/webkit, we want WebCore/config.h and NOT
101 # JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
102 # before JavaScriptCore in the include path.
103 corekit_cppflags += \
104         $(global_cppflags) \
105         $(webcore_cppflags) \
106         $(webcoregtk_cppflags) \
107         $(javascriptcore_cppflags)
108
109 if TARGET_X11
110 corekit_cppflags += -DXP_UNIX
111 endif
112
113 # Default compiler flags
114 global_cflags += \
115         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
116         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
117         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
118         -Wno-unused-parameter -Wno-parentheses \
119         -fno-exceptions
120
121 global_cxxflags += \
122         $(global_cflags) \
123         $(SYMBOL_VISIBILITY_INLINES) \
124         -fno-rtti
125
126 # -no-undefined required for building DLLs on Windows
127 # It breaks the build on other platforms, so we use it conditionally
128 if OS_WIN32
129 no_undefined = -no-undefined
130 endif
131
132 if OS_GNU
133 version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
134 endif
135
136 # Shared libraries
137 lib_LTLIBRARIES = \
138         libwebkit-1.0.la
139
140 # Convenience libraries
141 noinst_LTLIBRARIES = \
142         libJavaScriptCore.la \
143         libWebCore.la
144
145 # JavaScriptCore
146 javascriptcore_cppflags += \
147         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
148         -I$(srcdir)/JavaScriptCore/parser \
149         -I$(srcdir)/JavaScriptCore/wtf \
150         -I$(top_builddir)/DerivedSources
151
152 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
153         $(javascriptcore_built_nosources)
154
155 nodist_libJavaScriptCore_la_SOURCES = \
156         $(javascriptcore_built_sources)
157
158 libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
159 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
160
161 libJavaScriptCore_la_SOURCES = \
162         $(javascriptcore_sources)
163
164 libJavaScriptCore_la_LIBADD = \
165         $(UNICODE_LIBS) \
166         $(GLIB_LIBS) \
167         -lpthread
168
169 libJavaScriptCore_la_CXXFLAGS = \
170         $(global_cxxflags) \
171         $(libJavaScriptCore_la_CFLAGS)
172
173 libJavaScriptCore_la_CFLAGS = \
174         -fstrict-aliasing \
175         -O3 \
176         $(global_cflags) \
177         $(GLIB_CFLAGS) \
178         $(UNICODE_CFLAGS)
179
180 libJavaScriptCore_la_CPPFLAGS = \
181         $(global_cppflags) \
182         $(javascriptcore_cppflags)
183
184 # WebCore
185 nodist_EXTRA_libWebCore_la_SOURCES = \
186         $(webcore_built_nosources)
187
188 nodist_libWebCore_la_SOURCES = \
189         $(webcore_built_sources)
190
191 libWebCore_la_SOURCES = \
192         $(webcore_sources) \
193         $(webcoregtk_sources)
194
195 libWebCore_la_CXXFLAGS = \
196         $(global_cxxflags) \
197         $(corekit_cflags)
198
199 libWebCore_la_CFLAGS = \
200         $(global_cflags) \
201         $(corekit_cflags)
202
203 libWebCore_la_CPPFLAGS = \
204         $(corekit_cppflags)
205
206 # WebKit
207 nodist_libwebkit_1_0_la_SOURCES = \
208         $(webkitgtk_built_sources)
209
210 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
211 libwebkit_1_0_la_HEADERS = \
212         $(webkitgtk_h_api) \
213         WebKit/gtk/webkit/webkitenumtypes.h
214
215 libwebkit_1_0_la_SOURCES = \
216         $(webkitgtk_sources)
217
218 libwebkit_1_0_la_CXXFLAGS = \
219         $(global_cxxflags) \
220         $(corekit_cflags)
221
222 libwebkit_1_0_la_CFLAGS = \
223         $(global_cflags) \
224         $(corekit_cflags)
225
226 libwebkit_1_0_la_CPPFLAGS = \
227         $(corekit_cppflags) \
228         $(webkitgtk_cppflags) \
229         $(HILDON_CPPFLAGS)
230
231 libwebkit_1_0_la_LDFLAGS = \
232         -version-info @LIBWEBKITGTK_VERSION@ \
233         $(version_script) \
234         $(no_undefined)
235
236 libwebkit_1_0_la_LIBADD = \
237         -lpthread \
238         libJavaScriptCore.la \
239         libWebCore.la \
240         libWebCoreJS.la \
241         $(webcore_ldflags) \
242         $(CAIRO_LIBS) \
243         $(COVERAGE_LDFLAGS) \
244         $(ENCHANT_LIBS) \
245         $(FREETYPE_LIBS) \
246         $(GAIL_LIBS) \
247         $(GEOCLUE_LIBS) \
248         $(GLIB_LIBS) \
249         $(GSTREAMER_LIBS) \
250         $(GTK_LIBS) \
251         $(HILDON_LIBS) \
252         $(JPEG_LIBS) \
253         $(LIBSOUP_LIBS) \
254         $(LIBXML_LIBS) \
255         $(LIBXSLT_LIBS) \
256         $(PANGO_LIBS) \
257         $(PNG_LIBS) \
258         $(SQLITE3_LIBS) \
259         $(UNICODE_LIBS) \
260         $(XT_LIBS)
261
262 #
263 # Extra checks and flags
264 global_cppflags += \
265         -DBUILDING_CAIRO__=1 \
266         -DBUILDING_GTK__=1 \
267         -DWTF_CHANGES
268
269 if USE_ICU_UNICODE
270 global_cppflags += \
271         -DWTF_USE_ICU_UNICODE=1
272 endif
273
274 if USE_GLIB_UNICODE
275 # https://bugs.webkit.org/show_bug.cgi?id=15914
276 # In patch 1/4 we are compiling a hybrid version of GLib WTF Unicode
277 # functionality mixed with ICU-based text codecs and TextBreakIterator.
278 # For the transition, introducing an interim HYBRID macro.
279 # This macro is required for compiling WTF with GLib Unicode backend,
280 # but at the same time keeping ICU dependency for codecs and break iterator.
281 # It will be removed with patch 3/4 of the above bug.
282 global_cppflags += \
283         -DWTF_USE_GLIB_UNICODE=1 \
284         -DWTF_USE_GLIB_ICU_UNICODE_HYBRID=1
285 endif
286
287 if !ENABLE_FAST_MALLOC
288 global_cppflags += \
289         -DUSE_SYSTEM_MALLOC
290 endif
291
292 if !ENABLE_DEBUG
293 global_cppflags += -DNDEBUG
294 global_cflags += $(SYMBOL_VISIBILITY)
295
296 else
297 webcoregtk_cppflags += \
298         -DG_DISABLE_DEPRECATED \
299         -DGDK_PIXBUF_DISABLE_DEPRECATED \
300         -DGDK_DISABLE_DEPRECATED \
301         -DGTK_DISABLE_DEPRECATED \
302         -DPANGO_DISABLE_DEPRECATED
303
304 # Might be useful in the future
305 #       -DGDK_MULTIHEAD_SAFE \
306 #       -DGTK_MULTIHEAD_SAFE
307 endif
308
309 if ENABLE_COVERAGE
310 global_cppflags += \
311         -DGCC_GENERATE_TEST_COVERAGE_FILES \
312         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
313 endif
314
315 webkitgtk_h_api += \
316         WebKit/gtk/webkit/webkit.h \
317         WebKit/gtk/webkit/webkitdefines.h \
318         WebKit/gtk/webkit/webkitdownload.h \
319         WebKit/gtk/webkit/webkiterror.h \
320         WebKit/gtk/webkit/webkitnetworkrequest.h \
321         WebKit/gtk/webkit/webkitsoupauthdialog.h \
322         WebKit/gtk/webkit/webkitversion.h \
323         WebKit/gtk/webkit/webkitwebbackforwardlist.h \
324         WebKit/gtk/webkit/webkitwebframe.h \
325         WebKit/gtk/webkit/webkitwebhistoryitem.h \
326         WebKit/gtk/webkit/webkitwebinspector.h \
327         WebKit/gtk/webkit/webkitwebnavigationaction.h \
328         WebKit/gtk/webkit/webkitwebpolicydecision.h \
329         WebKit/gtk/webkit/webkitwebsettings.h \
330         WebKit/gtk/webkit/webkitwebwindowfeatures.h \
331         WebKit/gtk/webkit/webkitwebview.h
332
333 webkitgtk_built_sources += \
334         DerivedSources/webkitenumtypes.cpp \
335         DerivedSources/webkitmarshal.cpp \
336         DerivedSources/webkitmarshal.h \
337         WebKit/gtk/webkit/webkitenumtypes.h
338
339 webkitgtk_sources += \
340         WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
341         WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
342         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
343         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
344         WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
345         WebKit/gtk/WebCoreSupport/DragClientGtk.h \
346         WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
347         WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
348         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
349         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
350         WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
351         WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
352         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
353         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
354         WebKit/gtk/webkit/webkitapplicationcache.cpp \
355         WebKit/gtk/webkit/webkitdownload.cpp \
356         WebKit/gtk/webkit/webkiterror.cpp \
357         WebKit/gtk/webkit/webkitnetworkrequest.cpp \
358         WebKit/gtk/webkit/webkitprivate.cpp \
359         WebKit/gtk/webkit/webkitprivate.h \
360         WebKit/gtk/webkit/webkitsoupauthdialog.c \
361         WebKit/gtk/webkit/webkitversion.cpp \
362         WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
363         WebKit/gtk/webkit/webkitwebframe.cpp \
364         WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
365         WebKit/gtk/webkit/webkitwebinspector.cpp \
366         WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
367         WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
368         WebKit/gtk/webkit/webkitwebsettings.cpp \
369         WebKit/gtk/webkit/webkitwebview.cpp \
370         WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
371
372 webkitgtk_cppflags += \
373         -DBUILDING_WEBKIT \
374         -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
375         -DDATA_DIR=\"${datadir}\" \
376         -I$(srcdir)/WebKit/gtk \
377         -I$(srcdir)/WebKit/gtk/WebCoreSupport \
378         -I$(srcdir)/WebKit/gtk/webkit \
379         -I$(top_builddir)/WebKit/gtk/webkit
380
381 webkitgtk_cleanfiles += \
382         $(top_builddir)/WebKit/gtk/docs/version.xml \
383         $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
384         $(top_builddir)/Programs/GtkLauncher \
385         $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
386         $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
387         $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
388
389 pkgconfigdir = $(libdir)/pkgconfig
390 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
391
392 stamp_files := \
393         stamp-webkitmarshal.cpp \
394         stamp-webkitmarshal.h \
395         stamp-webkitenumtypes.cpp \
396         stamp-webkitenumtypes.h
397
398 WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
399 WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
400
401 $(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
402         @true
403
404 $(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
405         @true
406
407 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
408         echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
409         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
410         echo timestamp > $(@F)
411
412 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
413         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
414         echo timestamp > $(@F)
415
416 WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
417         @true
418 stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
419         $(AM_V_GEN)(cd $(srcdir) \
420         && glib-mkenums \
421                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
422                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
423                         --fhead "#include <glib-object.h>\n\n" \
424                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
425                         --fhead "G_BEGIN_DECLS\n\n" \
426                         --ftail "G_END_DECLS\n\n" \
427                         --ftail "#endif\n" \
428                         --fprod "#include <@filename@>\n\n" \
429                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
430                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
431                 $(webkitgtk_h_api) | \
432                 sed 's,WebKit/gtk/,,' | \
433                 sed 's,web_kit,webkit,' | \
434                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
435                 ) > xgen-gth \
436         && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
437         && rm -f xgen-gth \
438         && echo timestamp > $(@F)
439
440 DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
441         $(AM_V_GEN)(cd $(srcdir) \
442         && glib-mkenums \
443                         --fhead "#include <config.h>\n" \
444                         --fhead "#include <glib-object.h>\n" \
445                         --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
446                         --fhead "extern \"C\" {\n\n" \
447                         --fprod "\n/* enumerations from \"@filename@\" */" \
448                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
449                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
450                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
451                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
452                         --vtail "    static GType type = 0;\n\n" \
453                         --vtail "    if (!type)\n" \
454                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
455                         --vtail "    return type;\n}\n\n" \
456                         --ftail "}\n" \
457                 $(webkitgtk_h_api) | \
458                 sed 's,web_kit,webkit,' \
459                 ) > xgen-gtc \
460         && cp xgen-gtc $@ \
461         && rm -f xgen-gtc
462
463 # Files that will be distributed
464 EXTRA_DIST = \
465         $(srcdir)/gtk-doc.make \
466         WebKit/LICENSE \
467         $(javascriptcore_dist) \
468         $(webcore_dist) \
469         $(srcdir)/autotools/symbols.filter \
470         $(srcdir)/WebKit/gtk/ChangeLog \
471         $(srcdir)/WebKit/gtk/NEWS \
472         $(srcdir)/WebKit/gtk/webkitmarshal.list \
473         $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
474         $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
475         $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
476         $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
477         $(srcdir)/WebKit/gtk/docs/version.xml.in \
478         $(srcdir)/WebKit/gtk/po/* \
479         $(srcdir)/WebKit/gtk/resources/*
480
481 # extra resource files
482 resourcesdir = ${datadir}/webkit-1.0/resources
483 dist_resources_DATA = \
484         $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
485
486 # END WEBKIT GTK+
487
488 # Files that will be cleaned
489 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
490 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
491 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
492
493 # Include module makefiles
494 include JavaScriptCore/GNUmakefile.am
495 include WebCore/GNUmakefile.am
496 include WebKitTools/GNUmakefile.am
497 include WebKit/gtk/po/GNUmakefile.am
498
499 # Build unit tests
500 noinst_PROGRAMS += $(TEST_PROGS)
501
502 webkit_tests_cflags = \
503         -fno-strict-aliasing \
504         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
505         -I$(srcdir)/WebKit/gtk \
506         -I$(top_builddir)/WebKit/gtk \
507         $(global_cflags) \
508         $(GLIB_CFLAGS) \
509         $(GTK_CFLAGS) \
510         $(LIBSOUP_CFLAGS)
511
512 webkit_tests_ldadd = \
513         libwebkit-1.0.la \
514         $(GTK_LIBS)     \
515         $(GLIB_LIBS) \
516         $(LIBSOUP_LIBS)
517
518 webkit_tests_ldflags = \
519         -no-install \
520         -no-fast-install
521
522 TEST_PROGS += Programs/unittests/testhttpbackend \
523         Programs/unittests/testloading \
524         Programs/unittests/testnetworkrequest \
525         Programs/unittests/testwebframe \
526         Programs/unittests/testwebbackforwardlist \
527         Programs/unittests/testwebhistoryitem \
528         Programs/unittests/testdownload \
529         Programs/unittests/testatk \
530         Programs/unittests/testwebsettings
531
532 # Add additional tests here
533 Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
534 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
535 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
536 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
537
538 Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
539 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
540 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
541 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
542
543 Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
544 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
545 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
546 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
547
548 Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
549 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
550 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
551 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
552
553 Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
554 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
555 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
556 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
557
558 Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
559 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
560 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
561 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
562
563 Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
564 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
565 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
566 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
567
568 Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
569 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
570 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
571 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
572
573 Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
574 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
575 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
576 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
577
578 # Autogenerated sources
579 BUILT_SOURCES := \
580         $(javascriptcore_built_sources) \
581         $(javascriptcore_built_nosources) \
582         $(webcore_built_sources) \
583         $(webcore_built_nosources) \
584         $(webkitgtk_built_sources) \
585         $(webkitgtk_built_nosources)
586
587 # Project-wide clean rules
588 CLEANFILES += \
589         $(webkitgtk_cleanfiles)
590
591 MAINTAINERCLEANFILES += \
592         $(srcdir)/aconfig.h.in \
593         $(srcdir)/autotools/config.* \
594         $(srcdir)/autotools/compile \
595         $(srcdir)/autotools/depcomp \
596         $(srcdir)/autotools/install-sh \
597         $(srcdir)/autotools/missing \
598         $(srcdir)/configure \
599         $(srcdir)/GNUmakefile.in \
600         $(srcdir)/INSTALL \
601         $(srcdir)/README \
602         $(top_builddir)/config.*
603
604 # Older automake versions (1.7) place Plo files in a different place so we need
605 # to create the output directory manually.
606 all-local: stamp-po
607         $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
608
609 # remove built sources and program directories
610 clean-local:
611         -rm -rf $(GENPROGRAMS)
612
613 maintainer-clean-local: distclean-local
614
615 distclean-local:
616         -rm -rf $(GENSOURCES) $(GENPROGRAMS)
617
618 install-data-local: po-install-data-local
619
620 installdirs-data-local: po-installdirs-data-local
621
622 uninstall-local: po-uninstall-local
623
624 # Run all tests in cwd
625 # FIXME: we should run this under xvfb
626 test: $(TEST_PROGS)
627         $(GTESTER) --verbose $(TEST_PROGS);
628
629 # test-report: run tests in cwd and generate report
630 # full-report: run tests in cwd with -m perf and -m slow and generate report
631 # perf-report: run tests in cwd with -m perf and generate report
632 test-report full-report perf-report: $(TEST_PROGS)
633         @ case $@ in \
634           test-report) test_options="-k";; \
635           full-report) test_options="-k -m=perf";; \
636           perf-report) test_options="-k -m=perf -m=slow";; \
637           esac ; \
638           $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
639           $(GTESTER_REPORT) test-report.xml > test-report.html ;
640
641 .PHONY: test test-report perf-report full-report
642 check-local: test