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 GENSOURCES_WEBKITDOM := $(top_builddir)/DerivedSources/webkitdom
40 GENPROGRAMS := $(top_builddir)/Programs
41 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
42 WebCore := $(srcdir)/Source/WebCore
43 WebKit := $(srcdir)/Source/WebKit/gtk
44 WebKit2 := $(srcdir)/Source/WebKit2
45 pkgconfigdir := $(libdir)/pkgconfig
46 libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
48 # Libraries and support components
65 javascriptcore_h_api :=
66 javascriptcore_cppflags:=
67 javascriptcore_cflags :=
68 javascriptcore_sources :=
69 javascriptcore_built_sources :=
70 javascriptcore_built_nosources :=
72 offlineasm_nosources :=
73 platform_webcore_cppflags :=
74 platformgtk_cppflags :=
75 platformgtk_sources :=
76 webcore_platform_sources :=
77 webcore_modules_sources :=
78 webcore_svg_built_sources :=
79 webcore_svg_sources :=
83 webcore_built_sources :=
84 webcore_built_nosources :=
86 webcoregtk_cppflags :=
87 webkitgtk_built_h_api :=
88 webkitgtk_static_h_api :=
92 webkitgtk_gdom_built_h_api :=
93 webkitgtk_gdom_built_sources :=
94 webkitgtk_built_sources :=
95 webkitgtk_built_nosources :=
98 webkit2_built_sources :=
99 webkit2platform_sources :=
101 webkit2gtk_built_sources :=
102 webkit2_web_extension_h_api :=
103 webkit2_plugin_process_sources :=
104 webkit2_plugin_process_built_sources :=
105 webkittestrunner_built_sources :=
106 libwebcoreinternals_built_sources :=
107 minibrowser_built_sources :=
116 MAINTAINERCLEANFILES :=
119 if ENABLE_INTROSPECTION
122 girdir := $(datadir)/gir-1.0
123 typelibsdir := $(libdir)/girepository-1.0
126 # We do not care at all about this implicit built-in make rules,
127 # disable them to save some build time
142 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
143 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
144 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
145 -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
158 # Read the feature defines file, that's created by generate-feature-defines-files
159 # during configuration (SetupWebKitFeatures.m4).
160 feature_defines := $(shell cat WebKitFeatures.txt)
162 # -no-undefined required for building DLLs on Windows
163 # It breaks the build on other platforms, so we use it conditionally
165 no_undefined = -no-undefined
166 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
170 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
175 -DGCC_GENERATE_TEST_COVERAGE_FILES \
176 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
180 $(srcdir)/Source/autotools/symbols.filter \
181 $(srcdir)/Source/WebKit/LICENSE
183 # Include module makefiles
184 include Source/WTF/GNUmakefile.am
185 include Source/JavaScriptCore/GNUmakefile.am
186 include Source/Platform/GNUmakefile.am
187 include Source/WebCore/GNUmakefile.am
188 include Source/WebCore/bindings/gobject/GNUmakefile.am
189 include Source/WebCore/platform/gtk/po/GNUmakefile.am
190 include Source/WebKit/gtk/GNUmakefile.am
191 include Tools/GNUmakefile.am
193 include Source/WebKit2/GNUmakefile.am
194 include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
195 include Tools/MiniBrowser/gtk/GNUmakefile.am
196 include Tools/WebKitTestRunner/GNUmakefile.am
197 include Source/ThirdParty/ANGLE/GNUmakefile.am
198 include Source/ThirdParty/gtest/GNUmakefile.am
199 include Source/ThirdParty/leveldb/GNUmakefile.am
200 include Tools/TestWebKitAPI/GNUmakefile.am
201 # [GTK] Refactor the translations now that we have webkit2
202 # https://bugs.webkit.org/show_bug.cgi?id=55153
204 # Autogenerated sources
206 $(javascriptcore_built_sources) \
207 $(javascriptcore_built_nosources) \
208 $(webcore_built_sources) \
209 $(webcore_built_nosources) \
210 $(webcore_svg_built_sources) \
211 $(webkitgtk_built_sources) \
212 $(webkitgtk_built_nosources) \
213 $(webkit2_built_sources) \
214 $(webkit2gtk_built_sources) \
215 $(webkit2_plugin_process_built_sources)
219 $(builddir)/doltcompile \
220 $(builddir)/doltlibtool
222 MAINTAINERCLEANFILES += \
224 $(builddir)/doltcompile \
225 $(builddir)/doltlibtool \
226 $(srcdir)/aconfig.h.in \
227 $(srcdir)/Source/autotools/config.* \
228 $(srcdir)/Source/autotools/compile \
229 $(srcdir)/Source/autotools/depcomp \
230 $(srcdir)/Source/autotools/install-sh \
231 $(srcdir)/Source/autotools/missing \
232 $(srcdir)/configure \
233 $(srcdir)/GNUmakefile.in \
236 $(top_builddir)/config.*
238 # Older automake versions (1.7) place Plo files in a different place so we need
239 # to create the output directory manually.
241 $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
243 # remove built sources and program directories
245 -rm -rf $(GENPROGRAMS)
247 maintainer-clean-local: distclean-local
249 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
251 dist-hook: doc-dist-hook
252 doc-dist-hook: docs-build.stamp
253 cp $(WebKit)/NEWS $(distdir)
255 @mkdir -p $(distdir)/Documentation/webkitgtk/html
256 @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
257 @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
258 @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
261 @mkdir -p $(distdir)/Documentation/webkit2gtk/html
262 @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
263 @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
264 @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html