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
62 -DWTF_USE_ICU_UNICODE=1
64 # Default compiler flags
66 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
67 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
68 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
72 $(SYMBOL_VISIBILITY_INLINES)
87 # Convenience libraries
88 noinst_LTLIBRARIES = \
89 libJavaScriptCore.la \
94 javascriptcore_h_api :=
95 javascriptcore_cppflags:=
96 javascriptcore_sources :=
97 javascriptcore_built_sources :=
98 javascriptcore_built_nosources :=
100 # The variables above are already included below so no need to touch
101 # these variables unless you really have to
102 libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
103 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
105 libJavaScriptCore_la_SOURCES = \
106 $(javascriptcore_built_sources) \
107 $(javascriptcore_sources)
109 libJavaScriptCore_la_LIBADD = \
114 libJavaScriptCore_la_CXXFLAGS = \
117 $(GLOBALDEPS_CFLAGS) \
121 libJavaScriptCore_la_CFLAGS = \
123 $(GLOBALDEPS_CFLAGS) \
127 libJavaScriptCore_la_CPPFLAGS = \
129 $(javascriptcore_cppflags)
137 webcore_built_sources :=
138 webcore_built_nosources :=
140 webcore_cppflags += $(HILDON_CPPFLAGS)
146 webkitgtk_cppflags :=
147 webkitgtk_built_sources :=
148 webkitgtk_built_nosources :=
149 webkitgtk_cleanfiles :=
151 libWebCore_la_SOURCES = \
152 $(webcore_built_sources) \
156 libWebCore_la_CXXFLAGS = \
157 -fno-strict-aliasing \
160 $(GLOBALDEPS_CFLAGS) \
162 $(WEBKITDEPS_CFLAGS) \
166 $(GSTREAMER_CFLAGS) \
171 libWebCore_la_CFLAGS = \
172 -fno-strict-aliasing \
174 $(GLOBALDEPS_CFLAGS) \
176 $(WEBKITDEPS_CFLAGS) \
180 $(GSTREAMER_CFLAGS) \
185 libWebCore_la_CPPFLAGS = \
187 $(webcore_cppflags) \
188 $(webkitgtk_cppflags)
190 libWebCore_la_LIBADD = \
191 libJavaScriptCore.la \
205 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
206 libwebkit_1_0_la_HEADERS = $(webkitgtk_h_api)
208 libwebkit_1_0_la_SOURCES = \
209 $(webkitgtk_built_sources) \
210 $(webkitgtk_headers) \
213 libwebkit_1_0_la_CXXFLAGS = \
214 $(libWebCore_la_CXXFLAGS)
216 libwebkit_1_0_la_CFLAGS = \
217 $(libWebCore_la_CFLAGS)
219 libwebkit_1_0_la_CPPFLAGS = \
220 $(libWebCore_la_CPPFLAGS)
222 libwebkit_1_0_la_LDFLAGS = \
223 $(COVERAGE_LDFLAGS) \
224 -version-info @LIBWEBKITGTK_VERSION@
226 libwebkit_1_0_la_LIBADD = \
230 # Extra checks and flags
235 if !ENABLE_FAST_MALLOC
241 global_cppflags += -DXP_UNIX
245 global_cppflags += -DNDEBUG
247 webkitgtk_cppflags += \
248 -DG_DISABLE_DEPRECATED \
249 -DGDK_PIXBUF_DISABLE_DEPRECATED \
250 -DGDK_DISABLE_DEPRECATED \
251 -DGTK_DISABLE_DEPRECATED \
252 -DPANGO_DISABLE_DEPRECATED
254 # Might be useful in the future
255 # -DGDK_MULTIHEAD_SAFE \
256 # -DGTK_MULTIHEAD_SAFE
260 global_cppflags += -DENABLE_DATABASE=0
263 if !ENABLE_ICONDATABASE
264 global_cppflags += -DENABLE_ICONDATABASE=0
269 -DGCC_GENERATE_TEST_COVERAGE_FILES \
270 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
274 webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
277 webkitgtk_cppflags += \
278 -I$(top_builddir)/WebKit/gtk/webkit \
279 -DBUILDING_CAIRO__=1 \
283 WebKit/gtk/webkit/webkit.h \
284 WebKit/gtk/webkit/webkitdefines.h \
285 WebKit/gtk/webkit/webkitnetworkrequest.h \
286 WebKit/gtk/webkit/webkitwebbackforwardlist.h \
287 WebKit/gtk/webkit/webkitwebframe.h \
288 WebKit/gtk/webkit/webkitwebhistoryitem.h \
289 WebKit/gtk/webkit/webkitwebsettings.h \
290 WebKit/gtk/webkit/webkitwebview.h
292 webkitgtk_built_sources += \
293 WebKit/gtk/webkit/webkit-marshal.h \
294 WebKit/gtk/webkit/webkit-marshal.cpp
296 webkitgtk_headers += \
297 WebKit/gtk/webkit/webkitprivate.h \
298 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
299 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
300 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
301 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
302 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
303 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
304 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
306 webkitgtk_sources += \
307 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
308 WebKit/gtk/webkit/webkitprivate.cpp \
309 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
310 WebKit/gtk/webkit/webkitwebframe.cpp \
311 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
312 WebKit/gtk/webkit/webkitwebsettings.cpp \
313 WebKit/gtk/webkit/webkitwebview.cpp \
314 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
315 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
316 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
317 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
318 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
319 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
320 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
322 webkitgtk_cleanfiles += \
323 $(top_builddir)/Programs/GtkLauncher \
324 $(top_builddir)/WebKit/gtk/webkit-1.0.pc
326 pkgconfigdir = $(libdir)/pkgconfig
327 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
329 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/webkit/webkit-marshal
330 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/webkit/webkit-marshal.list
333 stamp-webkit-marshal.cpp \
334 stamp-webkit-marshal.h
336 WebKit/gtk/webkit/webkit-marshal.cpp: stamp-webkit-marshal.cpp
339 WebKit/gtk/webkit/webkit-marshal.h: stamp-webkit-marshal.h
342 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
343 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
344 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
345 echo timestamp > $(@F)
347 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
348 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
349 echo timestamp > $(@F)
353 # Files that will be cleaned
354 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
355 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
356 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
358 # Include module makefiles
359 include JavaScriptCore/GNUmakefile.am
360 include WebCore/GNUmakefile.am
361 include WebKitTools/GNUmakefile.am
364 # Autogenerated sources
366 $(javascriptcore_built_sources) \
367 $(javascriptcore_built_nosources) \
368 $(webcore_built_sources) \
369 $(webcore_built_nosources) \
370 $(webkitgtk_built_sources) \
371 $(webkitgtk_built_nosources)
373 # Project-wide clean rules
375 $(webkitgtk_cleanfiles) \
376 $(top_builddir)/Programs/DumpRenderTree \
377 $(top_builddir)/Programs/testkjs \
380 MAINTAINERCLEANFILES += \
381 $(srcdir)/aconfig.h.in \