Add gtklauncher source to support vuplus platform.
[vuplus_webkit] / GNUmakefile.am
1 # Top-level Makefile rule for automake
2 #
3 # Variable conventions:
4 #
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
11 #                     _SOURCES primary
12 # _cleanfiles       = files that will be removed by the clean target
13 #
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
18 # below.
19
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.
24
25 srcdir = @srcdir@
26 VPATH = @srcdir@
27
28 DISTCHECK_CONFIGURE_FLAGS = \
29         --enable-introspection  \
30         --enable-gtk-doc
31
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
44
45 # Libraries and support components
46 bin_PROGRAMS :=
47 noinst_PROGRAMS :=
48 libexec_PROGRAMS :=
49 noinst_HEADERS :=
50 noinst_LTLIBRARIES :=
51 lib_LTLIBRARIES :=
52 IDL_BINDINGS :=
53 TEST_PROGS :=
54 POFILES :=
55 MOFILES :=
56 javascriptcore_h_api :=
57 javascriptcore_cppflags:=
58 javascriptcore_cflags :=
59 javascriptcore_sources :=
60 javascriptcore_built_sources :=
61 javascriptcore_built_nosources :=
62 webcore_cppflags :=
63 webcore_sources :=
64 webcore_libadd :=
65 webcore_built_sources :=
66 webcore_built_nosources :=
67 webcoregtk_sources :=
68 webcoregtk_cppflags :=
69 webkitgtk_built_h_api :=
70 webkitgtk_static_h_api :=
71 webkitgtk_h_api :=
72 webkitgtk_sources :=
73 webkitgtk_cppflags :=
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 :=
81 global_cppflags :=
82 global_cflags :=
83 global_cxxflags :=
84 JSCORE_GIRSOURCES :=
85 WEBKIT_GIRSOURCES :=
86 FEATURE_DEFINES :=
87 typelibsdir :=
88 typelibs_DATA :=
89 EXTRA_DIST :=
90 BUILT_SOURCES :=
91 CLEANFILES :=
92 DOMAIN :=
93 DISTCLEANFILES :=
94 MAINTAINERCLEANFILES :=
95 pkgconfig_DATA :=
96
97 # We do not care at all about this implicit built-in make rules,
98 # disable them to save some build time
99 %: %.c
100 %: %.cpp
101 %: %.o
102 (%): %
103 %.out: %
104 %.c: %.w %.ch
105 %.tex: %.w %.ch
106 %:: %,v
107 %:: RCS/%,v
108 %:: RCS/%
109 %:: s.%
110 %:: SCCS/s.%
111
112 global_cppflags += \
113         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
114         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
115         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
116         -Wno-unused-parameter -Wno-parentheses \
117         -fno-exceptions -DENABLE_GLIB_SUPPORT=1
118
119
120 global_cxxflags += \
121         -fno-rtti
122
123 # -no-undefined required for building DLLs on Windows
124 # It breaks the build on other platforms, so we use it conditionally
125 if OS_WIN32
126 no_undefined = -no-undefined
127 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
128 endif
129
130 if OS_GNU
131 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
132 endif
133
134 # Extra checks and flags
135 global_cppflags += \
136         -DBUILDING_CAIRO__=1 \
137         -DBUILDING_GTK__=1 \
138         -DWTF_CHANGES
139
140 # For the Gtk port we want to use XP_UNIX both in X11 and Mac
141 if !TARGET_WIN32
142 global_cppflags += \
143         -DXP_UNIX
144
145 if TARGET_X11
146 global_cppflags += \
147         -DMOZ_X11
148 endif
149 endif
150
151 if USE_ICU_UNICODE
152 global_cppflags += \
153         -DWTF_USE_ICU_UNICODE=1
154 endif
155
156 if USE_GLIB_UNICODE
157 global_cppflags += \
158         -DWTF_USE_GLIB_UNICODE=1
159 endif
160
161 if !ENABLE_FAST_MALLOC
162 global_cppflags += \
163         -DUSE_SYSTEM_MALLOC
164 endif
165
166 if USE_GSTREAMER
167 global_cppflags += \
168         -DWTF_USE_GSTREAMER=1
169 endif
170
171 # ----
172 # GTK+ 2.x/3.x support
173 # ----
174 if GTK_API_VERSION_2
175 global_cppflags += \
176         -DGTK_API_VERSION_2=1
177 endif
178
179 if !ENABLE_DEBUG
180 global_cppflags += -DNDEBUG
181 else
182 global_cppflags += \
183         -DG_DISABLE_DEPRECATED \
184         -DGDK_PIXBUF_DISABLE_DEPRECATED \
185         -DGDK_DISABLE_DEPRECATED \
186         -DGTK_DISABLE_DEPRECATED \
187         -DPANGO_DISABLE_DEPRECATED
188 # Might be useful in the future
189 #       -DGDK_MULTIHEAD_SAFE \
190 #       -DGTK_MULTIHEAD_SAFE
191 endif
192
193 if ENABLE_COVERAGE
194 global_cppflags += \
195         -DGCC_GENERATE_TEST_COVERAGE_FILES \
196         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
197 endif
198
199 EXTRA_DIST += \
200         $(srcdir)/Source/autotools/symbols.filter \
201         $(srcdir)/gtk-doc.make \
202         $(srcdir)/Source/WebKit/LICENSE
203
204 # Include module makefiles
205 include Source/JavaScriptCore/GNUmakefile.am
206 include Source/WebCore/GNUmakefile.am
207 include Source/WebKit/gtk/GNUmakefile.am
208 include Source/WebCore/bindings/gobject/GNUmakefile.am
209 include Tools/GNUmakefile.am
210 include Source/WebKit/gtk/po/GNUmakefile.am
211 include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
212
213 if ENABLE_WEBKIT2
214 include Source/WebKit2/GNUmakefile.am
215 include Tools/MiniBrowser/gtk/GNUmakefile.am
216 include Tools/WebKitTestRunner/GNUmakefile.am
217 # [GTK] Refactor the translations now that we have webkit2
218 # https://bugs.webkit.org/show_bug.cgi?id=55153
219 endif
220
221 # Autogenerated sources
222 BUILT_SOURCES += \
223         $(javascriptcore_built_sources) \
224         $(javascriptcore_built_nosources) \
225         $(webcore_built_sources) \
226         $(webcore_built_nosources) \
227         $(webkitgtk_built_sources) \
228         $(webkitgtk_built_nosources)
229
230 DISTCLEANFILES += \
231         $(CLEANFILES) \
232         $(builddir)/doltcompile \
233         $(builddir)/doltlibtool
234
235 MAINTAINERCLEANFILES += \
236         $(CLEANFILES) \
237         $(builddir)/doltcompile \
238         $(builddir)/doltlibtool \
239         $(srcdir)/aconfig.h.in \
240         $(srcdir)/Source/autotools/config.* \
241         $(srcdir)/Source/autotools/compile \
242         $(srcdir)/Source/autotools/depcomp \
243         $(srcdir)/Source/autotools/install-sh \
244         $(srcdir)/Source/autotools/missing \
245         $(srcdir)/configure \
246         $(srcdir)/GNUmakefile.in \
247         $(srcdir)/INSTALL \
248         $(srcdir)/README \
249         $(top_builddir)/config.*
250
251 # Older automake versions (1.7) place Plo files in a different place so we need
252 # to create the output directory manually.
253 all-local: stamp-po
254         $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
255
256 # remove built sources and program directories
257 clean-local:
258         -rm -rf $(GENPROGRAMS)
259
260 maintainer-clean-local: distclean-local
261 distclean-local:
262         -rm -rf $(GENSOURCES) $(GENPROGRAMS)