Disable animations/font-size-using-ems.html as it has been causing the following...
[WebKit-https.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
21 #
22 # global_cppflags   = CPPFLAGS that apply to JSC, WebCore, and to any
23 #                     specific port
24 # global_cflags     = CFLAGS that apply to JSC, WebCore, and to
25 #                     any specific port
26 # global_cxxflags   = CXXFLAGS that apply to JSC, WebCore, and to any
27 #                     specific port
28
29 srcdir = @srcdir@
30 VPATH = @srcdir@
31
32 # Directory for autogenerated sources
33 GENSOURCES := $(top_builddir)/DerivedSources
34 GENPROGRAMS := $(top_builddir)/Programs
35
36 # Script for creating hash tables
37 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
38
39 # Libraries and support components
40 bin_PROGRAMS :=
41
42 noinst_PROGRAMS :=
43
44 noinst_HEADERS :=
45
46 lib_LIBRARIES :=
47
48 IDL_BINDINGS :=
49
50 # Global flags to CPP
51 global_cppflags :=
52
53 global_cppflags += \
54         -DWTF_USE_ICU_UNICODE=1
55
56 # Default compiler flags
57 global_cflags := \
58         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
59         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
60         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
61         -Wno-unused-parameter -Wno-parentheses
62
63 global_cxxflags := \
64         $(SYMBOL_VISIBILITY_INLINES)
65
66 if !ENABLE_DEBUG
67 global_cflags += \
68         -fno-exceptions \
69         $(SYMBOL_VISIBILITY)
70
71 global_cxxflags += \
72         -fno-rtti
73 endif
74
75 # -no-undefined required for building DLLs on Windows
76 # It breaks the build on other platforms, so we use it conditionally
77 if OS_WIN32
78 no_undefined = -no-undefined
79 endif
80
81 if OS_GNU
82 version_script = Wl,--version-script,$(srcdir)/symbols.filter
83 endif
84
85 # Shared libraries
86 lib_LTLIBRARIES = \
87         libwebkit-1.0.la
88
89 # Convenience libraries
90 noinst_LTLIBRARIES = \
91         libJavaScriptCore.la \
92         libWebCore.la
93
94 #
95 # JavaScriptCore
96 javascriptcore_h_api :=
97 javascriptcore_cppflags:=
98 javascriptcore_sources :=
99 javascriptcore_built_sources :=
100 javascriptcore_built_nosources :=
101 javascriptcore_dist :=
102
103 javascriptcore_cppflags += \
104         -I$(srcdir)/JavaScriptCore \
105         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
106         -I$(srcdir)/JavaScriptCore/wtf \
107         -I$(srcdir)/JavaScriptCore/kjs \
108         -I$(top_builddir)/DerivedSources
109
110 # The variables above are already included below so no need to touch
111 # these variables unless you really have to
112 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
113         $(javascriptcore_built_nosources)
114
115 nodist_libJavaScriptCore_la_SOURCES = \
116         $(javascriptcore_built_sources)
117
118 libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
119 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
120
121 libJavaScriptCore_la_SOURCES = \
122         $(javascriptcore_sources)
123
124 libJavaScriptCore_la_LIBADD = \
125         $(UNICODE_LIBS) \
126         $(GLOBALDEPS_LIBS) \
127         -lpthread
128
129 libJavaScriptCore_la_CXXFLAGS = \
130         $(global_cxxflags) \
131         $(libJavaScriptCore_la_CFLAGS)
132
133 libJavaScriptCore_la_CFLAGS = \
134         -fstrict-aliasing \
135         -O3 \
136         $(global_cflags) \
137         $(GLOBALDEPS_CFLAGS) \
138         $(UNICODE_CFLAGS)
139
140 libJavaScriptCore_la_CPPFLAGS = \
141         $(global_cppflags) \
142         $(javascriptcore_cppflags)
143
144 #
145 # WebCore
146 webcore_cppflags :=
147 webcore_sources :=
148 webcore_libadd :=
149 webcore_built_sources :=
150 webcore_built_nosources :=
151 webcore_dist :=
152 webcoregtk_cppflags :=
153 webcoregtk_sources :=
154
155 nodist_EXTRA_libWebCore_la_SOURCES = \
156         $(webcore_built_nosources)
157
158 nodist_libWebCore_la_SOURCES = \
159         $(webcore_built_sources)
160
161 libWebCore_la_SOURCES = \
162         $(webcore_sources) \
163         $(webcoregtk_sources)
164
165 libWebCore_la_CXXFLAGS = \
166         $(global_cxxflags) \
167         $(libWebCore_la_CFLAGS)
168
169 libWebCore_la_CFLAGS = \
170         -fno-strict-aliasing \
171         -O2 \
172         $(global_cflags) \
173         $(GLOBALDEPS_CFLAGS) \
174         $(UNICODE_CFLAGS) \
175         $(LIBXML_CFLAGS) \
176         $(CAIRO_CFLAGS) \
177         $(PANGO_CFLAGS) \
178         $(GTK_CFLAGS) \
179         $(XT_CFLAGS) \
180         $(LIBCURL_CFLAGS) \
181         $(LIBSOUP_CFLAGS) \
182         $(FREETYPE_CFLAGS) \
183         $(SQLITE3_CFLAGS) \
184         $(GSTREAMER_CFLAGS) \
185         $(LIBXSLT_CFLAGS) \
186         $(COVERAGE_CFLAGS) \
187         $(HILDON_CFLAGS)
188
189 libWebCore_la_CPPFLAGS = \
190         $(global_cppflags) \
191         $(webcore_cppflags) \
192         $(javascriptcore_cppflags) \
193         $(webcoregtk_cppflags) \
194         $(HILDON_CPPFLAGS)
195
196 libWebCore_la_LIBADD = \
197         libJavaScriptCore.la \
198         libWebCoreJS.la \
199         $(webcore_libadd) \
200         $(GLOBALDEPS_LIBS) \
201         $(LIBXML_LIBS) \
202         $(CAIRO_LIBS) \
203         $(PANGO_LIBS) \
204         $(GTK_LIBS) \
205         $(XT_LIBS) \
206         $(LIBCURL_LIBS) \
207         $(LIBSOUP_LIBS) \
208         $(FREETYPE_LIBS) \
209         $(UNICODE_LIBS) \
210         $(SQLITE3_LIBS) \
211         $(GSTREAMER_LIBS) \
212         $(LIBXSLT_LIBS) \
213         $(HILDON_LIBS) \
214         $(JPEG_LIBS) \
215         -lpthread
216
217 # WebKit
218 webkitgtk_h_api :=
219 webkitgtk_sources :=
220 webkitgtk_cppflags :=
221 webkitgtk_built_sources :=
222 webkitgtk_built_nosources :=
223 webkitgtk_cleanfiles :=
224
225 nodist_libwebkit_1_0_la_SOURCES = \
226         $(webkitgtk_built_sources)
227
228 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
229 libwebkit_1_0_la_HEADERS = \
230         $(webkitgtk_h_api) \
231         WebKit/gtk/webkit/webkitenumtypes.h
232
233 libwebkit_1_0_la_SOURCES = \
234         $(webkitgtk_sources)
235
236 libwebkit_1_0_la_CXXFLAGS = \
237         $(libWebCore_la_CXXFLAGS)
238
239 libwebkit_1_0_la_CFLAGS = \
240         $(libWebCore_la_CFLAGS)
241
242 libwebkit_1_0_la_CPPFLAGS = \
243         $(libWebCore_la_CPPFLAGS) \
244         $(webkitgtk_cppflags)
245
246 libwebkit_1_0_la_LDFLAGS = \
247         $(COVERAGE_LDFLAGS) \
248         -version-info @LIBWEBKITGTK_VERSION@ \
249         $(version_script) \
250         $(no_undefined)
251
252 libwebkit_1_0_la_LIBADD = \
253         libWebCore.la
254
255 #
256 # Extra checks and flags
257 global_cppflags += \
258         -DBUILDING_CAIRO__=1 \
259         -DBUILDING_GTK__=1 \
260         -DWTF_CHANGES
261
262 if !ENABLE_FAST_MALLOC
263 global_cppflags += \
264         -DUSE_SYSTEM_MALLOC
265 endif
266
267 if TARGET_X11
268 global_cppflags += -DXP_UNIX
269 endif
270
271 if !ENABLE_DEBUG
272 global_cppflags += -DNDEBUG
273 else
274 webcoregtk_cppflags += \
275         -DG_DISABLE_DEPRECATED \
276         -DGDK_PIXBUF_DISABLE_DEPRECATED \
277         -DGDK_DISABLE_DEPRECATED \
278         -DGTK_DISABLE_DEPRECATED \
279         -DPANGO_DISABLE_DEPRECATED
280
281 # Might be useful in the future
282 #       -DGDK_MULTIHEAD_SAFE \
283 #       -DGTK_MULTIHEAD_SAFE
284 endif
285
286 if !ENABLE_DATABASE
287 global_cppflags += -DENABLE_DATABASE=0
288 endif
289
290 if !ENABLE_ICONDATABASE
291 global_cppflags += -DENABLE_ICONDATABASE=0
292 endif
293
294 if ENABLE_COVERAGE
295 global_cppflags += \
296         -DGCC_GENERATE_TEST_COVERAGE_FILES \
297         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
298 endif
299
300 if ENABLE_VIDEO
301 webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
302 endif
303
304 webkitgtk_h_api += \
305         WebKit/gtk/webkit/webkit.h \
306         WebKit/gtk/webkit/webkitdefines.h \
307         WebKit/gtk/webkit/webkitnetworkrequest.h \
308         WebKit/gtk/webkit/webkitversion.h \
309         WebKit/gtk/webkit/webkitwebbackforwardlist.h \
310         WebKit/gtk/webkit/webkitwebframe.h \
311         WebKit/gtk/webkit/webkitwebhistoryitem.h \
312         WebKit/gtk/webkit/webkitwebsettings.h \
313         WebKit/gtk/webkit/webkitwebview.h
314
315 webkitgtk_built_sources += \
316         DerivedSources/webkitenumtypes.cpp \
317         DerivedSources/webkitmarshal.cpp \
318         DerivedSources/webkitmarshal.h \
319         WebKit/gtk/webkit/webkitenumtypes.h
320
321 webkitgtk_sources += \
322         WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
323         WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
324         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
325         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
326         WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
327         WebKit/gtk/WebCoreSupport/DragClientGtk.h \
328         WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
329         WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
330         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
331         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
332         WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
333         WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
334         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
335         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
336         WebKit/gtk/webkit/webkitnetworkrequest.cpp \
337         WebKit/gtk/webkit/webkitprivate.cpp \
338         WebKit/gtk/webkit/webkitprivate.h \
339         WebKit/gtk/webkit/webkitversion.cpp \
340         WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
341         WebKit/gtk/webkit/webkitwebframe.cpp \
342         WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
343         WebKit/gtk/webkit/webkitwebsettings.cpp \
344         WebKit/gtk/webkit/webkitwebview.cpp
345
346 webkitgtk_cppflags += \
347         -DBUILDING_WEBKIT \
348         -I$(srcdir)/WebKit/gtk \
349         -I$(srcdir)/WebKit/gtk/WebCoreSupport \
350         -I$(srcdir)/WebKit/gtk/webkit \
351         -I$(top_builddir)/WebKit/gtk/webkit
352
353 webkitgtk_cleanfiles += \
354         $(top_builddir)/Programs/GtkLauncher \
355         $(top_builddir)/WebKit/gtk/webkit-1.0.pc
356
357 pkgconfigdir = $(libdir)/pkgconfig
358 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
359
360 stamp_files := \
361         stamp-webkitmarshal.cpp \
362         stamp-webkitmarshal.h \
363         stamp-webkitenumtypes.cpp \
364         stamp-webkitenumtypes.h
365
366 WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
367 WEBKIT_MARSHAL_LIST = $(WEBKIT_MARSHAL).list
368
369 $(WEBKIT_MARSHAL_LIST): $(webkitgtk_sources) GNUmakefile.am
370         ( cd $(top_srcdir) && \
371         sed -n -e 's/.*webkit_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
372         $(webkitgtk_sources) ) \
373         | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
374         if cmp -s $@.tmp $@; then \
375                 rm $@.tmp; \
376         else \
377                 mv $@.tmp $@; \
378         fi
379
380 $(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
381         @true
382
383 $(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
384         @true
385
386 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
387         echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
388         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
389         echo timestamp > $(@F)
390
391 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
392         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
393         echo timestamp > $(@F)
394
395 WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
396         @true
397 stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
398         (cd $(srcdir) \
399         && glib-mkenums \
400                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
401                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
402                         --fhead "#include <glib-object.h>\n\n" \
403                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
404                         --fhead "G_BEGIN_DECLS\n\n" \
405                         --ftail "G_END_DECLS\n\n" \
406                         --ftail "#endif\n" \
407                         --fprod "#include <@filename@>\n\n" \
408                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
409                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
410                 $(webkitgtk_h_api) | \
411                 sed 's,WebKit/gtk/,,' | \
412                 sed 's,web_kit,webkit,' | \
413                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
414                 ) > xgen-gth \
415         && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
416         && rm -f xgen-gth \
417         && echo timestamp > $(@F)
418
419 DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
420         (cd $(srcdir) \
421         && glib-mkenums \
422                         --fhead "#include <config.h>\n" \
423                         --fhead "#include <glib-object.h>\n" \
424                         --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
425                         --fhead "extern \"C\" {\n\n" \
426                         --fprod "\n/* enumerations from \"@filename@\" */" \
427                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
428                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
429                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
430                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
431                         --vtail "    static GType type = 0;\n\n" \
432                         --vtail "    if (!type)\n" \
433                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
434                         --vtail "    return type;\n}\n\n" \
435                         --ftail "}\n" \
436                 $(webkitgtk_h_api) | \
437                 sed 's,web_kit,webkit,' \
438                 ) > xgen-gtc \
439         && cp xgen-gtc $@ \
440         && rm -f xgen-gtc
441
442 # END WEBKIT GTK+
443 #
444 # Files that will be distributed
445 EXTRA_DIST = \
446         $(javascriptcore_dist) \
447         $(webcore_dist) \
448         symbols.filter
449
450 # Files that will be cleaned
451 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
452 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
453 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
454
455 # Include module makefiles
456 include JavaScriptCore/GNUmakefile.am
457 include WebCore/GNUmakefile.am
458 include WebKitTools/GNUmakefile.am
459
460 # Autogenerated sources
461 BUILT_SOURCES := \
462         $(javascriptcore_built_sources) \
463         $(javascriptcore_built_nosources) \
464         $(webcore_built_sources) \
465         $(webcore_built_nosources) \
466         $(webkitgtk_built_sources) \
467         $(webkitgtk_built_nosources)
468
469 # Project-wide clean rules
470 CLEANFILES += \
471         $(webkitgtk_cleanfiles)
472
473 MAINTAINERCLEANFILES += \
474         $(srcdir)/aconfig.h.in \
475         configure \
476         config.* \
477         GNUmakefile.in \
478         INSTALL \
479         README
480
481 # Older automake versions (1.7) place Plo files in a different place so we need
482 # to create the output directory manually.
483 all-local:
484         mkdir -p $(top_builddir)/$(DEPDIR)/DerivedSources
485
486 # remove built sources and program directories
487 clean-local:
488         -rm -rf $(GENSOURCES) $(GENPROGRAMS)