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 = -lpthread
99 libJavaScriptCore_la_CXXFLAGS = $(global_cflags) -fstrict-aliasing
101 libJavaScriptCore_la_CFLAGS = $(global_cflags) -fstrict-aliasing
103 libJavaScriptCore_la_CPPFLAGS = $(global_cppflags) $(javascriptcore_cppflags)
110 webcore_built_sources :=
111 webcore_built_nosources :=
117 webkitgtk_cppflags :=
119 webkitgtk_built_sources :=
120 webkitgtk_built_nosources :=
121 webkitgtk_cleanfiles :=
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
127 libWebKitGtk_la_HEADERS = $(webkitgtk_h_api)
129 libWebKitGtk_la_SOURCES = \
130 $(webcore_built_sources) \
133 $(webkitgtk_built_sources) \
134 $(webkitgtk_headers) \
137 libWebKitGtk_la_CXXFLAGS = \
138 -fno-strict-aliasing \
140 $(DEPENDENCIES_CFLAGS) \
143 $(GSTREAMER_CFLAGS) \
147 libWebKitGtk_la_CFLAGS = \
148 -fno-strict-aliasing \
150 $(DEPENDENCIES_CFLAGS) \
153 $(GSTREAMER_CFLAGS) \
157 libWebKitGtk_la_CPPFLAGS = \
159 $(webcore_cppflags) \
160 $(webkitgtk_cppflags)
162 libWebKitGtk_la_LIBADD = libJavaScriptCore.la
164 libWebKitGtk_la_LDFLAGS = \
165 $(webkitgtk_ldflags) \
166 $(DEPENDENCIES_LIBS) \
172 $(COVERAGE_LDFLAGS) \
175 -version-info @LIBWEBKITGTK_VERSION@
178 # Extra checks and flags
183 if !ENABLE_FAST_MALLOC
189 global_cppflags += -DXP_UNIX
193 global_cppflags += -DNDEBUG
195 webkitgtk_cppflags += \
196 -DG_DISABLE_DEPRECATED \
197 -DGDK_PIXBUF_DISABLE_DEPRECATED \
198 -DGDK_DISABLE_DEPRECATED \
199 -DGTK_DISABLE_DEPRECATED \
200 -DPANGO_DISABLE_DEPRECATED
202 # Might be useful in the future
203 # -DGDK_MULTIHEAD_SAFE \
204 # -DGTK_MULTIHEAD_SAFE
208 global_cppflags += -DENABLE_DATABASE=0
211 if !ENABLE_ICONDATABASE
212 global_cppflags += -DENABLE_ICONDATABASE=0
217 -DGCC_GENERATE_TEST_COVERAGE_FILES \
218 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
222 webkitgtk_ldflags += -lgstinterfaces-0.10 -lgstvideo-0.10
227 webkitgtk_cppflags += \
228 -I $(top_builddir)/WebKit/gtk/WebView \
229 -DBUILDING_CAIRO__=1 \
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
239 webkitgtk_built_sources += \
240 WebKit/gtk/WebView/webkit-marshal.h \
241 WebKit/gtk/WebView/webkit-marshal.cpp
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
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
268 webkitgtk_cleanfiles += \
269 $(top_builddir)/Programs/GtkLauncher \
270 $(top_builddir)/WebKit/gtk/WebKitGtk.pc
272 pkgconfigdir = $(libdir)/pkgconfig
273 pkgconfig_DATA = WebKit/gtk/WebKitGtk.pc
275 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/WebView/webkit-marshal
276 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/WebView/webkit-marshal.list
279 stamp-webkit-marshal.cpp \
280 stamp-webkit-marshal.h
282 WebKit/gtk/WebView/webkit-marshal.cpp: stamp-webkit-marshal.cpp
285 WebKit/gtk/WebView/webkit-marshal.h: stamp-webkit-marshal.h
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)
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)
299 # Files that will be cleaned
300 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
301 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
302 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
304 # Include module makefiles
305 include JavaScriptCore/GNUmakefile.am
306 include WebCore/GNUmakefile.am
307 include WebKitTools/GNUmakefile.am
310 # Autogenerated 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)
319 # Project-wide clean rules
321 $(webkitgtk_cleanfiles) \
322 $(top_builddir)/Programs/DumpRenderTree \
323 $(top_builddir)/Programs/testkjs \
326 MAINTAINERCLEANFILES += \
327 $(srcdir)/aconfig.h.in \