1 # Top-level Makefile rule for automake
3 # Variable conventions:
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
13 # _cleanfiles = files that will be removed by the clean target
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.
22 # global_cppflags = CPPFLAGS that apply to JSC, WebCore, and to any
24 # global_cflags = CFLAGS that apply to JSC, WebCore, and to
26 # global_cxxflags = CXXFLAGS that apply to JSC, WebCore, and to any
32 # Directory for autogenerated sources
33 GENSOURCES := $(top_builddir)/DerivedSources
35 # Script for creating hash tables
36 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
38 # Libraries and support components
47 # Files that will be distributed
55 -I$(srcdir)/JavaScriptCore \
56 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
57 -I$(srcdir)/JavaScriptCore/wtf \
58 -I$(srcdir)/JavaScriptCore/kjs \
59 -I$(top_builddir)/DerivedSources
61 # Default compiler flags
63 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
64 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
65 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
69 $(SYMBOL_VISIBILITY_INLINES)
84 # Convenience libraries
85 noinst_LTLIBRARIES = \
86 libJavaScriptCore.la \
91 javascriptcore_h_api :=
92 javascriptcore_cppflags:=
93 javascriptcore_sources :=
94 javascriptcore_built_sources :=
95 javascriptcore_built_nosources :=
97 # The variables above are already included below so no need to touch
98 # these variables unless you really have to
99 libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
100 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
102 libJavaScriptCore_la_SOURCES = \
103 $(javascriptcore_built_sources) \
104 $(javascriptcore_sources)
106 libJavaScriptCore_la_LIBADD = \
111 libJavaScriptCore_la_CXXFLAGS = \
114 $(GLOBALDEPS_CFLAGS) \
117 libJavaScriptCore_la_CFLAGS = \
119 $(GLOBALDEPS_CFLAGS) \
122 libJavaScriptCore_la_CPPFLAGS = \
124 $(javascriptcore_cppflags) \
133 webcore_built_sources :=
134 webcore_built_nosources :=
136 webcore_cppflags += $(HILDON_CPPFLAGS)
142 webkitgtk_cppflags :=
143 webkitgtk_built_sources :=
144 webkitgtk_built_nosources :=
145 webkitgtk_cleanfiles :=
147 libWebCore_la_SOURCES = \
148 $(webcore_built_sources) \
152 libWebCore_la_CXXFLAGS = \
153 -fno-strict-aliasing \
156 $(GLOBALDEPS_CFLAGS) \
157 $(WEBKITDEPS_CFLAGS) \
160 $(GSTREAMER_CFLAGS) \
165 libWebCore_la_CFLAGS = \
166 -fno-strict-aliasing \
168 $(GLOBALDEPS_CFLAGS) \
169 $(WEBKITDEPS_CFLAGS) \
172 $(GSTREAMER_CFLAGS) \
177 libWebCore_la_CPPFLAGS = \
180 $(webcore_cppflags) \
181 $(webkitgtk_cppflags)
183 libWebCore_la_LIBADD = \
184 libJavaScriptCore.la \
197 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
198 libwebkit_1_0_la_HEADERS = $(webkitgtk_h_api)
200 libwebkit_1_0_la_SOURCES = \
201 $(webkitgtk_built_sources) \
202 $(webkitgtk_headers) \
205 libwebkit_1_0_la_CXXFLAGS = \
206 $(libWebCore_la_CXXFLAGS)
208 libwebkit_1_0_la_CFLAGS = \
209 $(libWebCore_la_CFLAGS)
211 libwebkit_1_0_la_CPPFLAGS = \
212 $(libWebCore_la_CPPFLAGS)
214 libwebkit_1_0_la_LDFLAGS = \
215 $(COVERAGE_LDFLAGS) \
216 -version-info @LIBWEBKITGTK_VERSION@
218 libwebkit_1_0_la_LIBADD = \
222 # Extra checks and flags
227 if !ENABLE_FAST_MALLOC
233 global_cppflags += -DXP_UNIX
237 global_cppflags += -DNDEBUG
239 webkitgtk_cppflags += \
240 -DG_DISABLE_DEPRECATED \
241 -DGDK_PIXBUF_DISABLE_DEPRECATED \
242 -DGDK_DISABLE_DEPRECATED \
243 -DGTK_DISABLE_DEPRECATED \
244 -DPANGO_DISABLE_DEPRECATED
246 # Might be useful in the future
247 # -DGDK_MULTIHEAD_SAFE \
248 # -DGTK_MULTIHEAD_SAFE
252 global_cppflags += -DENABLE_DATABASE=0
255 if !ENABLE_ICONDATABASE
256 global_cppflags += -DENABLE_ICONDATABASE=0
261 -DGCC_GENERATE_TEST_COVERAGE_FILES \
262 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
266 webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
269 webkitgtk_cppflags += \
270 -I$(top_builddir)/WebKit/gtk/webkit \
271 -DBUILDING_CAIRO__=1 \
275 WebKit/gtk/webkit/webkit.h \
276 WebKit/gtk/webkit/webkitdefines.h \
277 WebKit/gtk/webkit/webkitnetworkrequest.h \
278 WebKit/gtk/webkit/webkitwebbackforwardlist.h \
279 WebKit/gtk/webkit/webkitwebframe.h \
280 WebKit/gtk/webkit/webkitwebhistoryitem.h \
281 WebKit/gtk/webkit/webkitwebsettings.h \
282 WebKit/gtk/webkit/webkitwebview.h
284 webkitgtk_built_sources += \
285 WebKit/gtk/webkit/webkit-marshal.h \
286 WebKit/gtk/webkit/webkit-marshal.cpp
288 webkitgtk_headers += \
289 WebKit/gtk/webkit/webkitprivate.h \
290 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
291 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
292 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
293 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
294 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
295 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
296 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
298 webkitgtk_sources += \
299 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
300 WebKit/gtk/webkit/webkitprivate.cpp \
301 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
302 WebKit/gtk/webkit/webkitwebframe.cpp \
303 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
304 WebKit/gtk/webkit/webkitwebsettings.cpp \
305 WebKit/gtk/webkit/webkitwebview.cpp \
306 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
307 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
308 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
309 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
310 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
311 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
312 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
314 webkitgtk_cleanfiles += \
315 $(top_builddir)/Programs/GtkLauncher \
316 $(top_builddir)/WebKit/gtk/webkit-1.0.pc
318 pkgconfigdir = $(libdir)/pkgconfig
319 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
321 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/webkit/webkit-marshal
322 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/webkit/webkit-marshal.list
325 stamp-webkit-marshal.cpp \
326 stamp-webkit-marshal.h
328 WebKit/gtk/webkit/webkit-marshal.cpp: stamp-webkit-marshal.cpp
331 WebKit/gtk/webkit/webkit-marshal.h: stamp-webkit-marshal.h
334 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
335 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
336 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
337 echo timestamp > $(@F)
339 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
340 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
341 echo timestamp > $(@F)
345 # Files that will be cleaned
346 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
347 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
348 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
350 # Include module makefiles
351 include JavaScriptCore/GNUmakefile.am
352 include WebCore/GNUmakefile.am
353 include WebKitTools/GNUmakefile.am
356 # Autogenerated sources
358 $(javascriptcore_built_sources) \
359 $(javascriptcore_built_nosources) \
360 $(webcore_built_sources) \
361 $(webcore_built_nosources) \
362 $(webkitgtk_built_sources) \
363 $(webkitgtk_built_nosources)
365 # Project-wide clean rules
367 $(webkitgtk_cleanfiles) \
368 $(top_builddir)/Programs/DumpRenderTree \
369 $(top_builddir)/Programs/testkjs \
372 MAINTAINERCLEANFILES += \
373 $(srcdir)/aconfig.h.in \