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 # Script for creating hash tables
44 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
46 # Script for creating regexp tables
47 CREATE_REGEXP_TABLES = $(srcdir)/JavaScriptCore/create_regex_tables
49 # Programs to run the WebKitGtk unit tests
51 GTESTER_REPORT = gtester-report
53 # Libraries and support components
63 javascriptcore_h_api :=
64 javascriptcore_cppflags:=
65 javascriptcore_sources :=
66 javascriptcore_built_sources :=
67 javascriptcore_built_nosources :=
68 javascriptcore_dist :=
72 webcore_built_sources :=
73 webcore_built_nosources :=
75 webcoregtk_cppflags :=
88 webkitgtk_built_sources :=
89 webkitgtk_built_nosources :=
90 webkitgtk_cleanfiles :=
104 MAINTAINERCLEANFILES :=
106 webcoregtk_cppflags += \
107 -I$(top_builddir)/DerivedSources/webkit \
108 -I$(srcdir)/WebCore/bindings \
109 -I$(srcdir)/WebCore/bindings/gobject
111 # CFLAGS/CXXFLAGS used by WebCore and WebKit
113 # gtk+.pc already include glib, cairo, freetype and pango CFLAGS
114 # Don't include them for now to reduce the noise when compiling
115 # $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS) $(FREETYPE_CFLAGS)
117 -fno-strict-aliasing \
123 $(GSTREAMER_CFLAGS) \
133 # When building webcore/webkit, we want WebCore/config.h and NOT
134 # JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
135 # before JavaScriptCore in the include path.
136 corekit_cppflags += \
138 $(webcore_cppflags) \
139 $(webcoregtk_cppflags) \
140 $(javascriptcore_cppflags)
142 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
144 corekit_cppflags += -DXP_UNIX
147 # Default compiler flags
149 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
150 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
151 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
152 -Wno-unused-parameter -Wno-parentheses \
157 $(SYMBOL_VISIBILITY_INLINES) \
160 # -no-undefined required for building DLLs on Windows
161 # It breaks the build on other platforms, so we use it conditionally
163 no_undefined = -no-undefined
164 version_script = -export-symbols-regex "^(webkit_|JS).*"
168 version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
173 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
175 # Convenience libraries
176 noinst_LTLIBRARIES += \
180 javascriptcore_cppflags += \
181 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
182 -I$(srcdir)/JavaScriptCore/parser \
183 -I$(srcdir)/JavaScriptCore/wtf \
184 -I$(srcdir)/JavaScriptCore/wtf/gtk \
185 -I$(srcdir)/JavaScriptCore/wtf/gobject \
186 -I$(top_builddir)/DerivedSources/JavaScriptCore
188 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
189 $(javascriptcore_built_nosources)
191 nodist_libJavaScriptCore_la_SOURCES = \
192 $(javascriptcore_built_sources)
194 libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
195 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
197 libJavaScriptCore_la_SOURCES = \
198 $(javascriptcore_sources)
200 libJavaScriptCore_la_LIBADD = \
205 libJavaScriptCore_la_CXXFLAGS = \
207 $(libJavaScriptCore_la_CFLAGS)
209 libJavaScriptCore_la_CFLAGS = \
216 libJavaScriptCore_la_CPPFLAGS = \
218 $(javascriptcore_cppflags)
221 nodist_EXTRA_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
222 $(webcore_built_nosources)
224 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
225 $(webcore_built_sources) \
226 $(webkitgtk_built_sources)
228 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
229 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
231 WebKit/gtk/webkit/webkitenumtypes.h
233 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
235 $(webcoregtk_sources) \
238 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
242 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
246 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
247 $(corekit_cppflags) \
248 $(webkitgtk_cppflags) \
251 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
252 -version-info @LIBWEBKITGTK_VERSION@ \
256 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
258 libJavaScriptCore.la \
263 $(COVERAGE_LDFLAGS) \
282 libgdom_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
283 nodist_libgdom_la_HEADERS = \
286 libgdom_cleanfiles += \
287 $(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h \
288 $(top_builddir)/libgdom.la \
289 $(top_builddir)/stamp-webkitdomenumtypes.h
292 # Extra checks and flags
294 -DBUILDING_CAIRO__=1 \
300 -DWTF_USE_ICU_UNICODE=1
305 -DWTF_USE_GLIB_UNICODE=1
308 if !ENABLE_FAST_MALLOC
314 global_cppflags += -DNDEBUG
315 global_cflags += $(SYMBOL_VISIBILITY)
317 webcoregtk_cppflags += \
318 -DG_DISABLE_DEPRECATED \
319 -DGDK_PIXBUF_DISABLE_DEPRECATED \
320 -DGDK_DISABLE_DEPRECATED \
321 -DGTK_DISABLE_DEPRECATED \
322 -DPANGO_DISABLE_DEPRECATED
324 # Might be useful in the future
325 # -DGDK_MULTIHEAD_SAFE \
326 # -DGTK_MULTIHEAD_SAFE
331 -DGCC_GENERATE_TEST_COVERAGE_FILES \
332 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
336 $(srcdir)/WebKit/gtk/webkit/webkit.h \
337 $(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
338 $(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
339 $(srcdir)/WebKit/gtk/webkit/webkiterror.h \
340 $(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
341 $(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
342 $(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
343 $(srcdir)/WebKit/gtk/webkit/webkitsoupauthdialog.h \
344 $(srcdir)/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
345 $(srcdir)/WebKit/gtk/webkit/webkitwebdatasource.h \
346 $(srcdir)/WebKit/gtk/webkit/webkitwebframe.h \
347 $(srcdir)/WebKit/gtk/webkit/webkitwebhistoryitem.h \
348 $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
349 $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
350 $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
351 $(srcdir)/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
352 $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
353 $(srcdir)/WebKit/gtk/webkit/webkitwebsettings.h \
354 $(srcdir)/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
355 $(srcdir)/WebKit/gtk/webkit/webkitwebview.h \
356 $(srcdir)/WebKit/gtk/webkit/webkitwebdatabase.h \
357 $(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h \
358 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
360 webkitgtk_built_sources += \
361 DerivedSources/webkit/webkitenumtypes.cpp \
362 DerivedSources/webkit/webkitdomenumtypes.cpp \
363 DerivedSources/webkit/webkitmarshal.cpp \
364 DerivedSources/webkit/webkitmarshal.h \
365 WebKit/gtk/webkit/webkitenumtypes.h
367 webkitgtk_sources += \
368 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
369 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
370 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
371 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
372 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
373 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
374 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
375 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
376 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
377 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
378 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
379 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
380 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
381 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
382 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
383 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
384 WebKit/gtk/webkit/webkitapplicationcache.cpp \
385 WebKit/gtk/webkit/webkitdownload.cpp \
386 WebKit/gtk/webkit/webkiterror.cpp \
387 WebKit/gtk/webkit/webkithittestresult.cpp \
388 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
389 WebKit/gtk/webkit/webkitnetworkresponse.cpp \
390 WebKit/gtk/webkit/webkitprivate.cpp \
391 WebKit/gtk/webkit/webkitprivate.h \
392 WebKit/gtk/webkit/webkitsoupauthdialog.c \
393 WebKit/gtk/webkit/webkitversion.cpp \
394 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
395 WebKit/gtk/webkit/webkitwebdatasource.cpp \
396 WebKit/gtk/webkit/webkitwebframe.cpp \
397 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
398 WebKit/gtk/webkit/webkitwebinspector.cpp \
399 WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
400 WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
401 WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
402 WebKit/gtk/webkit/webkitwebresource.cpp \
403 WebKit/gtk/webkit/webkitwebdatabase.cpp \
404 WebKit/gtk/webkit/webkitsecurityorigin.cpp \
405 WebKit/gtk/webkit/webkitwebsettings.cpp \
406 WebKit/gtk/webkit/webkitwebview.cpp \
407 WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
408 WebKit/gtk/webkit/webkitworkers.cpp
410 webkitgtk_cppflags += \
412 -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
413 -DDATA_DIR=\"${datadir}\" \
414 -I$(srcdir)/WebKit/gtk \
415 -I$(srcdir)/WebKit/gtk/WebCoreSupport \
416 -I$(srcdir)/WebKit/gtk/webkit \
417 -I$(top_builddir)/WebKit/gtk \
418 -I$(top_builddir)/WebKit/gtk/webkit \
419 -I$(GENSOURCES_WEBKIT)
421 webkitgtk_cleanfiles += \
422 $(top_builddir)/stamp-webkitmarshal.cpp \
423 $(top_builddir)/stamp-webkitmarshal.h \
424 $(top_builddir)/stamp-webkitenumtypes.cpp \
425 $(top_builddir)/stamp-webkitenumtypes.h \
426 $(top_builddir)/Programs/GtkLauncher \
427 $(top_builddir)/WebKit/gtk/docs/version.xml \
428 $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
429 $(top_builddir)/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
430 $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
431 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
433 pkgconfigdir = $(libdir)/pkgconfig
434 pkgconfig_DATA = WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
436 if ENABLE_INTROSPECTION
438 JSCore-@WEBKITGTK_API_VERSION@.gir: $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
439 cp $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(builddir)/
441 JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
442 WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
444 $(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
445 $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=@WEBKITGTK_API_VERSION@ \
446 --include=GObject-2.0 \
447 --include=Gtk-@GTK_API_VERSION@ \
448 --include=JSCore-@WEBKITGTK_API_VERSION@ \
450 --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
451 --libtool="$(LIBTOOL)" \
453 --pkg gtk+-@GTK_API_VERSION@ \
456 --add-include-path $(top_srcdir)/WebKit/gtk \
457 --add-include-path $(builddir) \
458 -I$(top_srcdir)/WebKit/gtk \
459 -I$(top_builddir)/WebKit/gtk \
460 -I$(top_builddir)/DerivedSources/webkit \
461 -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
466 girdir = $(datadir)/gir-1.0
467 gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
469 typelibsdir += $(libdir)/girepository-1.0
470 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
472 %.typelib: %.gir $(G_IR_COMPILER)
473 $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk --includedir $(builddir) $< -o $@
475 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
479 EXTRA_DIST += $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
481 WEBKIT_MARSHAL = $(GENSOURCES_WEBKIT)/webkitmarshal
482 WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
484 $(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
487 $(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
490 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
491 $(AM_V_GEN) echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
492 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
493 echo timestamp > $(@F)
495 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
496 $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
497 echo timestamp > $(@F)
499 WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
501 stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
502 $(AM_V_GEN)glib-mkenums \
503 --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
504 --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
505 --fhead "#include <glib-object.h>\n\n" \
506 --fhead "#include <webkit/webkitdefines.h>\n\n" \
507 --fhead "G_BEGIN_DECLS\n\n" \
508 --ftail "G_END_DECLS\n\n" \
510 --fprod "#include <webkit/@basename@>\n\n" \
511 --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
512 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
513 $(webkitgtk_h_api) | \
514 sed 's,web_kit,webkit,' | \
515 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
517 && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
519 && echo timestamp > $(@F)
521 DerivedSources/webkit/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
522 $(AM_V_GEN)glib-mkenums \
523 --fhead "#include <config.h>\n" \
524 --fhead "#include <glib-object.h>\n" \
525 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
526 --fhead "extern \"C\" {\n\n" \
527 --fprod "\n/* enumerations from \"@filename@\" */" \
528 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
529 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
530 --vtail " { 0, NULL, NULL }\n};\n\n" \
531 --vtail "GType @enum_name@_get_type(void)\n{\n" \
532 --vtail " static GType type = 0;\n\n" \
533 --vtail " if (!type)\n" \
534 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
535 --vtail " return type;\n}\n\n" \
537 $(webkitgtk_h_api) | \
538 sed 's,web_kit,webkit,' \
543 WebKit/gtk/webkit/webkitdomenumtypes.h: stamp-webkitdomenumtypes.h
545 stamp-webkitdomenumtypes.h: $(libgdom_h_api) GNUmakefile
546 $(AM_V_GEN)glib-mkenums \
547 --fhead "#ifndef WEBKIT_DOM_ENUM_TYPES_H\n" \
548 --fhead "#define WEBKIT_DOM_ENUM_TYPES_H\n\n" \
549 --fhead "#include <glib-object.h>\n\n" \
550 --fhead "G_BEGIN_DECLS\n\n" \
551 --ftail "G_END_DECLS\n\n" \
553 --fprod "#include <webkit/@basename@>\n\n" \
554 --eprod "#define WEBKIT_DOM_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
555 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);n\n" \
557 sed 's,web_kit,webkit_dom,' | \
558 sed 's,WEBKIT_DOM_TYPE_KIT,WEBKIT_DOM_TYPE,' \
560 && (cmp -s xgen-cgth WebKit/gtk/webkit/webkitdomenumtypes.h || cp xgen-cgth WebKit/gtk/webkit/webkitdomenumtypes.h) \
562 && echo timestamp > $(@F)
564 DerivedSources/webkit/webkitdomenumtypes.cpp: $(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h $(libgdom_h_api) GNUmakefile
565 $(AM_V_GEN)glib-mkenums \
566 --fhead "#include <config.h>\n" \
567 --fhead "#include <glib-object.h>\n" \
568 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitdomenumtypes.h\"\n\n" \
569 --fhead "extern \"C\" {\n\n" \
570 --fprod "\n/* enumerations from \"@filename@\" */" \
571 --vhead "static const G@Type@Value _@enum_name@_values] = {" \
572 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
573 --vtail " { 0, NULL, NULL }\n};\n\n" \
574 --vtail "GType @enum_name@_get_type(void)\n{\n" \
575 --vtail " static GType type = 0;\n\n" \
576 --vtail " if (!type)\n" \
577 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
578 --vtail " return type;\n}\n\n" \
581 sed 's,web_kit,webkitdom,' \
586 # Files that will be distributed
588 $(srcdir)/gtk-doc.make \
590 $(javascriptcore_dist) \
592 $(srcdir)/autotools/symbols.filter \
593 $(srcdir)/WebKit/gtk/ChangeLog \
594 $(srcdir)/WebKit/gtk/NEWS \
595 $(srcdir)/WebKit/gtk/webkitmarshal.list \
596 $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
597 $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
598 $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
599 $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
600 $(srcdir)/WebKit/gtk/docs/version.xml.in \
601 $(srcdir)/WebKit/gtk/po/* \
602 $(srcdir)/WebKit/gtk/resources/* \
603 $(srcdir)/WebKit/gtk/tests/resources/* \
604 $(srcdir)/WebKit/gtk/tests/test_utils.h
606 # extra resource files
607 resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
608 dist_resources_DATA = \
609 $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
613 # Include module makefiles
614 include JavaScriptCore/GNUmakefile.am
615 include WebCore/GNUmakefile.am
616 include WebKitTools/GNUmakefile.am
617 include WebKit/gtk/po/GNUmakefile.am
620 noinst_PROGRAMS += $(TEST_PROGS)
622 webkit_tests_cflags = \
623 -fno-strict-aliasing \
624 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
625 -I$(srcdir)/WebKit/gtk \
626 -I$(top_builddir)/WebKit/gtk \
627 -I$(top_builddir)/DerivedSources \
628 -I$(top_srcdir)/WebCore/bindings \
629 -I$(top_srcdir)/WebCore/bindings/gobject \
635 webkit_tests_ldadd = \
636 libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
641 webkit_tests_ldflags = \
646 Programs/unittests/testdomdocument \
647 Programs/unittests/testdomdomwindow \
648 Programs/unittests/testdomnode \
649 Programs/unittests/testhttpbackend \
650 Programs/unittests/testloading \
651 Programs/unittests/testglobals \
652 Programs/unittests/testmimehandling \
653 Programs/unittests/testnetworkrequest \
654 Programs/unittests/testnetworkresponse \
655 Programs/unittests/testwebframe \
656 Programs/unittests/testwebbackforwardlist \
657 Programs/unittests/testwebhistoryitem \
658 Programs/unittests/testwindow \
659 Programs/unittests/testdownload \
660 Programs/unittests/testatk \
661 Programs/unittests/testatkroles \
662 Programs/unittests/testhittestresult \
663 Programs/unittests/testwebsettings \
664 Programs/unittests/testwebresource \
665 Programs/unittests/testwebdatasource \
666 Programs/unittests/testwebview \
667 Programs/unittests/testkeyevents \
668 Programs/unittests/testcopyandpaste
670 # Add additional tests here
671 Programs_unittests_testdomdocument_SOURCES = WebKit/gtk/tests/testdomdocument.c
672 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
673 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
674 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
676 Programs_unittests_testdomdomwindow_SOURCES = WebKit/gtk/tests/testdomdomwindow.c
677 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
678 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
679 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
681 Programs_unittests_testdomnode_SOURCES = WebKit/gtk/tests/testdomnode.c
682 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
683 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
684 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
686 Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
687 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
688 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
689 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
691 Programs_unittests_testglobals_SOURCES = WebKit/gtk/tests/testglobals.c
692 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
693 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
694 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
696 Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
697 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
698 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
699 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
701 Programs_unittests_testmimehandling_SOURCES = WebKit/gtk/tests/testmimehandling.c WebKit/gtk/tests/test_utils.c
702 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
703 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
704 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
706 Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
707 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
708 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
709 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
711 Programs_unittests_testnetworkresponse_SOURCES = WebKit/gtk/tests/testnetworkresponse.c
712 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
713 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
714 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
716 Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
717 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
718 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
719 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
721 Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
722 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
723 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
724 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
726 Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
727 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
728 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
729 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
731 Programs_unittests_testwindow_SOURCES = WebKit/gtk/tests/testwindow.c
732 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
733 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
734 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
736 Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
737 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
738 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
739 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
741 Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
742 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
743 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
744 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
746 Programs_unittests_testatkroles_SOURCES = WebKit/gtk/tests/testatkroles.c
747 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
748 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
749 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
751 Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
752 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
753 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
754 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
756 Programs_unittests_testwebresource_SOURCES = WebKit/gtk/tests/testwebresource.c
757 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
758 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
760 Programs_unittests_testwebdatasource_SOURCES = WebKit/gtk/tests/testwebdatasource.c
761 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
762 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
764 Programs_unittests_testwebview_SOURCES = WebKit/gtk/tests/testwebview.c WebKit/gtk/tests/test_utils.c
765 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
766 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
767 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
769 Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c
770 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
771 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
773 Programs_unittests_testkeyevents_SOURCES = WebKit/gtk/tests/testkeyevents.c
774 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
775 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
776 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
778 Programs_unittests_testcopyandpaste_SOURCES = WebKit/gtk/tests/testcopyandpaste.c
779 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags)
780 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
781 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
783 # Autogenerated sources
785 $(javascriptcore_built_sources) \
786 $(javascriptcore_built_nosources) \
787 $(webcore_built_sources) \
788 $(webcore_built_nosources) \
789 $(webkitgtk_built_sources) \
790 $(webkitgtk_built_nosources) \
791 $(gdom_built_nosources)
793 # Project-wide clean rules
794 # Files that will be cleaned
797 $(webkitgtk_cleanfiles) \
798 $(libgdom_cleanfiles)
802 $(builddir)/doltcompile \
803 $(builddir)/doltlibtool
805 MAINTAINERCLEANFILES += \
807 $(builddir)/doltcompile \
808 $(builddir)/doltlibtool \
809 $(srcdir)/aconfig.h.in \
810 $(srcdir)/autotools/config.* \
811 $(srcdir)/autotools/compile \
812 $(srcdir)/autotools/depcomp \
813 $(srcdir)/autotools/install-sh \
814 $(srcdir)/autotools/missing \
815 $(srcdir)/configure \
816 $(srcdir)/GNUmakefile.in \
819 $(top_builddir)/config.*
821 # Older automake versions (1.7) place Plo files in a different place so we need
822 # to create the output directory manually.
824 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
826 # remove built sources and program directories
828 -rm -rf $(GENPROGRAMS)
830 maintainer-clean-local: distclean-local
833 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
836 cp $(srcdir)/WebKit/gtk/NEWS $(distdir)/
838 install-data-local: po-install-data-local
840 installdirs-data-local: po-installdirs-data-local
842 uninstall-local: po-uninstall-local
844 # Run all tests in cwd
845 # FIXME: we should run this under xvfb
847 $(GTESTER) --verbose $(TEST_PROGS);
849 # test-report: run tests in cwd and generate report
850 # full-report: run tests in cwd with -m perf and -m slow and generate report
851 # perf-report: run tests in cwd with -m perf and generate report
852 test-report full-report perf-report: $(TEST_PROGS)
854 test-report) test_options="-k";; \
855 full-report) test_options="-k -m=perf";; \
856 perf-report) test_options="-k -m=perf -m=slow";; \
858 $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
859 $(GTESTER_REPORT) test-report.xml > test-report.html ;
861 .PHONY: test test-report perf-report full-report