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 = \
90 javascriptcore_h_api :=
91 javascriptcore_cppflags:=
92 javascriptcore_sources :=
93 javascriptcore_built_sources :=
94 javascriptcore_built_nosources :=
96 # The variables above are already included below so no need to touch
97 # these variables unless you really have to
98 libJavaScriptCore_ladir = $(prefix)/include/WebKit/JavaScriptCore
99 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
101 libJavaScriptCore_la_SOURCES = \
102 $(javascriptcore_built_sources) \
103 $(javascriptcore_sources)
105 libJavaScriptCore_la_LDFLAGS = $(ICU_LIBS) -lpthread
107 libJavaScriptCore_la_CXXFLAGS = $(global_cxxflags) $(global_cflags) -fstrict-aliasing
109 libJavaScriptCore_la_CFLAGS = $(global_cflags) -fstrict-aliasing
111 libJavaScriptCore_la_CPPFLAGS = \
113 $(javascriptcore_cppflags) \
121 webcore_built_sources :=
122 webcore_built_nosources :=
128 webkitgtk_cppflags :=
130 webkitgtk_built_sources :=
131 webkitgtk_built_nosources :=
132 webkitgtk_cleanfiles :=
134 webkitgtk_cppflags += $(HILDON_CPPFLAGS)
136 # No need to touch the following variables unless you have to. If you need to change the values
137 # for the following variables, use the "webkitgtk_" variables above
138 libWebKitGtk_ladir := $(prefix)/include/WebKit/webkit
140 libWebKitGtk_la_HEADERS = $(webkitgtk_h_api)
142 libWebKitGtk_la_SOURCES = \
143 $(webcore_built_sources) \
146 $(webkitgtk_built_sources) \
147 $(webkitgtk_headers) \
150 libWebKitGtk_la_CXXFLAGS = \
151 -fno-strict-aliasing \
154 $(DEPENDENCIES_CFLAGS) \
157 $(GSTREAMER_CFLAGS) \
162 libWebKitGtk_la_CFLAGS = \
163 -fno-strict-aliasing \
165 $(DEPENDENCIES_CFLAGS) \
168 $(GSTREAMER_CFLAGS) \
173 libWebKitGtk_la_CPPFLAGS = \
175 $(webcore_cppflags) \
176 $(webkitgtk_cppflags) \
179 libWebKitGtk_la_LIBADD = libJavaScriptCore.la
181 libWebKitGtk_la_LDFLAGS = \
182 $(webkitgtk_ldflags) \
183 $(DEPENDENCIES_LIBS) \
189 $(COVERAGE_LDFLAGS) \
193 -version-info @LIBWEBKITGTK_VERSION@
196 # Extra checks and flags
201 if !ENABLE_FAST_MALLOC
207 global_cppflags += -DXP_UNIX
211 global_cppflags += -DNDEBUG
213 webkitgtk_cppflags += \
214 -DG_DISABLE_DEPRECATED \
215 -DGDK_PIXBUF_DISABLE_DEPRECATED \
216 -DGDK_DISABLE_DEPRECATED \
217 -DGTK_DISABLE_DEPRECATED \
218 -DPANGO_DISABLE_DEPRECATED
220 # Might be useful in the future
221 # -DGDK_MULTIHEAD_SAFE \
222 # -DGTK_MULTIHEAD_SAFE
226 global_cppflags += -DENABLE_DATABASE=0
229 if !ENABLE_ICONDATABASE
230 global_cppflags += -DENABLE_ICONDATABASE=0
235 -DGCC_GENERATE_TEST_COVERAGE_FILES \
236 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
240 webkitgtk_ldflags += -lgstinterfaces-0.10 -lgstvideo-0.10
245 webkitgtk_cppflags += \
246 -I$(top_builddir)/WebKit/gtk/webkit \
247 -DBUILDING_CAIRO__=1 \
251 WebKit/gtk/webkit/webkit.h \
252 WebKit/gtk/webkit/webkitdefines.h \
253 WebKit/gtk/webkit/webkitnetworkrequest.h \
254 WebKit/gtk/webkit/webkitwebbackforwardlist.h \
255 WebKit/gtk/webkit/webkitwebframe.h \
256 WebKit/gtk/webkit/webkitwebhistoryitem.h \
257 WebKit/gtk/webkit/webkitwebsettings.h \
258 WebKit/gtk/webkit/webkitwebview.h
260 webkitgtk_built_sources += \
261 WebKit/gtk/webkit/webkit-marshal.h \
262 WebKit/gtk/webkit/webkit-marshal.cpp
264 webkitgtk_headers += \
265 WebKit/gtk/webkit/webkitprivate.h \
266 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
267 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
268 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
269 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
270 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
271 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
272 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
274 webkitgtk_sources += \
275 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
276 WebKit/gtk/webkit/webkitprivate.cpp \
277 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
278 WebKit/gtk/webkit/webkitwebframe.cpp \
279 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
280 WebKit/gtk/webkit/webkitwebsettings.cpp \
281 WebKit/gtk/webkit/webkitwebview.cpp \
282 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
283 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
284 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
285 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
286 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
287 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
288 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
290 webkitgtk_cleanfiles += \
291 $(top_builddir)/Programs/GtkLauncher \
292 $(top_builddir)/WebKit/gtk/webkit-1.0.pc
294 pkgconfigdir = $(libdir)/pkgconfig
295 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
297 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/webkit/webkit-marshal
298 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/webkit/webkit-marshal.list
301 stamp-webkit-marshal.cpp \
302 stamp-webkit-marshal.h
304 WebKit/gtk/webkit/webkit-marshal.cpp: stamp-webkit-marshal.cpp
307 WebKit/gtk/webkit/webkit-marshal.h: stamp-webkit-marshal.h
310 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
311 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
312 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
313 echo timestamp > $(@F)
315 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
316 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
317 echo timestamp > $(@F)
321 # Files that will be cleaned
322 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
323 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
324 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
326 # Include module makefiles
327 include JavaScriptCore/GNUmakefile.am
328 include WebCore/GNUmakefile.am
329 include WebKitTools/GNUmakefile.am
332 # Autogenerated sources
334 $(javascriptcore_built_sources) \
335 $(javascriptcore_built_nosources) \
336 $(webcore_built_sources) \
337 $(webcore_built_nosources) \
338 $(webkitgtk_built_sources) \
339 $(webkitgtk_built_nosources)
341 # Project-wide clean rules
343 $(webkitgtk_cleanfiles) \
344 $(top_builddir)/Programs/DumpRenderTree \
345 $(top_builddir)/Programs/testkjs \
348 MAINTAINERCLEANFILES += \
349 $(srcdir)/aconfig.h.in \