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 and CXXFLAGS that apply to JSC, WebCore, and to
30 # Directory for autogenerated sources
31 GENSOURCES := $(top_builddir)/DerivedSources
33 # Script for creating hash tables
34 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
36 # Libraries and support components
45 # Files that will be distributed
53 -I $(srcdir)/JavaScriptCore \
54 -I $(srcdir)/JavaScriptCore/ForwardingHeaders \
55 -I $(srcdir)/JavaScriptCore/wtf \
56 -I $(srcdir)/JavaScriptCore/kjs \
57 -I $(top_builddir)/DerivedSources
59 # Default compiler flags
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)
68 -fno-rtti -fno-exceptions \
76 # Convenience libraries
77 noinst_LTLIBRARIES = \
82 javascriptcore_h_api :=
83 javascriptcore_cppflags:=
84 javascriptcore_sources :=
85 javascriptcore_built_sources :=
86 javascriptcore_built_nosources :=
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)
93 libJavaScriptCore_la_SOURCES = \
94 $(javascriptcore_built_sources) \
95 $(javascriptcore_sources)
97 libJavaScriptCore_la_LDFLAGS = $(ICU_LIBS) -lpthread
99 libJavaScriptCore_la_CXXFLAGS = $(global_cflags) -fstrict-aliasing
101 libJavaScriptCore_la_CFLAGS = $(global_cflags) -fstrict-aliasing
103 libJavaScriptCore_la_CPPFLAGS = \
105 $(javascriptcore_cppflags) \
113 webcore_built_sources :=
114 webcore_built_nosources :=
120 webkitgtk_cppflags :=
122 webkitgtk_built_sources :=
123 webkitgtk_built_nosources :=
124 webkitgtk_cleanfiles :=
126 # No need to touch the following variables unless you have to. If you need to change the values
127 # for the following variables, use the "webkitgtk_" variables above
128 libWebKitGtk_ladir := $(prefix)/include/WebKit
130 libWebKitGtk_la_HEADERS = $(webkitgtk_h_api)
132 libWebKitGtk_la_SOURCES = \
133 $(webcore_built_sources) \
136 $(webkitgtk_built_sources) \
137 $(webkitgtk_headers) \
140 libWebKitGtk_la_CXXFLAGS = \
141 -fno-strict-aliasing \
143 $(DEPENDENCIES_CFLAGS) \
146 $(GSTREAMER_CFLAGS) \
150 libWebKitGtk_la_CFLAGS = \
151 -fno-strict-aliasing \
153 $(DEPENDENCIES_CFLAGS) \
156 $(GSTREAMER_CFLAGS) \
160 libWebKitGtk_la_CPPFLAGS = \
162 $(webcore_cppflags) \
163 $(webkitgtk_cppflags) \
166 libWebKitGtk_la_LIBADD = libJavaScriptCore.la
168 libWebKitGtk_la_LDFLAGS = \
169 $(webkitgtk_ldflags) \
170 $(DEPENDENCIES_LIBS) \
176 $(COVERAGE_LDFLAGS) \
179 -version-info @LIBWEBKITGTK_VERSION@
182 # Extra checks and flags
187 if !ENABLE_FAST_MALLOC
193 global_cppflags += -DXP_UNIX
197 global_cppflags += -DNDEBUG
199 webkitgtk_cppflags += \
200 -DG_DISABLE_DEPRECATED \
201 -DGDK_PIXBUF_DISABLE_DEPRECATED \
202 -DGDK_DISABLE_DEPRECATED \
203 -DGTK_DISABLE_DEPRECATED \
204 -DPANGO_DISABLE_DEPRECATED
206 # Might be useful in the future
207 # -DGDK_MULTIHEAD_SAFE \
208 # -DGTK_MULTIHEAD_SAFE
212 global_cppflags += -DENABLE_DATABASE=0
215 if !ENABLE_ICONDATABASE
216 global_cppflags += -DENABLE_ICONDATABASE=0
221 -DGCC_GENERATE_TEST_COVERAGE_FILES \
222 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
226 webkitgtk_ldflags += -lgstinterfaces-0.10 -lgstvideo-0.10
231 webkitgtk_cppflags += \
232 -I $(top_builddir)/WebKit/gtk/WebView \
233 -DBUILDING_CAIRO__=1 \
237 WebKit/gtk/WebView/webkit.h \
238 WebKit/gtk/WebView/webkitdefines.h \
239 WebKit/gtk/WebView/webkitnetworkrequest.h \
240 WebKit/gtk/WebView/webkitwebframe.h \
241 WebKit/gtk/WebView/webkitwebview.h
243 webkitgtk_built_sources += \
244 WebKit/gtk/WebView/webkit-marshal.h \
245 WebKit/gtk/WebView/webkit-marshal.cpp
247 webkitgtk_headers += \
248 WebKit/gtk/WebView/webkitprivate.h \
249 WebKit/gtk/WebView/webkitsettings.h \
250 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
251 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
252 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
253 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
254 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
255 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
256 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
258 webkitgtk_sources += \
259 WebKit/gtk/WebView/webkitnetworkrequest.cpp \
260 WebKit/gtk/WebView/webkitprivate.cpp \
261 WebKit/gtk/WebView/webkitsettings.cpp \
262 WebKit/gtk/WebView/webkitwebframe.cpp \
263 WebKit/gtk/WebView/webkitwebview.cpp \
264 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
265 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
266 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
267 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
268 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
269 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
270 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
272 webkitgtk_cleanfiles += \
273 $(top_builddir)/Programs/GtkLauncher \
274 $(top_builddir)/WebKit/gtk/WebKitGtk.pc
276 pkgconfigdir = $(libdir)/pkgconfig
277 pkgconfig_DATA = WebKit/gtk/WebKitGtk.pc
279 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/WebView/webkit-marshal
280 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/WebView/webkit-marshal.list
283 stamp-webkit-marshal.cpp \
284 stamp-webkit-marshal.h
286 WebKit/gtk/WebView/webkit-marshal.cpp: stamp-webkit-marshal.cpp
289 WebKit/gtk/WebView/webkit-marshal.h: stamp-webkit-marshal.h
292 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
293 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
294 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
295 echo timestamp > $(@F)
297 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
298 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
299 echo timestamp > $(@F)
303 # Files that will be cleaned
304 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
305 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
306 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
308 # Include module makefiles
309 include JavaScriptCore/GNUmakefile.am
310 include WebCore/GNUmakefile.am
311 include WebKitTools/GNUmakefile.am
314 # Autogenerated sources
316 $(javascriptcore_built_sources) \
317 $(javascriptcore_built_nosources) \
318 $(webcore_built_sources) \
319 $(webcore_built_nosources) \
320 $(webkitgtk_built_sources) \
321 $(webkitgtk_built_nosources)
323 # Project-wide clean rules
325 $(webkitgtk_cleanfiles) \
326 $(top_builddir)/Programs/DumpRenderTree \
327 $(top_builddir)/Programs/testkjs \
330 MAINTAINERCLEANFILES += \
331 $(srcdir)/aconfig.h.in \