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
20 # Global Variables Reference
21 # global_cppflags = CPPFLAGS that apply to all C/C++ files that are built for any project.
22 # global_cflags = CFLAGS that apply to all C files that are built for any project.
23 # global_cxxflags = CXXFLAGS that apply to all C++ files that are bult for any project.
28 DISTCHECK_CONFIGURE_FLAGS = \
29 --enable-introspection \
33 # Directory for autogenerated sources
34 GENSOURCES := $(top_builddir)/DerivedSources
35 GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
36 GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
37 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
38 GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
39 GENPROGRAMS := $(top_builddir)/Programs
40 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
41 WebCore := $(srcdir)/Source/WebCore
42 WebKit := $(srcdir)/Source/WebKit/gtk
43 WebKit2 := $(srcdir)/Source/WebKit2
44 pkgconfigdir := $(libdir)/pkgconfig
45 libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
47 # Libraries and support components
62 feature_defines_defaults :=
63 feature_defines_overrides :=
67 javascriptcore_h_api :=
68 javascriptcore_cppflags:=
69 javascriptcore_cflags :=
70 javascriptcore_sources :=
71 javascriptcore_built_sources :=
72 javascriptcore_built_nosources :=
74 offlineasm_nosources :=
76 webcore_modules_sources :=
79 webcore_built_sources :=
80 webcore_built_nosources :=
82 webcoregtk_cppflags :=
83 webkitgtk_built_h_api :=
84 webkitgtk_static_h_api :=
88 webkitgtk_gdom_built_sources :=
89 webkitgtk_built_sources :=
90 webkitgtk_built_nosources :=
93 webkit2_built_sources :=
95 webkit2gtk_built_sources :=
96 webkit2_plugin_process_sources :=
97 webkit2_plugin_process_built_sources :=
98 webkittestrunner_built_sources :=
99 libwebcoreinternals_built_sources :=
100 minibrowser_built_sources :=
113 MAINTAINERCLEANFILES :=
116 # We do not care at all about this implicit built-in make rules,
117 # disable them to save some build time
132 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
133 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
134 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
135 -Wno-unused-parameter -Wno-parentheses \
136 -fno-exceptions -DENABLE_GLIB_SUPPORT=1
142 # -no-undefined required for building DLLs on Windows
143 # It breaks the build on other platforms, so we use it conditionally
145 no_undefined = -no-undefined
146 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
150 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
153 # Extra checks and flags
155 -DBUILDING_CAIRO__=1 \
161 -DBUILDING_WEBKIT2__=1
164 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
173 # Add MOZ_X11 for X11 targets only
179 # Use the wide character version of win32 API by default
188 -DWTF_USE_ICU_UNICODE=1
193 -DWTF_USE_GLIB_UNICODE=1
196 if !ENABLE_FAST_MALLOC
203 -DWTF_USE_GSTREAMER=1
208 -DWTF_USE_FARSTREAM=1
211 if USE_ACCELERATED_COMPOSITING
213 -DWTF_USE_ACCELERATED_COMPOSITING=1 \
214 -DENABLE_3D_RENDERING=1
217 if USE_TEXTURE_MAPPER_CAIRO
219 -DWTF_USE_TEXTURE_MAPPER=1 \
220 -DWTF_USE_TEXTURE_MAPPER_CAIRO=1
223 if USE_TEXTURE_MAPPER_GL
225 -DWTF_USE_TEXTURE_MAPPER=1 \
226 -DWTF_USE_TEXTURE_MAPPER_GL=1
245 # GTK+ 2.x/3.x support
249 -DGTK_API_VERSION_2=1
253 global_cppflags += -DNDEBUG
256 -DGDK_PIXBUF_DISABLE_DEPRECATED \
257 -DGDK_DISABLE_DEPRECATED \
258 -DGTK_DISABLE_DEPRECATED \
259 -DPANGO_DISABLE_DEPRECATED
260 # Might be useful in the future
261 # -DGDK_MULTIHEAD_SAFE \
262 # -DGTK_MULTIHEAD_SAFE
267 -DGCC_GENERATE_TEST_COVERAGE_FILES \
268 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
272 $(srcdir)/Source/autotools/symbols.filter \
273 $(srcdir)/Source/WebKit/LICENSE
275 # Include module makefiles
276 include Source/WTF/GNUmakefile.am
277 include Source/JavaScriptCore/GNUmakefile.am
278 include Source/WebCore/GNUmakefile.am
279 include Source/WebKit/gtk/GNUmakefile.am
280 include Source/WebCore/bindings/gobject/GNUmakefile.am
281 include Tools/GNUmakefile.am
282 include Source/WebKit/gtk/po/GNUmakefile.am
283 include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
285 include Source/WebKit2/GNUmakefile.am
286 include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
287 include Tools/MiniBrowser/gtk/GNUmakefile.am
288 include Tools/WebKitTestRunner/GNUmakefile.am
289 include Source/ThirdParty/gtest/GNUmakefile.am
290 include Tools/TestWebKitAPI/GNUmakefile.am
291 # [GTK] Refactor the translations now that we have webkit2
292 # https://bugs.webkit.org/show_bug.cgi?id=55153
294 # Autogenerated sources
296 $(javascriptcore_built_sources) \
297 $(javascriptcore_built_nosources) \
298 $(webcore_built_sources) \
299 $(webcore_built_nosources) \
300 $(webkitgtk_built_sources) \
301 $(webkitgtk_built_nosources) \
302 $(webkit2_built_sources) \
303 $(webkit2gtk_built_sources) \
304 $(webkit2_plugin_process_built_sources)
308 $(builddir)/doltcompile \
309 $(builddir)/doltlibtool
311 MAINTAINERCLEANFILES += \
313 $(builddir)/doltcompile \
314 $(builddir)/doltlibtool \
315 $(srcdir)/aconfig.h.in \
316 $(srcdir)/Source/autotools/config.* \
317 $(srcdir)/Source/autotools/compile \
318 $(srcdir)/Source/autotools/depcomp \
319 $(srcdir)/Source/autotools/install-sh \
320 $(srcdir)/Source/autotools/missing \
321 $(srcdir)/configure \
322 $(srcdir)/GNUmakefile.in \
325 $(top_builddir)/config.*
327 # Older automake versions (1.7) place Plo files in a different place so we need
328 # to create the output directory manually.
330 $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
332 # remove built sources and program directories
334 -rm -rf $(GENPROGRAMS)
336 maintainer-clean-local: distclean-local
338 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
340 dist-hook: doc-dist-hook
341 doc-dist-hook: docs-build.stamp
342 cp $(WebKit)/NEWS $(distdir)
343 @mkdir -p $(distdir)/Documentation/webkitgtk/html
344 @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
345 @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
346 @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
348 @mkdir -p $(distdir)/Documentation/webkit2gtk/html
349 @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
350 @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
351 @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html