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 \
32 # Directory for autogenerated sources
33 GENSOURCES := $(top_builddir)/DerivedSources
34 GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
35 GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
36 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
37 GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
38 GENPROGRAMS := $(top_builddir)/Programs
39 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
40 WebCore := $(srcdir)/Source/WebCore
41 WebKit := $(srcdir)/Source/WebKit/gtk
42 WebKit2 := $(srcdir)/Source/WebKit2
43 pkgconfigdir := $(libdir)/pkgconfig
45 # Libraries and support components
56 javascriptcore_h_api :=
57 javascriptcore_cppflags:=
58 javascriptcore_cflags :=
59 javascriptcore_sources :=
60 javascriptcore_built_sources :=
61 javascriptcore_built_nosources :=
65 webcore_built_sources :=
66 webcore_built_nosources :=
68 webcoregtk_cppflags :=
69 webkitgtk_built_h_api :=
70 webkitgtk_static_h_api :=
74 webkitgtk_gdom_built_sources :=
75 webkitgtk_built_sources :=
76 webkitgtk_built_nosources :=
77 webkit2_built_sources :=
78 webkit2_plugin_process_built_sources :=
79 webkittestrunner_built_sources :=
80 libwebcoreinternals_built_sources :=
93 MAINTAINERCLEANFILES :=
96 # We do not care at all about this implicit built-in make rules,
97 # disable them to save some build time
112 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
113 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
114 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
115 -Wno-unused-parameter -Wno-parentheses \
116 -fno-exceptions -DENABLE_GLIB_SUPPORT=1
122 # -no-undefined required for building DLLs on Windows
123 # It breaks the build on other platforms, so we use it conditionally
125 no_undefined = -no-undefined
126 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
130 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
133 # Extra checks and flags
135 -DBUILDING_CAIRO__=1 \
139 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
147 -DWTF_USE_ICU_UNICODE=1
152 -DWTF_USE_GLIB_UNICODE=1
155 if !ENABLE_FAST_MALLOC
162 -DWTF_USE_GSTREAMER=1
166 # GTK+ 2.x/3.x support
170 -DGTK_API_VERSION_2=1
174 global_cppflags += -DNDEBUG
177 -DG_DISABLE_DEPRECATED \
178 -DGDK_PIXBUF_DISABLE_DEPRECATED \
179 -DGDK_DISABLE_DEPRECATED \
180 -DGTK_DISABLE_DEPRECATED \
181 -DPANGO_DISABLE_DEPRECATED
182 # Might be useful in the future
183 # -DGDK_MULTIHEAD_SAFE \
184 # -DGTK_MULTIHEAD_SAFE
189 -DGCC_GENERATE_TEST_COVERAGE_FILES \
190 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
194 $(srcdir)/Source/autotools/symbols.filter \
195 $(srcdir)/gtk-doc.make \
196 $(srcdir)/Source/WebKit/LICENSE
198 # Include module makefiles
199 include Source/JavaScriptCore/GNUmakefile.am
200 include Source/WebCore/GNUmakefile.am
201 include Source/WebKit/gtk/GNUmakefile.am
202 include Source/WebCore/bindings/gobject/GNUmakefile.am
203 include Tools/GNUmakefile.am
204 include Source/WebKit/gtk/po/GNUmakefile.am
205 include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
208 include Source/WebKit2/GNUmakefile.am
209 include Tools/MiniBrowser/gtk/GNUmakefile.am
210 include Tools/WebKitTestRunner/GNUmakefile.am
211 # [GTK] Refactor the translations now that we have webkit2
212 # https://bugs.webkit.org/show_bug.cgi?id=55153
215 # Autogenerated sources
217 $(javascriptcore_built_sources) \
218 $(javascriptcore_built_nosources) \
219 $(webcore_built_sources) \
220 $(webcore_built_nosources) \
221 $(webkitgtk_built_sources) \
222 $(webkitgtk_built_nosources)
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)