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
34 GENPROGRAMS := $(top_builddir)/Programs
36 # Script for creating hash tables
37 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
39 # Libraries and support components
46 # Files that will be distributed
53 -DWTF_USE_ICU_UNICODE=1
55 # Default compiler flags
57 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
58 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
59 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
60 -Wno-unused-parameter -Wno-parentheses
63 $(SYMBOL_VISIBILITY_INLINES)
78 # Convenience libraries
79 noinst_LTLIBRARIES = \
80 libJavaScriptCore.la \
85 javascriptcore_h_api :=
86 javascriptcore_cppflags:=
87 javascriptcore_sources :=
88 javascriptcore_built_sources :=
89 javascriptcore_built_nosources :=
91 javascriptcore_cppflags += \
92 -I$(srcdir)/JavaScriptCore \
93 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
94 -I$(srcdir)/JavaScriptCore/wtf \
95 -I$(srcdir)/JavaScriptCore/kjs \
96 -I$(top_builddir)/DerivedSources
98 # The variables above are already included below so no need to touch
99 # these variables unless you really have to
100 nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
101 $(javascriptcore_built_nosources)
103 nodist_libJavaScriptCore_la_SOURCES = \
104 $(javascriptcore_built_sources)
106 libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
107 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
109 libJavaScriptCore_la_SOURCES = \
110 $(javascriptcore_sources)
112 libJavaScriptCore_la_LIBADD = \
117 libJavaScriptCore_la_CXXFLAGS = \
120 $(GLOBALDEPS_CFLAGS) \
124 libJavaScriptCore_la_CFLAGS = \
126 $(GLOBALDEPS_CFLAGS) \
130 libJavaScriptCore_la_CPPFLAGS = \
132 $(javascriptcore_cppflags)
140 webcore_built_sources :=
141 webcore_built_nosources :=
143 nodist_libWebCore_la_SOURCES = \
144 $(webcore_built_sources)
146 libWebCore_la_SOURCES = \
150 libWebCore_la_CXXFLAGS = \
151 -fno-strict-aliasing \
154 $(GLOBALDEPS_CFLAGS) \
156 $(WEBKITDEPS_CFLAGS) \
160 $(GSTREAMER_CFLAGS) \
165 libWebCore_la_CFLAGS = \
166 -fno-strict-aliasing \
168 $(GLOBALDEPS_CFLAGS) \
170 $(WEBKITDEPS_CFLAGS) \
174 $(GSTREAMER_CFLAGS) \
179 libWebCore_la_CPPFLAGS = \
181 $(webcore_cppflags) \
182 $(javascriptcore_cppflags) \
183 $(webkitgtk_cppflags) \
186 libWebCore_la_LIBADD = \
187 libJavaScriptCore.la \
205 webkitgtk_cppflags :=
206 webkitgtk_built_sources :=
207 webkitgtk_built_nosources :=
208 webkitgtk_cleanfiles :=
210 nodist_libwebkit_1_0_la_SOURCES = \
211 $(webkitgtk_built_sources)
213 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
214 libwebkit_1_0_la_HEADERS = $(webkitgtk_h_api)
216 libwebkit_1_0_la_SOURCES = \
217 $(webkitgtk_headers) \
220 libwebkit_1_0_la_CXXFLAGS = \
221 $(libWebCore_la_CXXFLAGS)
223 libwebkit_1_0_la_CFLAGS = \
224 $(libWebCore_la_CFLAGS)
226 libwebkit_1_0_la_CPPFLAGS = \
227 $(libWebCore_la_CPPFLAGS)
229 libwebkit_1_0_la_LDFLAGS = \
230 $(COVERAGE_LDFLAGS) \
231 -version-info @LIBWEBKITGTK_VERSION@
233 libwebkit_1_0_la_LIBADD = \
237 # Extra checks and flags
242 if !ENABLE_FAST_MALLOC
248 global_cppflags += -DXP_UNIX
252 global_cppflags += -DNDEBUG
254 webkitgtk_cppflags += \
255 -DG_DISABLE_DEPRECATED \
256 -DGDK_PIXBUF_DISABLE_DEPRECATED \
257 -DGDK_DISABLE_DEPRECATED \
258 -DGTK_DISABLE_DEPRECATED \
259 -DPANGO_DISABLE_DEPRECATED
261 # Might be useful in the future
262 # -DGDK_MULTIHEAD_SAFE \
263 # -DGTK_MULTIHEAD_SAFE
267 global_cppflags += -DENABLE_DATABASE=0
270 if !ENABLE_ICONDATABASE
271 global_cppflags += -DENABLE_ICONDATABASE=0
276 -DGCC_GENERATE_TEST_COVERAGE_FILES \
277 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
281 webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
284 webkitgtk_cppflags += \
285 -I$(top_builddir)/WebKit/gtk/webkit \
286 -DBUILDING_CAIRO__=1 \
290 WebKit/gtk/webkit/webkit.h \
291 WebKit/gtk/webkit/webkitdefines.h \
292 WebKit/gtk/webkit/webkitnetworkrequest.h \
293 WebKit/gtk/webkit/webkitwebbackforwardlist.h \
294 WebKit/gtk/webkit/webkitwebframe.h \
295 WebKit/gtk/webkit/webkitwebhistoryitem.h \
296 WebKit/gtk/webkit/webkitwebsettings.h \
297 WebKit/gtk/webkit/webkitwebview.h
299 webkitgtk_built_sources += \
300 DerivedSources/webkit-marshal.h \
301 DerivedSources/webkit-marshal.cpp
303 webkitgtk_headers += \
304 WebKit/gtk/webkit/webkitprivate.h \
305 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
306 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
307 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
308 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
309 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
310 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
311 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
313 webkitgtk_sources += \
314 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
315 WebKit/gtk/webkit/webkitprivate.cpp \
316 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
317 WebKit/gtk/webkit/webkitwebframe.cpp \
318 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
319 WebKit/gtk/webkit/webkitwebsettings.cpp \
320 WebKit/gtk/webkit/webkitwebview.cpp \
321 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
322 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
323 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
324 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
325 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
326 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
327 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
329 webkitgtk_cleanfiles += \
330 $(top_builddir)/Programs/GtkLauncher \
331 $(top_builddir)/WebKit/gtk/webkit-1.0.pc
333 pkgconfigdir = $(libdir)/pkgconfig
334 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
336 WEBKIT_MARSHAL = $(GENSOURCES)/webkit-marshal
337 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/webkit/webkit-marshal.list
340 stamp-webkit-marshal.cpp \
341 stamp-webkit-marshal.h
343 DerivedSources/webkit-marshal.cpp: stamp-webkit-marshal.cpp
346 DerivedSources/webkit-marshal.h: stamp-webkit-marshal.h
349 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
350 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
351 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
352 echo timestamp > $(@F)
354 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
355 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
356 echo timestamp > $(@F)
360 # Files that will be cleaned
361 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
362 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
363 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
365 # Include module makefiles
366 include JavaScriptCore/GNUmakefile.am
367 include WebCore/GNUmakefile.am
368 include WebKitTools/GNUmakefile.am
370 # Autogenerated sources
372 $(javascriptcore_built_sources) \
373 $(javascriptcore_built_nosources) \
374 $(webcore_built_sources) \
375 $(webcore_built_nosources) \
376 $(webkitgtk_built_sources) \
377 $(webkitgtk_built_nosources)
379 # Project-wide clean rules
381 $(webkitgtk_cleanfiles)
383 MAINTAINERCLEANFILES += \
384 $(srcdir)/aconfig.h.in \
391 # remove built sources and program directories
393 -rm -rf $(GENSOURCES) $(GENPROGRAMS)