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 :=
76 platformgtk_cppflags :=
77 platformgtk_sources :=
78 webcore_platform_sources :=
79 webcore_modules_sources :=
80 webcore_svg_built_sources :=
81 webcore_svg_sources :=
85 webcore_built_sources :=
86 webcore_built_nosources :=
88 webcoregtk_cppflags :=
89 webkitgtk_built_h_api :=
90 webkitgtk_static_h_api :=
94 webkitgtk_gdom_built_h_api :=
95 webkitgtk_gdom_built_sources :=
96 webkitgtk_built_sources :=
97 webkitgtk_built_nosources :=
100 webkit2_built_sources :=
101 webkit2platform_sources :=
103 webkit2gtk_built_sources :=
104 webkit2_web_extension_h_api :=
105 webkit2_plugin_process_sources :=
106 webkit2_plugin_process_built_sources :=
107 webkittestrunner_built_sources :=
108 libwebcoreinternals_built_sources :=
109 minibrowser_built_sources :=
118 MAINTAINERCLEANFILES :=
121 if ENABLE_INTROSPECTION
124 girdir := $(datadir)/gir-1.0
125 typelibsdir := $(libdir)/girepository-1.0
128 # We do not care at all about this implicit built-in make rules,
129 # disable them to save some build time
144 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
145 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
146 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
147 -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
160 # Read the feature defines file, that's created by generate-feature-defines-files
161 # during configuration (SetupWebKitFeatures.m4).
162 feature_defines := $(shell cat WebKitFeatures.txt)
164 # -no-undefined required for building DLLs on Windows
165 # It breaks the build on other platforms, so we use it conditionally
167 no_undefined = -no-undefined
168 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
172 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
177 -DGCC_GENERATE_TEST_COVERAGE_FILES \
178 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
181 # Default to outputting demangled symbols in case of reporting unresolved references or similar.
182 # Using AM_LDFLAGS would be more appropriate here, but these are not used at all when linking installable libraries
183 # like libwebkitgtk and libwebkit2gtk, so appending the linker flag to the LDFLAGS variable is done instead.
184 LDFLAGS += -Wl,--no-demangle
187 $(srcdir)/Source/autotools/symbols.filter \
188 $(srcdir)/Source/WebKit/LICENSE
190 # Include module makefiles
191 include Source/WTF/GNUmakefile.am
192 include Source/JavaScriptCore/GNUmakefile.am
193 include Source/Platform/GNUmakefile.am
194 include Source/WebCore/GNUmakefile.am
195 include Source/WebCore/bindings/gobject/GNUmakefile.am
196 include Source/WebCore/platform/gtk/po/GNUmakefile.am
197 include Source/WebKit/gtk/GNUmakefile.am
198 include Tools/GNUmakefile.am
200 include Source/WebKit2/GNUmakefile.am
201 include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
202 include Tools/MiniBrowser/gtk/GNUmakefile.am
203 include Tools/WebKitTestRunner/GNUmakefile.am
204 include Source/ThirdParty/ANGLE/GNUmakefile.am
205 include Source/ThirdParty/gtest/GNUmakefile.am
206 include Source/ThirdParty/leveldb/GNUmakefile.am
207 include Tools/TestWebKitAPI/GNUmakefile.am
208 # [GTK] Refactor the translations now that we have webkit2
209 # https://bugs.webkit.org/show_bug.cgi?id=55153
211 # Autogenerated sources
213 $(javascriptcore_built_sources) \
214 $(javascriptcore_built_nosources) \
215 $(webcore_built_sources) \
216 $(webcore_built_nosources) \
217 $(webcore_svg_built_sources) \
218 $(webkitgtk_built_sources) \
219 $(webkitgtk_built_nosources) \
220 $(webkit2_built_sources) \
221 $(webkit2gtk_built_sources) \
222 $(webkit2_plugin_process_built_sources)
226 $(builddir)/doltcompile \
227 $(builddir)/doltlibtool
229 MAINTAINERCLEANFILES += \
231 $(builddir)/doltcompile \
232 $(builddir)/doltlibtool \
233 $(srcdir)/aconfig.h.in \
234 $(srcdir)/Source/autotools/config.* \
235 $(srcdir)/Source/autotools/compile \
236 $(srcdir)/Source/autotools/depcomp \
237 $(srcdir)/Source/autotools/install-sh \
238 $(srcdir)/Source/autotools/missing \
239 $(srcdir)/configure \
240 $(srcdir)/GNUmakefile.in \
243 $(top_builddir)/config.*
245 # Older automake versions (1.7) place Plo files in a different place so we need
246 # to create the output directory manually.
248 $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
250 # remove built sources and program directories
252 -rm -rf $(GENPROGRAMS)
254 maintainer-clean-local: distclean-local
256 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
258 dist-hook: doc-dist-hook
259 doc-dist-hook: docs-build.stamp
260 cp $(WebKit)/NEWS $(distdir)
262 @mkdir -p $(distdir)/Documentation/webkitgtk/html
263 @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
264 @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
265 @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
268 @mkdir -p $(distdir)/Documentation/webkit2gtk/html
269 @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
270 @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
271 @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html