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 :=
90 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
91 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
92 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
93 -Wno-unused-parameter -Wno-parentheses \
94 -fno-exceptions -DENABLE_GLIB_SUPPORT=1
100 # -no-undefined required for building DLLs on Windows
101 # It breaks the build on other platforms, so we use it conditionally
103 no_undefined = -no-undefined
104 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
108 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
111 # Convenience libraries
112 noinst_LTLIBRARIES += \
115 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
116 $(javascriptcore_built_nosources)
118 nodist_libJavaScriptCore_la_SOURCES = \
119 $(javascriptcore_built_sources)
121 libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
122 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
124 libJavaScriptCore_la_SOURCES = \
125 $(javascriptcore_sources)
127 libJavaScriptCore_la_LIBADD = \
132 libJavaScriptCore_la_CXXFLAGS = \
134 $(libJavaScriptCore_la_CFLAGS)
136 libJavaScriptCore_la_CFLAGS = \
143 libJavaScriptCore_la_CPPFLAGS = \
145 $(javascriptcore_cppflags)
147 # Extra checks and flags
149 -DBUILDING_CAIRO__=1 \
155 -DWTF_USE_ICU_UNICODE=1
160 -DWTF_USE_GLIB_UNICODE=1
163 if !ENABLE_FAST_MALLOC
170 -DWTF_USE_GSTREAMER=1
174 # GTK+ 2.x/3.x support
178 -DGTK_API_VERSION_2=1
182 global_cppflags += -DNDEBUG
185 -DG_DISABLE_DEPRECATED \
186 -DGDK_PIXBUF_DISABLE_DEPRECATED \
187 -DGDK_DISABLE_DEPRECATED \
188 -DGTK_DISABLE_DEPRECATED \
189 -DPANGO_DISABLE_DEPRECATED
190 # Might be useful in the future
191 # -DGDK_MULTIHEAD_SAFE \
192 # -DGTK_MULTIHEAD_SAFE
197 -DGCC_GENERATE_TEST_COVERAGE_FILES \
198 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
202 $(srcdir)/Source/autotools/symbols.filter \
203 $(srcdir)/gtk-doc.make \
204 $(srcdir)/WebKit/LICENSE
206 # Include module makefiles
207 include JavaScriptCore/GNUmakefile.am
208 include WebCore/GNUmakefile.am
210 include WebKit2/GNUmakefile.am
212 include WebKit/gtk/GNUmakefile.am
213 include WebCore/bindings/gobject/GNUmakefile.am
214 include Tools/GNUmakefile.am
215 include WebKit/gtk/po/GNUmakefile.am
218 # Autogenerated sources
220 $(javascriptcore_built_sources) \
221 $(javascriptcore_built_nosources) \
222 $(webcore_built_sources) \
223 $(webcore_built_nosources) \
224 $(webkitgtk_built_sources) \
225 $(webkitgtk_built_nosources)
229 $(builddir)/doltcompile \
230 $(builddir)/doltlibtool
232 MAINTAINERCLEANFILES += \
234 $(builddir)/doltcompile \
235 $(builddir)/doltlibtool \
236 $(srcdir)/aconfig.h.in \
237 $(srcdir)/Source/autotools/config.* \
238 $(srcdir)/Source/autotools/compile \
239 $(srcdir)/Source/autotools/depcomp \
240 $(srcdir)/Source/autotools/install-sh \
241 $(srcdir)/Source/autotools/missing \
242 $(srcdir)/configure \
243 $(srcdir)/GNUmakefile.in \
246 $(top_builddir)/config.*
248 # Older automake versions (1.7) place Plo files in a different place so we need
249 # to create the output directory manually.
251 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
253 # remove built sources and program directories
255 -rm -rf $(GENPROGRAMS)
257 maintainer-clean-local: distclean-local
259 -rm -rf $(GENSOURCES) $(GENPROGRAMS)