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 GENSOURCES_PLATFORM := $(top_builddir)/DerivedSources/Platform
41 GENPROGRAMS := $(top_builddir)/Programs
42 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
43 WebCore := $(srcdir)/Source/WebCore
44 WebKit := $(srcdir)/Source/WebKit/gtk
45 WebKit2 := $(srcdir)/Source/WebKit2
46 pkgconfigdir := $(libdir)/pkgconfig
47 libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
49 # Libraries and support components
67 javascriptcore_h_api :=
68 javascriptcore_cppflags:=
69 javascriptcore_cflags :=
70 javascriptcore_sources :=
71 javascriptcore_built_sources :=
72 javascriptcore_built_nosources :=
74 offlineasm_nosources :=
75 platform_webcore_cppflags :=
77 platform_built_sources :=
79 platformgtk_cppflags :=
80 platformgtk_sources :=
81 webcore_platform_sources :=
82 webcore_modules_sources :=
83 webcore_svg_built_sources :=
84 webcore_svg_sources :=
88 webcore_built_sources :=
89 webcore_built_nosources :=
91 webcoregtk_cppflags :=
92 webkitgtk_built_h_api :=
93 webkitgtk_static_h_api :=
97 webkitgtk_gdom_built_h_api :=
98 webkitgtk_gdom_built_sources :=
99 webkitgtk_built_sources :=
100 webkitgtk_built_nosources :=
103 webkit2_built_sources :=
104 webkit2platform_sources :=
106 webkit2gtk_built_sources :=
107 webkit2_web_extension_h_api :=
108 webkit2_plugin_process_sources :=
109 webkit2_plugin_process_built_sources :=
110 webkittestrunner_built_sources :=
111 libwebcoreinternals_built_sources :=
112 minibrowser_built_sources :=
121 MAINTAINERCLEANFILES :=
124 if ENABLE_INTROSPECTION
127 girdir := $(datadir)/gir-1.0
128 typelibsdir := $(libdir)/girepository-1.0
131 # We do not care at all about this implicit built-in make rules,
132 # disable them to save some build time
147 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
148 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
149 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
150 -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
163 # Read the feature defines file, that's created by generate-feature-defines-files
164 # during configuration (SetupWebKitFeatures.m4).
165 feature_defines := $(shell cat WebKitFeatures.txt)
167 # -no-undefined required for building DLLs on Windows
168 # It breaks the build on other platforms, so we use it conditionally
170 no_undefined = -no-undefined
171 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
175 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
180 -DGCC_GENERATE_TEST_COVERAGE_FILES \
181 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
184 # Default to outputting demangled symbols in case of reporting unresolved references or similar.
185 # Using AM_LDFLAGS would be more appropriate here, but these are not used at all when linking installable libraries
186 # like libwebkitgtk and libwebkit2gtk, so appending the linker flag to the LDFLAGS variable is done instead.
187 LDFLAGS += -Wl,--no-demangle
190 $(srcdir)/Source/autotools/symbols.filter \
191 $(srcdir)/Source/WebKit/LICENSE
193 # Include module makefiles
194 include Source/WTF/GNUmakefile.am
195 include Source/JavaScriptCore/GNUmakefile.am
196 include Source/Platform/GNUmakefile.am
197 include Source/WebCore/GNUmakefile.am
198 include Source/WebCore/bindings/gobject/GNUmakefile.am
199 include Source/WebCore/platform/gtk/po/GNUmakefile.am
200 include Source/WebKit/gtk/GNUmakefile.am
201 include Tools/GNUmakefile.am
203 include Source/WebKit2/GNUmakefile.am
204 include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
205 include Tools/MiniBrowser/gtk/GNUmakefile.am
206 include Tools/WebKitTestRunner/GNUmakefile.am
207 include Source/ThirdParty/ANGLE/GNUmakefile.am
208 include Source/ThirdParty/gtest/GNUmakefile.am
209 include Source/ThirdParty/leveldb/GNUmakefile.am
210 include Tools/TestWebKitAPI/GNUmakefile.am
211 # [GTK] Refactor the translations now that we have webkit2
212 # https://bugs.webkit.org/show_bug.cgi?id=55153
214 # Autogenerated sources
216 $(javascriptcore_built_sources) \
217 $(javascriptcore_built_nosources) \
218 $(platform_built_sources) \
219 $(webcore_built_sources) \
220 $(webcore_built_nosources) \
221 $(webcore_svg_built_sources) \
222 $(webkitgtk_built_sources) \
223 $(webkitgtk_built_nosources) \
224 $(webkit2_built_sources) \
225 $(webkit2gtk_built_sources) \
226 $(webkit2_plugin_process_built_sources)
230 $(builddir)/doltcompile \
231 $(builddir)/doltlibtool \
232 $(builddir)/WebKitFeatures.h \
233 $(builddir)/WebKitFeatures.txt
235 MAINTAINERCLEANFILES += \
237 $(builddir)/doltcompile \
238 $(builddir)/doltlibtool \
239 $(srcdir)/aconfig.h.in \
240 $(srcdir)/Source/autotools/config.* \
241 $(srcdir)/Source/autotools/compile \
242 $(srcdir)/Source/autotools/depcomp \
243 $(srcdir)/Source/autotools/install-sh \
244 $(srcdir)/Source/autotools/missing \
245 $(srcdir)/configure \
246 $(srcdir)/GNUmakefile.in \
249 $(top_builddir)/config.*
251 # Older automake versions (1.7) place Plo files in a different place so we need
252 # to create the output directory manually.
254 $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
256 # remove built sources and program directories
258 -rm -rf $(GENPROGRAMS)
260 maintainer-clean-local: distclean-local
262 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
264 dist-hook: doc-dist-hook
265 doc-dist-hook: docs-build.stamp
266 cp $(WebKit)/NEWS $(distdir)
268 @mkdir -p $(distdir)/Documentation/webkitgtk/html
269 @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
270 @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
271 @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
274 @mkdir -p $(distdir)/Documentation/webkit2gtk/html
275 @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
276 @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
277 @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html