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
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 \
66 -Wno-unused-parameter -fno-exceptions -fno-strict-aliasing
69 lib_LTLIBRARIES = libJavaScriptCore.la libWebKitGtk.la
73 javascriptcore_h_api :=
74 javascriptcore_cppflags:=
75 javascriptcore_sources :=
76 javascriptcore_built_sources :=
77 javascriptcore_built_nosources :=
79 # The variables above are already included below so no need to touch
80 # these variables unless you really have to
81 libJavaScriptCore_ladir = $(prefix)/include/WebKit/JavaScriptCore
82 libJavaScriptCore_la_HEADERS := $(javascriptcore_h_api)
84 libJavaScriptCore_la_SOURCES := \
85 $(javascriptcore_built_sources) \
86 $(javascriptcore_sources)
88 libJavaScriptCore_la_LDFLAGS := -lpthread
90 libJavaScriptCore_la_CXXFLAGS := $(global_cflags)
92 libJavaScriptCore_la_CFLAGS := $(global_cflags)
94 libJavaScriptCore_la_CPPFLAGS := $(global_cppflags) $(javascriptcore_cppflags)
101 webcore_built_sources :=
102 webcore_built_nosources :=
108 webkitgtk_cppflags :=
110 webkitgtk_built_sources :=
111 webkitgtk_built_nosources :=
112 webkitgtk_cleanfiles :=
114 # No need to touch the following variables unless you have to. If you need to change the values
115 # for the following variables, use the "webkitgtk_" variables above
116 libWebKitGtk_ladir := $(prefix)/include/WebKit
118 libWebKitGtk_la_HEADERS := $(webkitgtk_h_api)
120 libWebKitGtk_la_SOURCES := \
121 $(webcore_built_sources) \
124 $(webkitgtk_built_sources) \
125 $(webkitgtk_headers) \
128 libWebKitGtk_la_CXXFLAGS := \
131 $(DEPENDENCIES_CFLAGS) \
133 $(GSTREAMER_CFLAGS) \
137 libWebKitGtk_la_CFLAGS := \
139 $(DEPENDENCIES_CFLAGS) \
141 $(GSTREAMER_CFLAGS) \
145 libWebKitGtk_la_CPPFLAGS := \
147 $(webcore_cppflags) \
148 $(webkitgtk_cppflags)
150 libWebKitGtk_la_LIBADD := @LTLIBOBJS@ libJavaScriptCore.la
152 libWebKitGtk_la_LDFLAGS := \
153 $(webkitgtk_ldflags) \
154 $(DEPENDENCIES_LIBS) \
159 $(COVERAGE_LDFLAGS) \
162 -version-info @LIBWEBKITGTK_VERSION@
165 # Extra checks and flags
168 -DUSE_SYSTEM_MALLOC \
172 global_cppflags += -DXP_UNIX
176 global_cppflags += -DNDEBUG
178 webkitgtk_cppflags += \
179 -DG_DISABLE_DEPRECATED \
180 -DGDK_PIXBUF_DISABLE_DEPRECATED \
181 -DGDK_DISABLE_DEPRECATED \
182 -DGTK_DISABLE_DEPRECATED \
183 -DPANGO_DISABLE_DEPRECATED
185 # Might be useful in the future
186 # -DGDK_MULTIHEAD_SAFE \
187 # -DGTK_MULTIHEAD_SAFE
191 global_cppflags += -DENABLE_DATABASE=0
194 if !ENABLE_ICONDATABASE
195 global_cppflags += -DENABLE_ICONDATABASE=0
200 -DGCC_GENERATE_TEST_COVERAGE_FILES \
201 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
205 webkitgtk_ldflags += -lgstinterfaces-0.10 -lgstvideo-0.10
210 webkitgtk_cppflags += \
211 -I $(top_builddir)/WebKit/gtk/WebView \
212 -DBUILDING_CAIRO__=1 \
216 WebKit/gtk/WebView/webkit.h \
217 WebKit/gtk/WebView/webkitdefines.h \
218 WebKit/gtk/WebView/webkitnetworkrequest.h \
219 WebKit/gtk/WebView/webkitwebframe.h \
220 WebKit/gtk/WebView/webkitwebview.h
222 webkitgtk_built_sources += \
223 WebKit/gtk/WebView/webkit-marshal.h \
224 WebKit/gtk/WebView/webkit-marshal.cpp
226 webkitgtk_headers += \
227 WebKit/gtk/WebView/webkitprivate.h \
228 WebKit/gtk/WebView/webkitsettings.h \
229 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
230 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
231 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
232 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
233 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
234 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
235 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
237 webkitgtk_sources += \
238 WebKit/gtk/WebView/webkitnetworkrequest.cpp \
239 WebKit/gtk/WebView/webkitprivate.cpp \
240 WebKit/gtk/WebView/webkitsettings.cpp \
241 WebKit/gtk/WebView/webkitwebframe.cpp \
242 WebKit/gtk/WebView/webkitwebview.cpp \
243 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
244 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
245 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
246 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
247 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
248 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
249 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
251 webkitgtk_cleanfiles += \
252 $(top_builddir)/Programs/GtkLauncher \
253 $(top_builddir)/WebKit/gtk/WebKitGtk.pc
255 pkgconfigdir = $(libdir)/pkgconfig
256 pkgconfig_DATA = WebKit/gtk/WebKitGtk.pc
258 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/WebView/webkit-marshal
259 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/WebView/webkit-marshal.list
262 stamp-webkit-marshal.cpp \
263 stamp-webkit-marshal.h
265 WebKit/gtk/WebView/webkit-marshal.cpp: stamp-webkit-marshal.cpp
268 WebKit/gtk/WebView/webkit-marshal.h: stamp-webkit-marshal.h
271 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
272 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
273 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
274 echo timestamp > $(@F)
276 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
277 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
278 echo timestamp > $(@F)
282 # Files that will be cleaned
283 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
284 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
285 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
287 # Include module makefiles
288 include JavaScriptCore/GNUmakefile.am
289 include WebCore/GNUmakefile.am
290 include WebKitTools/GNUmakefile.am
293 # Autogenerated sources
295 $(javascriptcore_built_sources) \
296 $(javascriptcore_built_nosources) \
297 $(webcore_built_sources) \
298 $(webcore_built_nosources) \
299 $(webkitgtk_built_sources) \
300 $(webkitgtk_built_nosources)
302 # Project-wide clean rules
304 $(webkitgtk_cleanfiles) \
305 $(top_builddir)/Programs/DumpRenderTree \
306 $(top_builddir)/Programs/testkjs \
307 $(top_builddir)/Programs/dftables \
310 MAINTAINERCLEANFILES += \
311 $(srcdir)/aconfig.h.in \