* platform/win/Skipped: Added another failure.
[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 # _headers          = header files that will be part of the distribution
9 # _built_sources    = files that will be autogenerated by the build system and
10 #                     will be part of the _SOURCES primary
11 # _built_nosources  = files that are autogenerated but are not part of the
12 #                     _SOURCES primary
13 # _cleanfiles       = files that will be removed by the clean target
14 #
15 # Sources, headers, flags, etc... should be added to the respective variables
16 # with the above suffix, e.g, webcore-specific sources should go to
17 # webcore_sources, gtk port-specific flags should go to webkitgtk_cppflags,
18 # etc... The only exceptions are the global variables. See Global Variables 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 and CXXFLAGS that apply to JSC, WebCore, and to
25 #                     any specific port
26
27 srcdir = @srcdir@
28 VPATH = @srcdir@
29
30 # Directory for autogenerated sources
31 GENSOURCES := $(top_builddir)/DerivedSources
32
33 # Script for creating hash tables
34 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
35
36 # Libraries and support components
37 noinst_HEADERS :=
38
39 noinst_PROGRAMS :=
40
41 lib_LIBRARIES :=
42
43 IDL_BINDINGS :=
44
45 # Files that will be distributed
46 EXTRA_DIST :=
47
48 #
49 # Global flags to CPP
50 global_cppflags := 
51
52 global_cppflags += \
53         -I $(srcdir)/JavaScriptCore \
54         -I $(srcdir)/JavaScriptCore/ForwardingHeaders \
55         -I $(srcdir)/JavaScriptCore/wtf \
56         -I $(srcdir)/JavaScriptCore/kjs \
57         -I $(top_builddir)/DerivedSources
58
59 # Default compiler flags
60 global_cflags := \
61         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
62         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
63         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
64         -Wno-unused-parameter $(SYMBOL_VISIBILITY_INLINES)
65
66 if !ENABLE_DEBUG
67 global_cflags += \
68         -fno-rtti -fno-exceptions \
69         $(SYMBOL_VISIBILITY)
70 endif
71
72 # Shared libraries
73 lib_LTLIBRARIES = \
74         libWebKitGtk.la
75
76 # Convenience libraries
77 noinst_LTLIBRARIES = \
78         libJavaScriptCore.la
79
80 #
81 # JavaScriptCore
82 javascriptcore_h_api :=
83 javascriptcore_cppflags:=
84 javascriptcore_sources :=
85 javascriptcore_built_sources := 
86 javascriptcore_built_nosources :=
87
88 # The variables above are already included below so no need to touch
89 # these variables unless you really have to
90 libJavaScriptCore_ladir = $(prefix)/include/WebKit/JavaScriptCore
91 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
92
93 libJavaScriptCore_la_SOURCES = \
94         $(javascriptcore_built_sources) \
95         $(javascriptcore_sources)
96
97 libJavaScriptCore_la_LDFLAGS = -lpthread
98
99 libJavaScriptCore_la_CXXFLAGS = $(global_cflags) -fstrict-aliasing
100
101 libJavaScriptCore_la_CFLAGS = $(global_cflags) -fstrict-aliasing
102
103 libJavaScriptCore_la_CPPFLAGS = $(global_cppflags) $(javascriptcore_cppflags)
104
105 #
106 # WebCore
107 webcore_cppflags :=
108 webcore_sources :=
109 webcore_headers :=
110 webcore_built_sources :=
111 webcore_built_nosources :=
112
113 # WebKitGtk
114 webkitgtk_h_api :=
115 webkitgtk_headers :=
116 webkitgtk_sources :=
117 webkitgtk_cppflags :=
118 webkitgtk_ldflags :=
119 webkitgtk_built_sources :=
120 webkitgtk_built_nosources :=
121 webkitgtk_cleanfiles :=
122
123 # No need to touch the following variables unless you have to. If you need to change the values
124 # for the following variables, use the "webkitgtk_" variables above
125 libWebKitGtk_ladir := $(prefix)/include/WebKit
126
127 libWebKitGtk_la_HEADERS = $(webkitgtk_h_api)
128
129 libWebKitGtk_la_SOURCES = \
130         $(webcore_built_sources) \
131         $(webcore_headers) \
132         $(webcore_sources) \
133         $(webkitgtk_built_sources) \
134         $(webkitgtk_headers) \
135         $(webkitgtk_sources)
136
137 libWebKitGtk_la_CXXFLAGS = \
138         -fno-strict-aliasing \
139         $(global_cflags) \
140         $(DEPENDENCIES_CFLAGS) \
141         $(LIBCURL_CFLAGS) \
142         $(SQLITE3_CFLAGS) \
143         $(GSTREAMER_CFLAGS) \
144         $(LIBXSLT_CFLAGS) \
145         $(COVERAGE_CFLAGS)
146
147 libWebKitGtk_la_CFLAGS = \
148         -fno-strict-aliasing \
149         $(global_cflags) \
150         $(DEPENDENCIES_CFLAGS) \
151         $(LIBCURL_CFLAGS) \
152         $(SQLITE3_CFLAGS) \
153         $(GSTREAMER_CFLAGS) \
154         $(LIBXSLT_CFLAGS) \
155         $(COVERAGE_CFLAGS)
156
157 libWebKitGtk_la_CPPFLAGS = \
158         $(global_cppflags) \
159         $(webcore_cppflags) \
160         $(webkitgtk_cppflags)
161
162 libWebKitGtk_la_LIBADD = libJavaScriptCore.la
163
164 libWebKitGtk_la_LDFLAGS = \
165         $(webkitgtk_ldflags) \
166         $(DEPENDENCIES_LIBS) \
167         $(LIBCURL_LIBS) \
168         $(ICU_LIBS) \
169         $(SQLITE3_LIBS) \
170         $(GSTREAMER_LIBS) \
171         $(LIBXSLT_LIBS) \
172         $(COVERAGE_LDFLAGS) \
173         -lpthread \
174         -ljpeg \
175         -version-info @LIBWEBKITGTK_VERSION@
176
177 #
178 # Extra checks and flags
179 global_cppflags += \
180         -DBUILDING_GTK__=1 \
181         -DWTF_CHANGES
182
183 if !ENABLE_FAST_MALLOC
184 global_cppflags += \
185         -DUSE_SYSTEM_MALLOC
186 endif
187
188 if TARGET_X11
189 global_cppflags += -DXP_UNIX
190 endif
191
192 if !ENABLE_DEBUG
193 global_cppflags += -DNDEBUG
194 else 
195 webkitgtk_cppflags += \
196         -DG_DISABLE_DEPRECATED \
197         -DGDK_PIXBUF_DISABLE_DEPRECATED \
198         -DGDK_DISABLE_DEPRECATED \
199         -DGTK_DISABLE_DEPRECATED \
200         -DPANGO_DISABLE_DEPRECATED
201
202 # Might be useful in the future
203 #       -DGDK_MULTIHEAD_SAFE \
204 #       -DGTK_MULTIHEAD_SAFE
205 endif
206
207 if !ENABLE_DATABASE
208 global_cppflags += -DENABLE_DATABASE=0
209 endif
210
211 if !ENABLE_ICONDATABASE
212 global_cppflags += -DENABLE_ICONDATABASE=0
213 endif
214
215 if ENABLE_COVERAGE
216 global_cppflags += \
217         -DGCC_GENERATE_TEST_COVERAGE_FILES \
218         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
219 endif
220
221 if ENABLE_VIDEO
222 webkitgtk_ldflags += -lgstinterfaces-0.10 -lgstvideo-0.10
223 endif
224
225 #
226 # WEBKIT GTK+
227 webkitgtk_cppflags += \
228 -I $(top_builddir)/WebKit/gtk/WebView \
229 -DBUILDING_CAIRO__=1 \
230 -DBUILD_WEBKIT
231
232 webkitgtk_h_api += \
233         WebKit/gtk/WebView/webkit.h \
234         WebKit/gtk/WebView/webkitdefines.h \
235         WebKit/gtk/WebView/webkitnetworkrequest.h \
236         WebKit/gtk/WebView/webkitwebframe.h \
237         WebKit/gtk/WebView/webkitwebview.h 
238
239 webkitgtk_built_sources += \
240         WebKit/gtk/WebView/webkit-marshal.h \
241         WebKit/gtk/WebView/webkit-marshal.cpp
242
243 webkitgtk_headers += \
244         WebKit/gtk/WebView/webkitprivate.h \
245         WebKit/gtk/WebView/webkitsettings.h \
246         WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
247         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
248         WebKit/gtk/WebCoreSupport/DragClientGtk.h \
249         WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
250         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
251         WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
252         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
253
254 webkitgtk_sources += \
255         WebKit/gtk/WebView/webkitnetworkrequest.cpp \
256         WebKit/gtk/WebView/webkitprivate.cpp \
257         WebKit/gtk/WebView/webkitsettings.cpp \
258         WebKit/gtk/WebView/webkitwebframe.cpp \
259         WebKit/gtk/WebView/webkitwebview.cpp \
260         WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
261         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
262         WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
263         WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
264         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
265         WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
266         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp 
267
268 webkitgtk_cleanfiles += \
269         $(top_builddir)/Programs/GtkLauncher \
270         $(top_builddir)/WebKit/gtk/WebKitGtk.pc
271
272 pkgconfigdir = $(libdir)/pkgconfig
273 pkgconfig_DATA = WebKit/gtk/WebKitGtk.pc
274
275 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/WebView/webkit-marshal
276 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/WebView/webkit-marshal.list
277
278 stamp_files := \
279         stamp-webkit-marshal.cpp \
280         stamp-webkit-marshal.h
281
282 WebKit/gtk/WebView/webkit-marshal.cpp: stamp-webkit-marshal.cpp
283         @true
284
285 WebKit/gtk/WebView/webkit-marshal.h: stamp-webkit-marshal.h
286         @true
287
288 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
289         echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
290         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
291         echo timestamp > $(@F)
292
293 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
294         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
295         echo timestamp > $(@F)
296
297 # END WEBKIT GTK+
298
299 # Files that will be cleaned
300 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
301 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
302 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
303
304 # Include module makefiles
305 include JavaScriptCore/GNUmakefile.am
306 include WebCore/GNUmakefile.am
307 include WebKitTools/GNUmakefile.am
308
309
310 # Autogenerated sources
311 BUILT_SOURCES = \
312         $(javascriptcore_built_sources) \
313         $(javascriptcore_built_nosources) \
314         $(webcore_built_sources) \
315         $(webcore_built_nosources) \
316         $(webkitgtk_built_sources) \
317         $(webkitgtk_built_nosources)
318
319 # Project-wide clean rules
320 CLEANFILES += \
321         $(webkitgtk_cleanfiles) \
322         $(top_builddir)/Programs/DumpRenderTree \
323         $(top_builddir)/Programs/testkjs \
324         $(GENSOURCES)
325
326 MAINTAINERCLEANFILES += \
327         $(srcdir)/aconfig.h.in \
328         configure \
329         config.* \
330         GNUmakefile.in \
331         INSTALL \
332         README