Git init
[profile/ivi/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
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 libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
45
46 # Libraries and support components
47 bin_PROGRAMS :=
48 noinst_PROGRAMS :=
49 libexec_PROGRAMS :=
50 noinst_HEADERS :=
51 noinst_LTLIBRARIES :=
52 lib_LTLIBRARIES :=
53 IDL_BINDINGS :=
54 TEST_PROGS :=
55 POFILES :=
56 MOFILES :=
57 javascriptcore_h_api :=
58 javascriptcore_cppflags:=
59 javascriptcore_cflags :=
60 javascriptcore_sources :=
61 javascriptcore_built_sources :=
62 javascriptcore_built_nosources :=
63 webcore_cppflags :=
64 webcore_sources :=
65 webcore_libadd :=
66 webcore_built_sources :=
67 webcore_built_nosources :=
68 webcoregtk_sources :=
69 webcoregtk_cppflags :=
70 webkitgtk_built_h_api :=
71 webkitgtk_static_h_api :=
72 webkitgtk_h_api :=
73 webkitgtk_sources :=
74 webkitgtk_cppflags :=
75 webkitgtk_gdom_built_sources :=
76 webkitgtk_built_sources :=
77 webkitgtk_built_nosources :=
78 webkit2_built_sources :=
79 webkit2_plugin_process_built_sources :=
80 webkittestrunner_built_sources :=
81 libwebcoreinternals_built_sources :=
82 global_cppflags :=
83 global_cflags :=
84 global_cxxflags :=
85 JSCORE_GIRSOURCES :=
86 WEBKIT_GIRSOURCES :=
87 FEATURE_DEFINES :=
88 typelibsdir :=
89 typelibs_DATA :=
90 EXTRA_DIST :=
91 BUILT_SOURCES :=
92 CLEANFILES :=
93 DOMAIN :=
94 DISTCLEANFILES :=
95 MAINTAINERCLEANFILES :=
96 pkgconfig_DATA :=
97
98 # We do not care at all about this implicit built-in make rules,
99 # disable them to save some build time
100 %: %.c
101 %: %.cpp
102 %: %.o
103 (%): %
104 %.out: %
105 %.c: %.w %.ch
106 %.tex: %.w %.ch
107 %:: %,v
108 %:: RCS/%,v
109 %:: RCS/%
110 %:: s.%
111 %:: SCCS/s.%
112
113 global_cppflags += \
114         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
115         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
116         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
117         -Wno-unused-parameter -Wno-parentheses \
118         -fno-exceptions -DENABLE_GLIB_SUPPORT=1
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 endif
145
146 if USE_ICU_UNICODE
147 global_cppflags += \
148         -DWTF_USE_ICU_UNICODE=1
149 endif
150
151 if USE_GLIB_UNICODE
152 global_cppflags += \
153         -DWTF_USE_GLIB_UNICODE=1
154 endif
155
156 if !ENABLE_FAST_MALLOC
157 global_cppflags += \
158         -DUSE_SYSTEM_MALLOC
159 endif
160
161 if USE_GSTREAMER
162 global_cppflags += \
163         -DWTF_USE_GSTREAMER=1
164 endif
165
166 # ----
167 # GTK+ 2.x/3.x support
168 # ----
169 if GTK_API_VERSION_2
170 global_cppflags += \
171         -DGTK_API_VERSION_2=1
172 endif
173
174 if !ENABLE_DEBUG
175 global_cppflags += -DNDEBUG
176 else
177 global_cppflags += \
178         -DG_DISABLE_DEPRECATED \
179         -DGDK_PIXBUF_DISABLE_DEPRECATED \
180         -DGDK_DISABLE_DEPRECATED \
181         -DGTK_DISABLE_DEPRECATED \
182         -DPANGO_DISABLE_DEPRECATED
183 # Might be useful in the future
184 #       -DGDK_MULTIHEAD_SAFE \
185 #       -DGTK_MULTIHEAD_SAFE
186 endif
187
188 if ENABLE_COVERAGE
189 global_cppflags += \
190         -DGCC_GENERATE_TEST_COVERAGE_FILES \
191         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
192 endif
193
194 EXTRA_DIST += \
195         $(srcdir)/Source/autotools/symbols.filter \
196         $(srcdir)/gtk-doc.make \
197         $(srcdir)/Source/WebKit/LICENSE
198
199 # Include module makefiles
200 if USE_JSC
201 include Source/JavaScriptCore/GNUmakefile.am
202 endif
203 include Source/WebCore/GNUmakefile.am
204 include Source/WebKit/gtk/GNUmakefile.am
205 include Source/WebCore/bindings/gobject/GNUmakefile.am
206 include Tools/GNUmakefile.am
207 include Source/WebKit/gtk/po/GNUmakefile.am
208 include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
209
210 if ENABLE_WEBKIT2
211 include Source/WebKit2/GNUmakefile.am
212 include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
213 include Tools/MiniBrowser/gtk/GNUmakefile.am
214 include Tools/WebKitTestRunner/GNUmakefile.am
215 # [GTK] Refactor the translations now that we have webkit2
216 # https://bugs.webkit.org/show_bug.cgi?id=55153
217 endif
218
219 # Autogenerated sources
220 BUILT_SOURCES += \
221         $(webcore_built_sources) \
222         $(webcore_built_nosources) \
223         $(webkitgtk_built_sources) \
224         $(webkitgtk_built_nosources)
225
226 if USE_JSC
227 BUILT_SOURCES += \
228         $(javascriptcore_built_sources) \
229         $(javascriptcore_built_nosources)
230 endif
231
232 DISTCLEANFILES += \
233         $(CLEANFILES) \
234         $(builddir)/doltcompile \
235         $(builddir)/doltlibtool
236
237 MAINTAINERCLEANFILES += \
238         $(CLEANFILES) \
239         $(builddir)/doltcompile \
240         $(builddir)/doltlibtool \
241         $(srcdir)/aconfig.h.in \
242         $(srcdir)/Source/autotools/config.* \
243         $(srcdir)/Source/autotools/compile \
244         $(srcdir)/Source/autotools/depcomp \
245         $(srcdir)/Source/autotools/install-sh \
246         $(srcdir)/Source/autotools/missing \
247         $(srcdir)/configure \
248         $(srcdir)/GNUmakefile.in \
249         $(srcdir)/INSTALL \
250         $(srcdir)/README \
251         $(top_builddir)/config.*
252
253 # Older automake versions (1.7) place Plo files in a different place so we need
254 # to create the output directory manually.
255 all-local: stamp-po
256         $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
257
258 # remove built sources and program directories
259 clean-local:
260         -rm -rf $(GENPROGRAMS)
261
262 maintainer-clean-local: distclean-local
263 distclean-local:
264         -rm -rf $(GENSOURCES) $(GENPROGRAMS)