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) \
142 $(GSTREAMER_CFLAGS) \
146 libWebKitGtk_la_CFLAGS = \
147 -fno-strict-aliasing \
149 $(DEPENDENCIES_CFLAGS) \
151 $(GSTREAMER_CFLAGS) \
155 libWebKitGtk_la_CPPFLAGS = \
157 $(webcore_cppflags) \
158 $(webkitgtk_cppflags)
160 libWebKitGtk_la_LIBADD = libJavaScriptCore.la
162 libWebKitGtk_la_LDFLAGS = \
163 $(webkitgtk_ldflags) \
164 $(DEPENDENCIES_LIBS) \
169 $(COVERAGE_LDFLAGS) \
172 -version-info @LIBWEBKITGTK_VERSION@
175 # Extra checks and flags
180 if !ENABLE_FAST_MALLOC
186 global_cppflags += -DXP_UNIX
190 global_cppflags += -DNDEBUG
192 webkitgtk_cppflags += \
193 -DG_DISABLE_DEPRECATED \
194 -DGDK_PIXBUF_DISABLE_DEPRECATED \
195 -DGDK_DISABLE_DEPRECATED \
196 -DGTK_DISABLE_DEPRECATED \
197 -DPANGO_DISABLE_DEPRECATED
199 # Might be useful in the future
200 # -DGDK_MULTIHEAD_SAFE \
201 # -DGTK_MULTIHEAD_SAFE
205 global_cppflags += -DENABLE_DATABASE=0
208 if !ENABLE_ICONDATABASE
209 global_cppflags += -DENABLE_ICONDATABASE=0
214 -DGCC_GENERATE_TEST_COVERAGE_FILES \
215 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
219 webkitgtk_ldflags += -lgstinterfaces-0.10 -lgstvideo-0.10
224 webkitgtk_cppflags += \
225 -I $(top_builddir)/WebKit/gtk/WebView \
226 -DBUILDING_CAIRO__=1 \
230 WebKit/gtk/WebView/webkit.h \
231 WebKit/gtk/WebView/webkitdefines.h \
232 WebKit/gtk/WebView/webkitnetworkrequest.h \
233 WebKit/gtk/WebView/webkitwebframe.h \
234 WebKit/gtk/WebView/webkitwebview.h
236 webkitgtk_built_sources += \
237 WebKit/gtk/WebView/webkit-marshal.h \
238 WebKit/gtk/WebView/webkit-marshal.cpp
240 webkitgtk_headers += \
241 WebKit/gtk/WebView/webkitprivate.h \
242 WebKit/gtk/WebView/webkitsettings.h \
243 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
244 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
245 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
246 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
247 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
248 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
249 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
251 webkitgtk_sources += \
252 WebKit/gtk/WebView/webkitnetworkrequest.cpp \
253 WebKit/gtk/WebView/webkitprivate.cpp \
254 WebKit/gtk/WebView/webkitsettings.cpp \
255 WebKit/gtk/WebView/webkitwebframe.cpp \
256 WebKit/gtk/WebView/webkitwebview.cpp \
257 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
258 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
259 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
260 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
261 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
262 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
263 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
265 webkitgtk_cleanfiles += \
266 $(top_builddir)/Programs/GtkLauncher \
267 $(top_builddir)/WebKit/gtk/WebKitGtk.pc
269 pkgconfigdir = $(libdir)/pkgconfig
270 pkgconfig_DATA = WebKit/gtk/WebKitGtk.pc
272 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/WebView/webkit-marshal
273 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/WebView/webkit-marshal.list
276 stamp-webkit-marshal.cpp \
277 stamp-webkit-marshal.h
279 WebKit/gtk/WebView/webkit-marshal.cpp: stamp-webkit-marshal.cpp
282 WebKit/gtk/WebView/webkit-marshal.h: stamp-webkit-marshal.h
285 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
286 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
287 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
288 echo timestamp > $(@F)
290 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
291 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
292 echo timestamp > $(@F)
296 # Files that will be cleaned
297 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
298 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
299 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
301 # Include module makefiles
302 include JavaScriptCore/GNUmakefile.am
303 include WebCore/GNUmakefile.am
304 include WebKitTools/GNUmakefile.am
307 # Autogenerated sources
309 $(javascriptcore_built_sources) \
310 $(javascriptcore_built_nosources) \
311 $(webcore_built_sources) \
312 $(webcore_built_nosources) \
313 $(webkitgtk_built_sources) \
314 $(webkitgtk_built_nosources)
316 # Project-wide clean rules
318 $(webkitgtk_cleanfiles) \
319 $(top_builddir)/Programs/DumpRenderTree \
320 $(top_builddir)/Programs/testkjs \
323 MAINTAINERCLEANFILES += \
324 $(srcdir)/aconfig.h.in \