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 GENPROGRAMS := $(top_builddir)/Programs
38 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
39 WebCore := $(srcdir)/WebCore
40 WebKit := $(srcdir)/WebKit/gtk
42 # Libraries and support components
52 javascriptcore_h_api :=
53 javascriptcore_cppflags:=
54 javascriptcore_sources :=
55 javascriptcore_built_sources :=
56 javascriptcore_built_nosources :=
60 webcore_built_sources :=
61 webcore_built_nosources :=
63 webcoregtk_cppflags :=
64 webkitgtk_built_h_api :=
65 webkitgtk_static_h_api :=
69 webkitgtk_gdom_built_sources :=
70 webkitgtk_built_sources :=
71 webkitgtk_built_nosources :=
84 MAINTAINERCLEANFILES :=
87 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
88 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
89 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
90 -Wno-unused-parameter -Wno-parentheses \
91 -fno-exceptions -DENABLE_GLIB_SUPPORT=1
95 $(SYMBOL_VISIBILITY_INLINES) \
98 # -no-undefined required for building DLLs on Windows
99 # It breaks the build on other platforms, so we use it conditionally
101 no_undefined = -no-undefined
102 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
106 version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
109 # Convenience libraries
110 noinst_LTLIBRARIES += \
113 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
114 $(javascriptcore_built_nosources)
116 nodist_libJavaScriptCore_la_SOURCES = \
117 $(javascriptcore_built_sources)
119 libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
120 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
122 libJavaScriptCore_la_SOURCES = \
123 $(javascriptcore_sources)
125 libJavaScriptCore_la_LIBADD = \
130 libJavaScriptCore_la_CXXFLAGS = \
132 $(libJavaScriptCore_la_CFLAGS)
134 libJavaScriptCore_la_CFLAGS = \
141 libJavaScriptCore_la_CPPFLAGS = \
143 $(javascriptcore_cppflags)
145 # Extra checks and flags
147 -DBUILDING_CAIRO__=1 \
153 -DWTF_USE_ICU_UNICODE=1
158 -DWTF_USE_GLIB_UNICODE=1
161 if !ENABLE_FAST_MALLOC
168 -DWTF_USE_GSTREAMER=1
172 # GTK+ 2.x/3.x support
176 -DGTK_API_VERSION_2=1
180 global_cppflags += -DNDEBUG
181 global_cflags += $(SYMBOL_VISIBILITY)
184 -DG_DISABLE_DEPRECATED \
185 -DGDK_PIXBUF_DISABLE_DEPRECATED \
186 -DGDK_DISABLE_DEPRECATED \
187 -DGTK_DISABLE_DEPRECATED \
188 -DPANGO_DISABLE_DEPRECATED
189 # Might be useful in the future
190 # -DGDK_MULTIHEAD_SAFE \
191 # -DGTK_MULTIHEAD_SAFE
196 -DGCC_GENERATE_TEST_COVERAGE_FILES \
197 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
201 $(srcdir)/autotools/symbols.filter \
202 $(srcdir)/gtk-doc.make \
203 $(srcdir)/WebKit/LICENSE
205 # Include module makefiles
206 include JavaScriptCore/GNUmakefile.am
207 include WebCore/GNUmakefile.am
208 include WebKit/gtk/GNUmakefile.am
209 include WebCore/bindings/gobject/GNUmakefile.am
210 include WebKitTools/GNUmakefile.am
211 include WebKit/gtk/po/GNUmakefile.am
213 # Autogenerated sources
215 $(javascriptcore_built_sources) \
216 $(javascriptcore_built_nosources) \
217 $(webcore_built_sources) \
218 $(webcore_built_nosources) \
219 $(webkitgtk_built_sources) \
220 $(webkitgtk_built_nosources)
224 $(builddir)/doltcompile \
225 $(builddir)/doltlibtool
227 MAINTAINERCLEANFILES += \
229 $(builddir)/doltcompile \
230 $(builddir)/doltlibtool \
231 $(srcdir)/aconfig.h.in \
232 $(srcdir)/autotools/config.* \
233 $(srcdir)/autotools/compile \
234 $(srcdir)/autotools/depcomp \
235 $(srcdir)/autotools/install-sh \
236 $(srcdir)/autotools/missing \
237 $(srcdir)/configure \
238 $(srcdir)/GNUmakefile.in \
241 $(top_builddir)/config.*
243 # Older automake versions (1.7) place Plo files in a different place so we need
244 # to create the output directory manually.
246 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
248 # remove built sources and program directories
250 -rm -rf $(GENPROGRAMS)
252 maintainer-clean-local: distclean-local
254 -rm -rf $(GENSOURCES) $(GENPROGRAMS)