Initialize Tizen 2.3
[framework/web/webkit-efl.git] / 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         --enable-webkit2
32
33 # Directory for autogenerated sources
34 GENSOURCES := $(top_builddir)/DerivedSources
35 GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
36 GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
37 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
38 GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
39 GENSOURCES_WEBKITDOM := $(top_builddir)/DerivedSources/webkitdom
40 GENSOURCES_PLATFORM := $(top_builddir)/DerivedSources/Platform
41 GENPROGRAMS := $(top_builddir)/Programs
42 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
43 WebCore := $(srcdir)/Source/WebCore
44 WebKit := $(srcdir)/Source/WebKit/gtk
45 WebKit2 := $(srcdir)/Source/WebKit2
46 pkgconfigdir := $(libdir)/pkgconfig
47 libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
48
49 # Libraries and support components
50 bin_PROGRAMS :=
51 noinst_PROGRAMS :=
52 libexec_PROGRAMS :=
53 noinst_DATA :=
54 noinst_HEADERS :=
55 noinst_LTLIBRARIES :=
56 lib_LTLIBRARIES :=
57 IDL_BINDINGS :=
58 TEST_PROGS :=
59 POFILES :=
60 PO_LINGUAS :=
61 USER_LINGUAS :=
62 USE_LINGUAS :=
63 MOFILES :=
64 ALL_MOFILES :=
65 dom_binding_idls :=
66 wtf_sources :=
67 javascriptcore_h_api :=
68 javascriptcore_cppflags:=
69 javascriptcore_cflags :=
70 javascriptcore_sources :=
71 javascriptcore_built_sources :=
72 javascriptcore_built_nosources :=
73 llint_nosources :=
74 offlineasm_nosources :=
75 platform_webcore_cppflags :=
76 platform_cppflags :=
77 platform_built_sources :=
78 platform_sources :=
79 platformgtk_cppflags :=
80 platformgtk_sources :=
81 webcore_platform_sources :=
82 webcore_modules_sources :=
83 webcore_svg_built_sources :=
84 webcore_svg_sources :=
85 webcore_cppflags :=
86 webcore_sources :=
87 webcore_libadd :=
88 webcore_built_sources :=
89 webcore_built_nosources :=
90 webcoregtk_sources :=
91 webcoregtk_cppflags :=
92 webkitgtk_built_h_api :=
93 webkitgtk_static_h_api :=
94 webkitgtk_h_api :=
95 webkitgtk_sources :=
96 webkitgtk_cppflags :=
97 webkitgtk_gdom_built_h_api :=
98 webkitgtk_gdom_built_sources :=
99 webkitgtk_built_sources :=
100 webkitgtk_built_nosources :=
101 webkit2_h_api :=
102 webkit2_sources :=
103 webkit2_built_sources :=
104 webkit2platform_sources :=
105 webkit2gtk_h_api :=
106 webkit2gtk_built_sources :=
107 webkit2_web_extension_h_api :=
108 webkit2_plugin_process_sources :=
109 webkit2_plugin_process_built_sources :=
110 webkittestrunner_built_sources :=
111 libwebcoreinternals_built_sources :=
112 minibrowser_built_sources :=
113 global_cppflags :=
114 global_cflags :=
115 global_cxxflags :=
116 EXTRA_DIST :=
117 BUILT_SOURCES :=
118 CLEANFILES :=
119 DOMAIN :=
120 DISTCLEANFILES :=
121 MAINTAINERCLEANFILES :=
122 pkgconfig_DATA :=
123
124 if ENABLE_INTROSPECTION
125 gir_DATA :=
126 typelibs_DATA :=
127 girdir := $(datadir)/gir-1.0
128 typelibsdir := $(libdir)/girepository-1.0
129 endif
130
131 # We do not care at all about this implicit built-in make rules,
132 # disable them to save some build time
133 %: %.c
134 %: %.cpp
135 %: %.o
136 (%): %
137 %.out: %
138 %.c: %.w %.ch
139 %.tex: %.w %.ch
140 %:: %,v
141 %:: RCS/%,v
142 %:: RCS/%
143 %:: s.%
144 %:: SCCS/s.%
145
146 global_cppflags += \
147         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
148         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
149         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
150         -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
151         -DBUILDING_CAIRO__ \
152         -DBUILDING_GTK__
153
154 if ENABLE_WEBKIT2
155 global_cppflags += \
156         -DBUILDING_WEBKIT2__
157
158 endif
159
160 global_cxxflags += \
161         -fno-rtti
162
163 # Read the feature defines file, that's created by generate-feature-defines-files
164 # during configuration (SetupWebKitFeatures.m4).
165 feature_defines := $(shell cat WebKitFeatures.txt)
166
167 # -no-undefined required for building DLLs on Windows
168 # It breaks the build on other platforms, so we use it conditionally
169 if OS_WIN32
170 no_undefined = -no-undefined
171 version_script = -export-symbols-regex "^(webkit_|k?JS).*"
172 endif
173
174 if OS_GNU
175 version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
176 endif
177
178 if ENABLE_COVERAGE
179 global_cppflags += \
180         -DGCC_GENERATE_TEST_COVERAGE_FILES \
181         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
182 endif
183
184 # Default to outputting demangled symbols in case of reporting unresolved references or similar.
185 # Using AM_LDFLAGS would be more appropriate here, but these are not used at all when linking installable libraries
186 # like libwebkitgtk and libwebkit2gtk, so appending the linker flag to the LDFLAGS variable is done instead.
187 LDFLAGS += -Wl,--no-demangle
188
189 EXTRA_DIST += \
190         $(srcdir)/Source/autotools/symbols.filter \
191         $(srcdir)/Source/WebKit/LICENSE
192
193 # Include module makefiles
194 include Source/WTF/GNUmakefile.am
195 include Source/JavaScriptCore/GNUmakefile.am
196 include Source/Platform/GNUmakefile.am 
197 include Source/WebCore/GNUmakefile.am
198 include Source/WebCore/bindings/gobject/GNUmakefile.am
199 include Source/WebCore/platform/gtk/po/GNUmakefile.am
200 include Source/WebKit/gtk/GNUmakefile.am
201 include Tools/GNUmakefile.am
202
203 include Source/WebKit2/GNUmakefile.am
204 include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
205 include Tools/MiniBrowser/gtk/GNUmakefile.am
206 include Tools/WebKitTestRunner/GNUmakefile.am
207 include Source/ThirdParty/ANGLE/GNUmakefile.am
208 include Source/ThirdParty/gtest/GNUmakefile.am
209 include Source/ThirdParty/leveldb/GNUmakefile.am
210 include Tools/TestWebKitAPI/GNUmakefile.am
211 # [GTK] Refactor the translations now that we have webkit2
212 # https://bugs.webkit.org/show_bug.cgi?id=55153
213
214 # Autogenerated sources
215 BUILT_SOURCES += \
216         $(javascriptcore_built_sources) \
217         $(javascriptcore_built_nosources) \
218         $(platform_built_sources) \
219         $(webcore_built_sources) \
220         $(webcore_built_nosources) \
221         $(webcore_svg_built_sources) \
222         $(webkitgtk_built_sources) \
223         $(webkitgtk_built_nosources) \
224         $(webkit2_built_sources) \
225         $(webkit2gtk_built_sources) \
226         $(webkit2_plugin_process_built_sources)
227
228 DISTCLEANFILES += \
229         $(CLEANFILES) \
230         $(builddir)/doltcompile \
231         $(builddir)/doltlibtool \
232         $(builddir)/WebKitFeatures.h \
233         $(builddir)/WebKitFeatures.txt
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)
263
264 dist-hook: doc-dist-hook
265 doc-dist-hook: docs-build.stamp
266         cp $(WebKit)/NEWS $(distdir)
267 if ENABLE_WEBKIT1
268         @mkdir -p $(distdir)/Documentation/webkitgtk/html
269         @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
270         @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
271         @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
272 endif
273 if ENABLE_WEBKIT2
274         @mkdir -p $(distdir)/Documentation/webkit2gtk/html
275         @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
276         @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
277         @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html
278 endif