2009-05-18 Jan Michael Alonzo <jmalonzo@webkit.org>
[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         $(GEOCLUE_CFLAGS) \
88         $(GLIB_CFLAGS) \
89         $(GNOMEKEYRING_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 libWebCore_la_LIBADD = \
207         libJavaScriptCore.la \
208         libWebCoreJS.la \
209         $(webcore_libadd) \
210         $(GLIB_LIBS) \
211         $(LIBXML_LIBS) \
212         $(CAIRO_LIBS) \
213         $(PANGO_LIBS) \
214         $(GTK_LIBS) \
215         $(XT_LIBS) \
216         $(LIBSOUP_LIBS) \
217         $(FREETYPE_LIBS) \
218         $(UNICODE_LIBS) \
219         $(SQLITE3_LIBS) \
220         $(GSTREAMER_LIBS) \
221         $(LIBXSLT_LIBS) \
222         $(HILDON_LIBS) \
223         $(JPEG_LIBS) \
224         $(PNG_LIBS) \
225         $(GEOCLUE_LIBS) \
226         -lpthread
227
228 # WebKit
229 nodist_libwebkit_1_0_la_SOURCES = \
230         $(webkitgtk_built_sources)
231
232 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
233 libwebkit_1_0_la_HEADERS = \
234         $(webkitgtk_h_api) \
235         WebKit/gtk/webkit/webkitenumtypes.h
236
237 libwebkit_1_0_la_SOURCES = \
238         $(webkitgtk_sources)
239
240 libwebkit_1_0_la_CXXFLAGS = \
241         $(global_cxxflags) \
242         $(corekit_cflags)
243
244 libwebkit_1_0_la_CFLAGS = \
245         $(global_cflags) \
246         $(corekit_cflags)
247
248 libwebkit_1_0_la_CPPFLAGS = \
249         $(corekit_cppflags) \
250         $(webkitgtk_cppflags) \
251         $(HILDON_CPPFLAGS)
252
253 libwebkit_1_0_la_LDFLAGS = \
254         $(COVERAGE_LDFLAGS) \
255         -version-info @LIBWEBKITGTK_VERSION@ \
256         $(version_script) \
257         $(no_undefined)
258
259 libwebkit_1_0_la_LIBADD = \
260         libWebCore.la \
261         $(ENCHANT_LIBS) \
262         $(GNOMEKEYRING_LIBS)
263
264 #
265 # Extra checks and flags
266 global_cppflags += \
267         -DBUILDING_CAIRO__=1 \
268         -DBUILDING_GTK__=1 \
269         -DWTF_CHANGES \
270         -DWTF_USE_ICU_UNICODE=1
271
272 if !ENABLE_FAST_MALLOC
273 global_cppflags += \
274         -DUSE_SYSTEM_MALLOC
275 endif
276
277 if !ENABLE_DEBUG
278 global_cppflags += -DNDEBUG
279 global_cflags += $(SYMBOL_VISIBILITY)
280
281 else
282 webcoregtk_cppflags += \
283         -DG_DISABLE_DEPRECATED \
284         -DGDK_PIXBUF_DISABLE_DEPRECATED \
285         -DGDK_DISABLE_DEPRECATED \
286         -DGTK_DISABLE_DEPRECATED \
287         -DPANGO_DISABLE_DEPRECATED
288
289 # Might be useful in the future
290 #       -DGDK_MULTIHEAD_SAFE \
291 #       -DGTK_MULTIHEAD_SAFE
292 endif
293
294 if ENABLE_COVERAGE
295 global_cppflags += \
296         -DGCC_GENERATE_TEST_COVERAGE_FILES \
297         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
298 endif
299
300 webkitgtk_h_api += \
301         WebKit/gtk/webkit/webkit.h \
302         WebKit/gtk/webkit/webkitdefines.h \
303         WebKit/gtk/webkit/webkitdownload.h \
304         WebKit/gtk/webkit/webkiterror.h \
305         WebKit/gtk/webkit/webkitnetworkrequest.h \
306         WebKit/gtk/webkit/webkitsoupauthdialog.h \
307         WebKit/gtk/webkit/webkitversion.h \
308         WebKit/gtk/webkit/webkitwebbackforwardlist.h \
309         WebKit/gtk/webkit/webkitwebframe.h \
310         WebKit/gtk/webkit/webkitwebhistoryitem.h \
311         WebKit/gtk/webkit/webkitwebinspector.h \
312         WebKit/gtk/webkit/webkitwebnavigationaction.h \
313         WebKit/gtk/webkit/webkitwebpolicydecision.h \
314         WebKit/gtk/webkit/webkitwebsettings.h \
315         WebKit/gtk/webkit/webkitwebwindowfeatures.h \
316         WebKit/gtk/webkit/webkitwebview.h
317
318 webkitgtk_built_sources += \
319         DerivedSources/webkitenumtypes.cpp \
320         DerivedSources/webkitmarshal.cpp \
321         DerivedSources/webkitmarshal.h \
322         WebKit/gtk/webkit/webkitenumtypes.h
323
324 webkitgtk_sources += \
325         WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
326         WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
327         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
328         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
329         WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
330         WebKit/gtk/WebCoreSupport/DragClientGtk.h \
331         WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
332         WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
333         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
334         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
335         WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
336         WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
337         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
338         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
339         WebKit/gtk/webkit/webkitdownload.cpp \
340         WebKit/gtk/webkit/webkiterror.cpp \
341         WebKit/gtk/webkit/webkitnetworkrequest.cpp \
342         WebKit/gtk/webkit/webkitprivate.cpp \
343         WebKit/gtk/webkit/webkitprivate.h \
344         WebKit/gtk/webkit/webkitsoupauthdialog.c \
345         WebKit/gtk/webkit/webkitversion.cpp \
346         WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
347         WebKit/gtk/webkit/webkitwebframe.cpp \
348         WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
349         WebKit/gtk/webkit/webkitwebinspector.cpp \
350         WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
351         WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
352         WebKit/gtk/webkit/webkitwebsettings.cpp \
353         WebKit/gtk/webkit/webkitwebview.cpp \
354         WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
355
356 webkitgtk_cppflags += \
357         -DBUILDING_WEBKIT \
358         -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
359         -DDATA_DIR=\"${datadir}\" \
360         -I$(srcdir)/WebKit/gtk \
361         -I$(srcdir)/WebKit/gtk/WebCoreSupport \
362         -I$(srcdir)/WebKit/gtk/webkit \
363         -I$(top_builddir)/WebKit/gtk/webkit
364
365 if USE_GNOMEKEYRING
366 webkitgtk_cppflags += \
367         -DWTF_USE_GNOMEKEYRING=1
368 endif
369
370 webkitgtk_cleanfiles += \
371         $(srcdir)/WebKit/gtk/docs/version.xml \
372         $(srcdir)/WebKit/gtk/docs/GNUmakefile \
373         $(top_builddir)/Programs/GtkLauncher \
374         $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
375         $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
376         $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
377
378 pkgconfigdir = $(libdir)/pkgconfig
379 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
380
381 stamp_files := \
382         stamp-webkitmarshal.cpp \
383         stamp-webkitmarshal.h \
384         stamp-webkitenumtypes.cpp \
385         stamp-webkitenumtypes.h
386
387 WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
388 WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
389
390 $(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
391         @true
392
393 $(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
394         @true
395
396 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
397         echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
398         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
399         echo timestamp > $(@F)
400
401 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
402         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
403         echo timestamp > $(@F)
404
405 WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
406         @true
407 stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
408         (cd $(srcdir) \
409         && glib-mkenums \
410                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
411                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
412                         --fhead "#include <glib-object.h>\n\n" \
413                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
414                         --fhead "G_BEGIN_DECLS\n\n" \
415                         --ftail "G_END_DECLS\n\n" \
416                         --ftail "#endif\n" \
417                         --fprod "#include <@filename@>\n\n" \
418                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
419                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
420                 $(webkitgtk_h_api) | \
421                 sed 's,WebKit/gtk/,,' | \
422                 sed 's,web_kit,webkit,' | \
423                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
424                 ) > xgen-gth \
425         && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
426         && rm -f xgen-gth \
427         && echo timestamp > $(@F)
428
429 DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
430         (cd $(srcdir) \
431         && glib-mkenums \
432                         --fhead "#include <config.h>\n" \
433                         --fhead "#include <glib-object.h>\n" \
434                         --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
435                         --fhead "extern \"C\" {\n\n" \
436                         --fprod "\n/* enumerations from \"@filename@\" */" \
437                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
438                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
439                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
440                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
441                         --vtail "    static GType type = 0;\n\n" \
442                         --vtail "    if (!type)\n" \
443                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
444                         --vtail "    return type;\n}\n\n" \
445                         --ftail "}\n" \
446                 $(webkitgtk_h_api) | \
447                 sed 's,web_kit,webkit,' \
448                 ) > xgen-gtc \
449         && cp xgen-gtc $@ \
450         && rm -f xgen-gtc
451
452 # Files that will be distributed
453 EXTRA_DIST = \
454         $(srcdir)/gtk-doc.make \
455         WebKit/LICENSE \
456         $(javascriptcore_dist) \
457         $(webcore_dist) \
458         $(srcdir)/autotools/symbols.filter \
459         $(srcdir)/WebKit/gtk/ChangeLog \
460         $(srcdir)/WebKit/gtk/NEWS \
461         $(srcdir)/WebKit/gtk/webkitmarshal.list \
462         $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
463         $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
464         $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
465         $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
466         $(srcdir)/WebKit/gtk/docs/version.xml.in \
467         $(srcdir)/WebKit/gtk/po/* \
468         $(srcdir)/WebKit/gtk/resources/*
469
470 # extra resource files
471 resourcesdir = ${datadir}/webkit-1.0/resources
472 dist_resources_DATA = \
473         $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
474
475 # END WEBKIT GTK+
476
477 # Files that will be cleaned
478 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
479 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
480 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
481
482 # Include module makefiles
483 include JavaScriptCore/GNUmakefile.am
484 include WebCore/GNUmakefile.am
485 include WebKitTools/GNUmakefile.am
486 include WebKit/gtk/po/GNUmakefile.am
487
488 # Build unit tests
489 noinst_PROGRAMS += $(TEST_PROGS)
490
491 webkit_tests_cflags = \
492         -fno-strict-aliasing \
493         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
494         -I$(srcdir)/WebKit/gtk \
495         -I$(top_builddir)/WebKit/gtk \
496         $(global_cflags) \
497         $(GLIB_CFLAGS) \
498         $(GTK_CFLAGS) \
499         $(LIBSOUP_CFLAGS)
500
501 webkit_tests_ldadd = \
502         libwebkit-1.0.la \
503         $(GTK_LIBS)     \
504         $(GLIB_LIBS) \
505         $(LIBSOUP_LIBS)
506
507 webkit_tests_ldflags = \
508         -no-install \
509         -no-fast-install
510
511 TEST_PROGS += Programs/unittests/testwebframe \
512         Programs/unittests/testwebbackforwardlist \
513         Programs/unittests/testwebhistoryitem \
514         Programs/unittests/testdownload
515
516 # Add additional tests here
517 Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
518 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
519 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
520 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
521
522 Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
523 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
524 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
525 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
526
527 Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
528 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
529 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
530 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
531
532 Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
533 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
534 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
535 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
536
537 # Autogenerated sources
538 BUILT_SOURCES := \
539         $(javascriptcore_built_sources) \
540         $(javascriptcore_built_nosources) \
541         $(webcore_built_sources) \
542         $(webcore_built_nosources) \
543         $(webkitgtk_built_sources) \
544         $(webkitgtk_built_nosources)
545
546 # Project-wide clean rules
547 CLEANFILES += \
548         $(webkitgtk_cleanfiles)
549
550 MAINTAINERCLEANFILES += \
551         $(srcdir)/aconfig.h.in \
552         $(srcdir)/autotools/config.* \
553         $(srcdir)/autotools/compile \
554         $(srcdir)/autotools/depcomp \
555         $(srcdir)/autotools/install-sh \
556         $(srcdir)/autotools/missing \
557         $(srcdir)/configure \
558         $(srcdir)/GNUmakefile.in \
559         $(srcdir)/INSTALL \
560         $(srcdir)/README \
561         $(top_builddir)/config.*
562
563 # Older automake versions (1.7) place Plo files in a different place so we need
564 # to create the output directory manually.
565 all-local: stamp-po
566         $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
567
568 # remove built sources and program directories
569 clean-local:
570         -rm -rf $(GENPROGRAMS)
571
572 maintainer-clean-local: distclean-local
573
574 distclean-local:
575         -rm -rf $(GENSOURCES) $(GENPROGRAMS)
576
577 install-data-local: po-install-data-local
578
579 installdirs-data-local: po-installdirs-data-local
580
581 uninstall-local: po-uninstall-local
582
583 # Run all tests in cwd
584 # FIXME: we should run this under xvfb
585 test: $(TEST_PROGS)
586         $(GTESTER) --verbose $(TEST_PROGS);
587
588 # test-report: run tests in cwd and generate report
589 # full-report: run tests in cwd with -m perf and -m slow and generate report
590 # perf-report: run tests in cwd with -m perf and generate report
591 test-report full-report perf-report: $(TEST_PROGS)
592         @ case $@ in \
593           test-report) test_options="-k";; \
594           full-report) test_options="-k -m=perf";; \
595           perf-report) test_options="-k -m=perf -m=slow";; \
596           esac ; \
597           $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
598           $(GTESTER_REPORT) test-report.xml > test-report.html ;
599
600 .PHONY: test test-report perf-report full-report
601 check-local: test