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)/WebCore
41 WebKit := $(srcdir)/WebKit/gtk
42 WebKit2 := $(srcdir)/WebKit2
44 # Libraries and support components
54 javascriptcore_h_api :=
55 javascriptcore_cppflags:=
56 javascriptcore_sources :=
57 javascriptcore_built_sources :=
58 javascriptcore_built_nosources :=
62 webcore_built_sources :=
63 webcore_built_nosources :=
65 webcoregtk_cppflags :=
66 webkitgtk_built_h_api :=
67 webkitgtk_static_h_api :=
71 webkitgtk_gdom_built_sources :=
72 webkitgtk_built_sources :=
73 webkitgtk_built_nosources :=
74 webkit2_built_sources :=
87 MAINTAINERCLEANFILES :=
89 # We do not care at all about this implicit built-in make rules,
90 # disable them to save some build time
105 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
106 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
107 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
108 -Wno-unused-parameter -Wno-parentheses \
109 -fno-exceptions -DENABLE_GLIB_SUPPORT=1
115 # -no-undefined required for building DLLs on Windows
116 # It breaks the build on other platforms, so we use it conditionally
118 no_undefined = -no-undefined
119 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
123 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
126 # Convenience libraries
127 noinst_LTLIBRARIES += \
130 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
131 $(javascriptcore_built_nosources)
133 nodist_libJavaScriptCore_la_SOURCES = \
134 $(javascriptcore_built_sources)
136 libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
137 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
139 libJavaScriptCore_la_SOURCES = \
140 $(javascriptcore_sources)
142 libJavaScriptCore_la_LIBADD = \
147 libJavaScriptCore_la_CXXFLAGS = \
149 $(libJavaScriptCore_la_CFLAGS)
151 libJavaScriptCore_la_CFLAGS = \
158 libJavaScriptCore_la_CPPFLAGS = \
160 $(javascriptcore_cppflags)
162 # Extra checks and flags
164 -DBUILDING_CAIRO__=1 \
170 -DWTF_USE_ICU_UNICODE=1
175 -DWTF_USE_GLIB_UNICODE=1
178 if !ENABLE_FAST_MALLOC
185 -DWTF_USE_GSTREAMER=1
189 # GTK+ 2.x/3.x support
193 -DGTK_API_VERSION_2=1
197 global_cppflags += -DNDEBUG
200 -DG_DISABLE_DEPRECATED \
201 -DGDK_PIXBUF_DISABLE_DEPRECATED \
202 -DGDK_DISABLE_DEPRECATED \
203 -DGTK_DISABLE_DEPRECATED \
204 -DPANGO_DISABLE_DEPRECATED
205 # Might be useful in the future
206 # -DGDK_MULTIHEAD_SAFE \
207 # -DGTK_MULTIHEAD_SAFE
212 -DGCC_GENERATE_TEST_COVERAGE_FILES \
213 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
217 $(srcdir)/Source/autotools/symbols.filter \
218 $(srcdir)/gtk-doc.make \
219 $(srcdir)/WebKit/LICENSE
221 # Include module makefiles
222 include Source/JavaScriptCore/GNUmakefile.am
223 include WebCore/GNUmakefile.am
225 include WebKit2/GNUmakefile.am
227 include WebKit/gtk/GNUmakefile.am
228 include WebCore/bindings/gobject/GNUmakefile.am
229 include Tools/GNUmakefile.am
230 include WebKit/gtk/po/GNUmakefile.am
233 # Autogenerated sources
235 $(javascriptcore_built_sources) \
236 $(javascriptcore_built_nosources) \
237 $(webcore_built_sources) \
238 $(webcore_built_nosources) \
239 $(webkitgtk_built_sources) \
240 $(webkitgtk_built_nosources)
244 $(builddir)/doltcompile \
245 $(builddir)/doltlibtool
247 MAINTAINERCLEANFILES += \
249 $(builddir)/doltcompile \
250 $(builddir)/doltlibtool \
251 $(srcdir)/aconfig.h.in \
252 $(srcdir)/Source/autotools/config.* \
253 $(srcdir)/Source/autotools/compile \
254 $(srcdir)/Source/autotools/depcomp \
255 $(srcdir)/Source/autotools/install-sh \
256 $(srcdir)/Source/autotools/missing \
257 $(srcdir)/configure \
258 $(srcdir)/GNUmakefile.in \
261 $(top_builddir)/config.*
263 # Older automake versions (1.7) place Plo files in a different place so we need
264 # to create the output directory manually.
266 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
268 # remove built sources and program directories
270 -rm -rf $(GENPROGRAMS)
272 maintainer-clean-local: distclean-local
274 -rm -rf $(GENSOURCES) $(GENPROGRAMS)