1 # Top-level Makefile rule for automake
3 # Variable conventions:
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
12 # _cleanfiles = files that will be removed by the clean target
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
22 # global_cppflags = CPPFLAGS that apply to JSC, WebCore, and to any
24 # global_cflags = CFLAGS that apply to JSC, WebCore, and to
26 # global_cxxflags = CXXFLAGS that apply to JSC, WebCore, and to any
32 DISTCHECK_CONFIGURE_FLAGS = \
33 --enable-introspection \
36 # Directory for autogenerated sources
37 GENSOURCES := $(top_builddir)/DerivedSources
38 GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
39 GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
40 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
41 GENPROGRAMS := $(top_builddir)/Programs
43 # Programs to run the WebKitGtk unit tests
45 GTESTER_REPORT = gtester-report
47 # Libraries and support components
57 javascriptcore_h_api :=
58 javascriptcore_cppflags:=
59 javascriptcore_sources :=
60 javascriptcore_built_sources :=
61 javascriptcore_built_nosources :=
65 webcore_built_sources :=
66 webcore_built_nosources :=
67 webcoregtk_cppflags :=
80 webkitgtk_built_sources :=
81 webkitgtk_built_nosources :=
82 webkitgtk_cleanfiles :=
96 MAINTAINERCLEANFILES :=
98 webcoregtk_cppflags += \
99 -I$(top_builddir)/DerivedSources/webkit \
100 -I$(srcdir)/WebCore/bindings \
101 -I$(srcdir)/WebCore/bindings/gobject
103 # CFLAGS/CXXFLAGS used by WebCore and WebKit
105 # gtk+.pc already include glib, cairo, freetype and pango CFLAGS
106 # Don't include them for now to reduce the noise when compiling
107 # $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS) $(FREETYPE_CFLAGS)
109 -fno-strict-aliasing \
115 $(GSTREAMER_CFLAGS) \
125 # When building webcore/webkit, we want WebCore/config.h and NOT
126 # JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
127 # before JavaScriptCore in the include path.
128 corekit_cppflags += \
130 $(webcore_cppflags) \
131 $(webcoregtk_cppflags) \
132 $(javascriptcore_cppflags)
134 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
136 corekit_cppflags += -DXP_UNIX
139 # Default compiler flags
141 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
142 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
143 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
144 -Wno-unused-parameter -Wno-parentheses \
149 $(SYMBOL_VISIBILITY_INLINES) \
152 # -no-undefined required for building DLLs on Windows
153 # It breaks the build on other platforms, so we use it conditionally
155 no_undefined = -no-undefined
156 version_script = -export-symbols-regex "^(webkit_|JS).*"
160 version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
165 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
167 # Convenience libraries
168 noinst_LTLIBRARIES += \
172 javascriptcore_cppflags += \
173 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
174 -I$(srcdir)/JavaScriptCore/parser \
175 -I$(srcdir)/JavaScriptCore/wtf \
176 -I$(srcdir)/JavaScriptCore/wtf/gtk \
177 -I$(srcdir)/JavaScriptCore/wtf/gobject \
178 -I$(top_builddir)/DerivedSources/JavaScriptCore
180 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
181 $(javascriptcore_built_nosources)
183 nodist_libJavaScriptCore_la_SOURCES = \
184 $(javascriptcore_built_sources)
186 libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
187 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
189 libJavaScriptCore_la_SOURCES = \
190 $(javascriptcore_sources)
192 libJavaScriptCore_la_LIBADD = \
197 libJavaScriptCore_la_CXXFLAGS = \
199 $(libJavaScriptCore_la_CFLAGS)
201 libJavaScriptCore_la_CFLAGS = \
208 libJavaScriptCore_la_CPPFLAGS = \
210 $(javascriptcore_cppflags)
213 nodist_EXTRA_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
214 $(webcore_built_nosources)
216 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
217 $(webcore_built_sources) \
218 $(webkitgtk_built_sources)
220 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
221 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
223 WebKit/gtk/webkit/webkitenumtypes.h
225 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
227 $(webcoregtk_sources) \
230 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
234 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
238 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
239 $(corekit_cppflags) \
240 $(webkitgtk_cppflags) \
243 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
244 -version-info @LIBWEBKITGTK_VERSION@ \
248 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
250 libJavaScriptCore.la \
254 $(COVERAGE_LDFLAGS) \
273 libgdom_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
274 nodist_libgdom_la_HEADERS = \
277 libgdom_cleanfiles += \
278 $(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h \
279 $(top_builddir)/libgdom.la \
280 $(top_builddir)/stamp-webkitdomenumtypes.h
283 # Extra checks and flags
285 -DBUILDING_CAIRO__=1 \
291 -DWTF_USE_ICU_UNICODE=1
296 -DWTF_USE_GLIB_UNICODE=1
299 if !ENABLE_FAST_MALLOC
305 global_cppflags += -DNDEBUG
306 global_cflags += $(SYMBOL_VISIBILITY)
308 webcoregtk_cppflags += \
309 -DG_DISABLE_DEPRECATED \
310 -DGDK_PIXBUF_DISABLE_DEPRECATED \
311 -DGDK_DISABLE_DEPRECATED \
312 -DGTK_DISABLE_DEPRECATED \
313 -DPANGO_DISABLE_DEPRECATED
315 # Might be useful in the future
316 # -DGDK_MULTIHEAD_SAFE \
317 # -DGTK_MULTIHEAD_SAFE
322 -DGCC_GENERATE_TEST_COVERAGE_FILES \
323 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
327 $(srcdir)/WebKit/gtk/webkit/webkit.h \
328 $(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
329 $(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
330 $(srcdir)/WebKit/gtk/webkit/webkiterror.h \
331 $(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
332 $(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
333 $(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
334 $(srcdir)/WebKit/gtk/webkit/webkitsoupauthdialog.h \
335 $(srcdir)/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
336 $(srcdir)/WebKit/gtk/webkit/webkitwebdatasource.h \
337 $(srcdir)/WebKit/gtk/webkit/webkitwebframe.h \
338 $(srcdir)/WebKit/gtk/webkit/webkitwebhistoryitem.h \
339 $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
340 $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
341 $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
342 $(srcdir)/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
343 $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
344 $(srcdir)/WebKit/gtk/webkit/webkitwebsettings.h \
345 $(srcdir)/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
346 $(srcdir)/WebKit/gtk/webkit/webkitwebview.h \
347 $(srcdir)/WebKit/gtk/webkit/webkitwebdatabase.h \
348 $(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h \
349 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
351 webkitgtk_built_sources += \
352 DerivedSources/webkit/webkitenumtypes.cpp \
353 DerivedSources/webkit/webkitdomenumtypes.cpp \
354 DerivedSources/webkit/webkitmarshal.cpp \
355 DerivedSources/webkit/webkitmarshal.h \
356 WebKit/gtk/webkit/webkitenumtypes.h
358 webkitgtk_sources += \
359 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
360 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
361 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
362 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
363 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
364 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
365 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
366 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
367 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
368 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
369 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
370 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
371 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
372 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
373 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
374 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
375 WebKit/gtk/webkit/webkitapplicationcache.cpp \
376 WebKit/gtk/webkit/webkitdownload.cpp \
377 WebKit/gtk/webkit/webkiterror.cpp \
378 WebKit/gtk/webkit/webkithittestresult.cpp \
379 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
380 WebKit/gtk/webkit/webkitnetworkresponse.cpp \
381 WebKit/gtk/webkit/webkitprivate.cpp \
382 WebKit/gtk/webkit/webkitprivate.h \
383 WebKit/gtk/webkit/webkitsoupauthdialog.c \
384 WebKit/gtk/webkit/webkitversion.cpp \
385 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
386 WebKit/gtk/webkit/webkitwebdatasource.cpp \
387 WebKit/gtk/webkit/webkitwebframe.cpp \
388 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
389 WebKit/gtk/webkit/webkitwebinspector.cpp \
390 WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
391 WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
392 WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
393 WebKit/gtk/webkit/webkitwebresource.cpp \
394 WebKit/gtk/webkit/webkitwebdatabase.cpp \
395 WebKit/gtk/webkit/webkitsecurityorigin.cpp \
396 WebKit/gtk/webkit/webkitwebsettings.cpp \
397 WebKit/gtk/webkit/webkitwebview.cpp \
398 WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
399 WebKit/gtk/webkit/webkitworkers.cpp
401 webkitgtk_cppflags += \
403 -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
404 -DDATA_DIR=\"${datadir}\" \
405 -I$(srcdir)/WebKit/gtk \
406 -I$(srcdir)/WebKit/gtk/WebCoreSupport \
407 -I$(srcdir)/WebKit/gtk/webkit \
408 -I$(top_builddir)/WebKit/gtk \
409 -I$(top_builddir)/WebKit/gtk/webkit \
410 -I$(GENSOURCES_WEBKIT)
412 webkitgtk_cleanfiles += \
413 $(top_builddir)/stamp-webkitmarshal.cpp \
414 $(top_builddir)/stamp-webkitmarshal.h \
415 $(top_builddir)/stamp-webkitenumtypes.cpp \
416 $(top_builddir)/stamp-webkitenumtypes.h \
417 $(top_builddir)/Programs/GtkLauncher \
418 $(top_builddir)/WebKit/gtk/docs/version.xml \
419 $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
420 $(top_builddir)/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
421 $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
422 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
424 pkgconfigdir = $(libdir)/pkgconfig
425 pkgconfig_DATA = WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
427 if ENABLE_INTROSPECTION
429 JSCore-@WEBKITGTK_API_VERSION@.gir: $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
430 cp $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(builddir)/
432 JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
433 WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
435 $(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
436 $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=@WEBKITGTK_API_VERSION@ \
437 --include=GObject-2.0 \
438 --include=Gtk-@GTK_API_VERSION@ \
439 --include=JSCore-@WEBKITGTK_API_VERSION@ \
441 --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
442 --libtool="$(LIBTOOL)" \
444 --pkg gtk+-@GTK_API_VERSION@ \
447 --add-include-path $(top_srcdir)/WebKit/gtk \
448 --add-include-path $(builddir) \
449 -I$(top_srcdir)/WebKit/gtk \
450 -I$(top_builddir)/WebKit/gtk \
451 -I$(top_builddir)/DerivedSources \
452 -I$(top_builddir)/DerivedSources/webkit \
453 -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
458 girdir = $(datadir)/gir-1.0
459 gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
461 typelibsdir += $(libdir)/girepository-1.0
462 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
464 %.typelib: %.gir $(G_IR_COMPILER)
465 $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk --includedir $(builddir) $< -o $@
467 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
471 EXTRA_DIST += $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
473 WEBKIT_MARSHAL = $(GENSOURCES_WEBKIT)/webkitmarshal
474 WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
476 $(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
479 $(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
482 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
483 $(AM_V_GEN) echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
484 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
485 echo timestamp > $(@F)
487 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
488 $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
489 echo timestamp > $(@F)
491 WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
493 stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
494 $(AM_V_GEN)glib-mkenums \
495 --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
496 --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
497 --fhead "#include <glib-object.h>\n\n" \
498 --fhead "#include <webkit/webkitdefines.h>\n\n" \
499 --fhead "G_BEGIN_DECLS\n\n" \
500 --ftail "G_END_DECLS\n\n" \
502 --fprod "#include <webkit/@basename@>\n\n" \
503 --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
504 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
505 $(webkitgtk_h_api) | \
506 sed 's,web_kit,webkit,' | \
507 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
509 && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
511 && echo timestamp > $(@F)
513 DerivedSources/webkit/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
514 $(AM_V_GEN)glib-mkenums \
515 --fhead "#include <config.h>\n" \
516 --fhead "#include <glib-object.h>\n" \
517 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
518 --fhead "extern \"C\" {\n\n" \
519 --fprod "\n/* enumerations from \"@filename@\" */" \
520 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
521 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
522 --vtail " { 0, NULL, NULL }\n};\n\n" \
523 --vtail "GType @enum_name@_get_type(void)\n{\n" \
524 --vtail " static GType type = 0;\n\n" \
525 --vtail " if (!type)\n" \
526 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
527 --vtail " return type;\n}\n\n" \
529 $(webkitgtk_h_api) | \
530 sed 's,web_kit,webkit,' \
535 WebKit/gtk/webkit/webkitdomenumtypes.h: stamp-webkitdomenumtypes.h
537 stamp-webkitdomenumtypes.h: $(libgdom_h_api) GNUmakefile
538 $(AM_V_GEN)glib-mkenums \
539 --fhead "#ifndef WEBKIT_DOM_ENUM_TYPES_H\n" \
540 --fhead "#define WEBKIT_DOM_ENUM_TYPES_H\n\n" \
541 --fhead "#include <glib-object.h>\n\n" \
542 --fhead "G_BEGIN_DECLS\n\n" \
543 --ftail "G_END_DECLS\n\n" \
545 --fprod "#include <webkit/@basename@>\n\n" \
546 --eprod "#define WEBKIT_DOM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
547 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);n\n" \
549 sed 's,web_kit,webkit_dom,' | \
550 sed 's,WEBKIT_DOM_TYPE_KIT,WEBKIT_DOM_TYPE,' \
552 && (cmp -s xgen-cgth WebKit/gtk/webkit/webkitdomenumtypes.h || cp xgen-cgth WebKit/gtk/webkit/webkitdomenumtypes.h) \
554 && echo timestamp > $(@F)
556 DerivedSources/webkit/webkitdomenumtypes.cpp: $(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h $(libgdom_h_api) GNUmakefile
557 $(AM_V_GEN)glib-mkenums \
558 --fhead "#include <config.h>\n" \
559 --fhead "#include <glib-object.h>\n" \
560 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h\"\n\n" \
561 --fhead "extern \"C\" {\n\n" \
562 --fprod "\n/* enumerations from \"@filename@\" */" \
563 --vhead "static const G@Type@Value _@enum_name@_values] = {" \
564 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
565 --vtail " { 0, NULL, NULL }\n};\n\n" \
566 --vtail "GType @enum_name@_get_type(void)\n{\n" \
567 --vtail " static GType type = 0;\n\n" \
568 --vtail " if (!type)\n" \
569 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
570 --vtail " return type;\n}\n\n" \
573 sed 's,web_kit,webkitdom,' \
578 # Files that will be distributed
580 $(srcdir)/gtk-doc.make \
582 $(srcdir)/autotools/symbols.filter \
583 $(srcdir)/WebKit/gtk/ChangeLog \
584 $(srcdir)/WebKit/gtk/NEWS \
585 $(srcdir)/WebKit/gtk/webkitmarshal.list \
586 $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
587 $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
588 $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
589 $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
590 $(srcdir)/WebKit/gtk/docs/version.xml.in \
591 $(srcdir)/WebKit/gtk/po/* \
592 $(srcdir)/WebKit/gtk/resources/* \
593 $(srcdir)/WebKit/gtk/tests/resources/* \
594 $(srcdir)/WebKit/gtk/tests/test_utils.h
596 # extra resource files
597 resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
598 dist_resources_DATA = \
599 $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
603 # Include module makefiles
604 include JavaScriptCore/GNUmakefile.am
605 include WebCore/GNUmakefile.am
606 include WebKitTools/GNUmakefile.am
607 include WebKit/gtk/po/GNUmakefile.am
610 noinst_PROGRAMS += $(TEST_PROGS)
612 webkit_tests_cflags = \
613 -fno-strict-aliasing \
614 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
615 -I$(srcdir)/WebKit/gtk \
616 -I$(top_builddir)/WebKit/gtk \
617 -I$(top_builddir)/DerivedSources \
618 -I$(top_srcdir)/WebCore/bindings \
619 -I$(top_srcdir)/WebCore/bindings/gobject \
625 webkit_tests_ldadd = \
626 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
631 webkit_tests_ldflags = \
636 Programs/unittests/testdomdocument \
637 Programs/unittests/testdomdomwindow \
638 Programs/unittests/testdomnode \
639 Programs/unittests/testhttpbackend \
640 Programs/unittests/testloading \
641 Programs/unittests/testglobals \
642 Programs/unittests/testmimehandling \
643 Programs/unittests/testnetworkrequest \
644 Programs/unittests/testnetworkresponse \
645 Programs/unittests/testwebframe \
646 Programs/unittests/testwebbackforwardlist \
647 Programs/unittests/testwebhistoryitem \
648 Programs/unittests/testwindow \
649 Programs/unittests/testdownload \
650 Programs/unittests/testatk \
651 Programs/unittests/testatkroles \
652 Programs/unittests/testhittestresult \
653 Programs/unittests/testwebsettings \
654 Programs/unittests/testwebresource \
655 Programs/unittests/testwebdatasource \
656 Programs/unittests/testwebview \
657 Programs/unittests/testkeyevents \
658 Programs/unittests/testcopyandpaste
660 # Add additional tests here
661 Programs_unittests_testdomdocument_SOURCES = WebKit/gtk/tests/testdomdocument.c
662 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
663 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
664 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
666 Programs_unittests_testdomdomwindow_SOURCES = WebKit/gtk/tests/testdomdomwindow.c
667 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
668 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
669 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
671 Programs_unittests_testdomnode_SOURCES = WebKit/gtk/tests/testdomnode.c
672 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
673 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
674 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
676 Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
677 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
678 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
679 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
681 Programs_unittests_testglobals_SOURCES = WebKit/gtk/tests/testglobals.c
682 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
683 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
684 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
686 Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
687 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
688 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
689 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
691 Programs_unittests_testmimehandling_SOURCES = WebKit/gtk/tests/testmimehandling.c WebKit/gtk/tests/test_utils.c
692 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
693 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
694 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
696 Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
697 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
698 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
699 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
701 Programs_unittests_testnetworkresponse_SOURCES = WebKit/gtk/tests/testnetworkresponse.c
702 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
703 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
704 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
706 Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
707 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
708 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
709 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
711 Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
712 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
713 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
714 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
716 Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
717 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
718 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
719 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
721 Programs_unittests_testwindow_SOURCES = WebKit/gtk/tests/testwindow.c
722 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
723 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
724 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
726 Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
727 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
728 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
729 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
731 Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
732 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
733 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
734 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
736 Programs_unittests_testatkroles_SOURCES = WebKit/gtk/tests/testatkroles.c
737 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
738 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
739 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
741 Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
742 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
743 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
744 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
746 Programs_unittests_testwebresource_SOURCES = WebKit/gtk/tests/testwebresource.c
747 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
748 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
750 Programs_unittests_testwebdatasource_SOURCES = WebKit/gtk/tests/testwebdatasource.c
751 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
752 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
754 Programs_unittests_testwebview_SOURCES = WebKit/gtk/tests/testwebview.c WebKit/gtk/tests/test_utils.c
755 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
756 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
757 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
759 Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c
760 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
761 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
763 Programs_unittests_testkeyevents_SOURCES = WebKit/gtk/tests/testkeyevents.c
764 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
765 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
766 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
768 Programs_unittests_testcopyandpaste_SOURCES = WebKit/gtk/tests/testcopyandpaste.c
769 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags)
770 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
771 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
773 # Autogenerated sources
775 $(javascriptcore_built_sources) \
776 $(javascriptcore_built_nosources) \
777 $(webcore_built_sources) \
778 $(webcore_built_nosources) \
779 $(webkitgtk_built_sources) \
780 $(webkitgtk_built_nosources) \
781 $(gdom_built_nosources)
783 # Project-wide clean rules
784 # Files that will be cleaned
787 $(webkitgtk_cleanfiles) \
788 $(libgdom_cleanfiles)
792 $(builddir)/doltcompile \
793 $(builddir)/doltlibtool
795 MAINTAINERCLEANFILES += \
797 $(builddir)/doltcompile \
798 $(builddir)/doltlibtool \
799 $(srcdir)/aconfig.h.in \
800 $(srcdir)/autotools/config.* \
801 $(srcdir)/autotools/compile \
802 $(srcdir)/autotools/depcomp \
803 $(srcdir)/autotools/install-sh \
804 $(srcdir)/autotools/missing \
805 $(srcdir)/configure \
806 $(srcdir)/GNUmakefile.in \
809 $(top_builddir)/config.*
811 # Older automake versions (1.7) place Plo files in a different place so we need
812 # to create the output directory manually.
814 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
816 # remove built sources and program directories
818 -rm -rf $(GENPROGRAMS)
820 maintainer-clean-local: distclean-local
823 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
826 cp $(srcdir)/WebKit/gtk/NEWS $(distdir)
828 install-data-local: po-install-data-local
830 installdirs-data-local: po-installdirs-data-local
832 uninstall-local: po-uninstall-local
834 # Run all tests in cwd
835 # FIXME: we should run this under xvfb
837 $(GTESTER) --verbose $(TEST_PROGS);
839 # test-report: run tests in cwd and generate report
840 # full-report: run tests in cwd with -m perf and -m slow and generate report
841 # perf-report: run tests in cwd with -m perf and generate report
842 test-report full-report perf-report: $(TEST_PROGS)
844 test-report) test_options="-k";; \
845 full-report) test_options="-k -m=perf";; \
846 perf-report) test_options="-k -m=perf -m=slow";; \
848 $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
849 $(GTESTER_REPORT) test-report.xml > test-report.html ;
851 .PHONY: test test-report perf-report full-report