blob: f9ad21c334b9653cbbd03a4130d800314228ff98 [file] [log] [blame]
alp@webkit.orgf93619a2007-12-30 03:33:44 +00001# Top-level Makefile rule for automake
2#
3# Variable conventions:
4#
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
alp@webkit.orgf93619a2007-12-30 03:33:44 +00008# _built_sources = files that will be autogenerated by the build system and
9# will be part of the _SOURCES primary
10# _built_nosources = files that are autogenerated but are not part of the
11# _SOURCES primary
12# _cleanfiles = files that will be removed by the clean target
13#
14# Sources, headers, flags, etc... should be added to the respective variables
15# with the above suffix, e.g, webcore-specific sources should go to
alp@webkit.orgf1dbca62008-06-02 16:36:32 +000016# webcore_sources, gtk port API and WebCoreSupport parts to webkitgtk_sources,
17# etc... The only exceptions are the global variables. See Global Variables
18# below.
alp@webkit.orgf93619a2007-12-30 03:33:44 +000019#
20# Global Variables
21#
22# global_cppflags = CPPFLAGS that apply to JSC, WebCore, and to any
23# specific port
mrowe@apple.com84cdb082008-02-05 03:25:59 +000024# global_cflags = CFLAGS that apply to JSC, WebCore, and to
alp@webkit.orgf93619a2007-12-30 03:33:44 +000025# any specific port
mrowe@apple.com84cdb082008-02-05 03:25:59 +000026# global_cxxflags = CXXFLAGS that apply to JSC, WebCore, and to any
27# specific port
alp@webkit.org278f1252007-12-27 06:05:21 +000028
29srcdir = @srcdir@
30VPATH = @srcdir@
31
eric@webkit.orgb6dcd3f2009-11-10 01:12:00 +000032DISTCHECK_CONFIGURE_FLAGS = \
33 --enable-introspection \
34 --enable-gtk-doc
35
alp@webkit.org278f1252007-12-27 06:05:21 +000036# Directory for autogenerated sources
37GENSOURCES := $(top_builddir)/DerivedSources
alp@webkit.orgc04fee22008-04-19 05:16:00 +000038GENPROGRAMS := $(top_builddir)/Programs
alp@webkit.org278f1252007-12-27 06:05:21 +000039
40# Script for creating hash tables
alp@webkit.org4c29a2f2008-11-06 08:58:53 +000041CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
alp@webkit.org278f1252007-12-27 06:05:21 +000042
jmalonzo@webkit.orgc9b4de42009-05-18 11:30:53 +000043# Programs to run the WebKitGtk unit tests
44GTESTER = gtester
45GTESTER_REPORT = gtester-report
46
alp@webkit.org278f1252007-12-27 06:05:21 +000047# Libraries and support components
alp@webkit.org643f3ef2008-06-15 11:46:18 +000048bin_PROGRAMS :=
alp@webkit.org278f1252007-12-27 06:05:21 +000049noinst_PROGRAMS :=
alp@webkit.org9388fc82008-08-10 18:21:21 +000050noinst_HEADERS :=
kov@webkit.org478f5952010-01-05 19:08:10 +000051noinst_LTLIBRARIES :=
alp@webkit.org278f1252007-12-27 06:05:21 +000052lib_LIBRARIES :=
alp@webkit.org278f1252007-12-27 06:05:21 +000053IDL_BINDINGS :=
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +000054TEST_PROGS :=
kov@webkit.org774c23b2009-04-06 19:39:14 +000055POFILES :=
kov@webkit.org774c23b2009-04-06 19:39:14 +000056MOFILES :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000057javascriptcore_h_api :=
58javascriptcore_cppflags:=
59javascriptcore_sources :=
60javascriptcore_built_sources :=
61javascriptcore_built_nosources :=
62javascriptcore_dist :=
63webcore_cppflags :=
64webcore_sources :=
65webcore_libadd :=
66webcore_built_sources :=
67webcore_built_nosources :=
68webcore_dist :=
69webcoregtk_cppflags :=
70webcoregtk_sources :=
71webkitgtk_h_api :=
72webkitgtk_sources :=
73webkitgtk_cppflags :=
74webkitgtk_built_sources :=
75webkitgtk_built_nosources :=
76webkitgtk_cleanfiles :=
alp@webkit.org040ad8b2008-02-04 11:00:43 +000077global_cppflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000078global_cflags :=
79global_cxxflags :=
80corekit_cflags :=
81corekit_cppflags :=
kov@webkit.org60affd12009-11-30 15:13:44 +000082JSCORE_GIRSOURCES :=
kov@webkit.org2a1f73c2009-11-30 19:27:53 +000083WEBKIT_GIRSOURCES :=
84typelibsdir :=
85typelibs_DATA :=
kov@webkit.org30bb9182009-10-26 20:16:59 +000086EXTRA_DIST :=
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +000087BUILT_SOURCES :=
88CLEANFILES :=
89DISTCLEANFILES :=
90MAINTAINERCLEANFILES :=
alp@webkit.org278f1252007-12-27 06:05:21 +000091
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000092# CFLAGS/CXXFLAGS used by WebCore and WebKit
93#
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +000094# gtk+.pc already include glib, cairo, freetype and pango CFLAGS
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000095# Don't include them for now to reduce the noise when compiling
96# $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS) $(FREETYPE_CFLAGS)
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000097corekit_cflags += \
98 -fno-strict-aliasing \
99 $(COVERAGE_CFLAGS) \
100 $(ENCHANT_CFLAGS) \
xan@webkit.org21f12d52009-06-10 13:10:16 +0000101 $(GAIL_CFLAGS) \
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000102 $(GEOCLUE_CFLAGS) \
103 $(GLIB_CFLAGS) \
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000104 $(GSTREAMER_CFLAGS) \
105 $(GTK_CFLAGS) \
106 $(HILDON_CFLAGS) \
107 $(LIBSOUP_CFLAGS) \
108 $(LIBXML_CFLAGS) \
109 $(LIBXSLT_CFLAGS) \
110 $(SQLITE3_CFLAGS) \
111 $(UNICODE_CFLAGS) \
112 $(XT_CFLAGS)
113
114# When building webcore/webkit, we want WebCore/config.h and NOT
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +0000115# JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000116# before JavaScriptCore in the include path.
117corekit_cppflags += \
118 $(global_cppflags) \
119 $(webcore_cppflags) \
120 $(webcoregtk_cppflags) \
121 $(javascriptcore_cppflags)
122
jmalonzo@webkit.org4e086572009-08-29 06:56:49 +0000123# For the Gtk port we want to use XP_UNIX both in X11 and Mac
124if !TARGET_WIN32
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +0000125corekit_cppflags += -DXP_UNIX
126endif
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000127
alp@webkit.org278f1252007-12-27 06:05:21 +0000128# Default compiler flags
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000129global_cflags += \
alp@webkit.org278f1252007-12-27 06:05:21 +0000130 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
131 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
132 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
alp@webkit.org491d9092008-11-03 17:27:55 +0000133 -Wno-unused-parameter -Wno-parentheses \
134 -fno-exceptions
mrowe@apple.com84cdb082008-02-05 03:25:59 +0000135
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000136global_cxxflags += \
137 $(global_cflags) \
alp@webkit.org491d9092008-11-03 17:27:55 +0000138 $(SYMBOL_VISIBILITY_INLINES) \
139 -fno-rtti
alp@webkit.org278f1252007-12-27 06:05:21 +0000140
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000141# -no-undefined required for building DLLs on Windows
142# It breaks the build on other platforms, so we use it conditionally
143if OS_WIN32
xan@webkit.org0a818012009-05-13 13:49:06 +0000144no_undefined = -no-undefined
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000145endif
146
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000147if OS_GNU
xan@webkit.org0a818012009-05-13 13:49:06 +0000148version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000149endif
150
alp@webkit.org36d65492008-01-13 07:33:53 +0000151# Shared libraries
152lib_LTLIBRARIES = \
alp@webkit.org66551a12008-03-02 19:51:26 +0000153 libwebkit-1.0.la
alp@webkit.org36d65492008-01-13 07:33:53 +0000154
155# Convenience libraries
kov@webkit.org478f5952010-01-05 19:08:10 +0000156noinst_LTLIBRARIES += \
157 libJavaScriptCore.la
alp@webkit.org278f1252007-12-27 06:05:21 +0000158
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000159# JavaScriptCore
zecke@webkit.org5d487372008-03-21 18:21:25 +0000160javascriptcore_cppflags += \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000161 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
cwzwarich@webkit.orgb77ab3a2008-11-07 07:41:18 +0000162 -I$(srcdir)/JavaScriptCore/parser \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000163 -I$(srcdir)/JavaScriptCore/wtf \
laszlo.1.gombos@nokia.com7e391fb2009-11-27 04:06:37 +0000164 -I$(srcdir)/JavaScriptCore/wtf/gtk \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000165 -I$(top_builddir)/DerivedSources
166
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000167nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
alp@webkit.org81514942008-04-23 03:14:26 +0000168 $(javascriptcore_built_nosources)
169
170nodist_libJavaScriptCore_la_SOURCES = \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000171 $(javascriptcore_built_sources)
172
alp@webkit.org66551a12008-03-02 19:51:26 +0000173libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
alp@webkit.org36d65492008-01-13 07:33:53 +0000174libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
alp@webkit.org278f1252007-12-27 06:05:21 +0000175
alp@webkit.org36d65492008-01-13 07:33:53 +0000176libJavaScriptCore_la_SOURCES = \
alp@webkit.org278f1252007-12-27 06:05:21 +0000177 $(javascriptcore_sources)
178
xan@webkit.org0a818012009-05-13 13:49:06 +0000179libJavaScriptCore_la_LIBADD = \
180 $(UNICODE_LIBS) \
181 $(GLIB_LIBS) \
182 -lpthread
183
darin@apple.com47e2c232008-02-24 05:42:29 +0000184libJavaScriptCore_la_CXXFLAGS = \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000185 $(global_cxxflags) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000186 $(libJavaScriptCore_la_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000187
darin@apple.com47e2c232008-02-24 05:42:29 +0000188libJavaScriptCore_la_CFLAGS = \
alp@webkit.org2d181c52008-06-08 16:10:16 +0000189 -fstrict-aliasing \
190 -O3 \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000191 $(global_cflags) \
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +0000192 $(GLIB_CFLAGS) \
alp@webkit.org2d181c52008-06-08 16:10:16 +0000193 $(UNICODE_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000194
alp@webkit.orgf49bd1e2008-01-21 23:06:23 +0000195libJavaScriptCore_la_CPPFLAGS = \
196 $(global_cppflags) \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000197 $(javascriptcore_cppflags)
alp@webkit.org278f1252007-12-27 06:05:21 +0000198
kov@webkit.org478f5952010-01-05 19:08:10 +0000199# WebKit
200nodist_EXTRA_libwebkit_1_0_la_SOURCES = \
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000201 $(webcore_built_nosources)
202
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000203nodist_libwebkit_1_0_la_SOURCES = \
kov@webkit.org478f5952010-01-05 19:08:10 +0000204 $(webcore_built_sources) \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000205 $(webkitgtk_built_sources)
206
alp@webkit.org66551a12008-03-02 19:51:26 +0000207libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000208libwebkit_1_0_la_HEADERS = \
209 $(webkitgtk_h_api) \
210 WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.org66551a12008-03-02 19:51:26 +0000211
212libwebkit_1_0_la_SOURCES = \
kov@webkit.org478f5952010-01-05 19:08:10 +0000213 $(webcore_sources) \
214 $(webcoregtk_sources) \
alp@webkit.org66551a12008-03-02 19:51:26 +0000215 $(webkitgtk_sources)
216
217libwebkit_1_0_la_CXXFLAGS = \
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000218 $(global_cxxflags) \
219 $(corekit_cflags)
alp@webkit.org66551a12008-03-02 19:51:26 +0000220
221libwebkit_1_0_la_CFLAGS = \
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000222 $(global_cflags) \
223 $(corekit_cflags)
alp@webkit.org66551a12008-03-02 19:51:26 +0000224
225libwebkit_1_0_la_CPPFLAGS = \
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000226 $(corekit_cppflags) \
227 $(webkitgtk_cppflags) \
228 $(HILDON_CPPFLAGS)
alp@webkit.org66551a12008-03-02 19:51:26 +0000229
xan@webkit.org0a818012009-05-13 13:49:06 +0000230libwebkit_1_0_la_LDFLAGS = \
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000231 -version-info @LIBWEBKITGTK_VERSION@ \
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000232 $(version_script) \
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000233 $(no_undefined)
alp@webkit.org278f1252007-12-27 06:05:21 +0000234
xan@webkit.org0a818012009-05-13 13:49:06 +0000235libwebkit_1_0_la_LIBADD = \
jmalonzo@webkit.org290fe612009-05-23 22:20:31 +0000236 -lpthread \
237 libJavaScriptCore.la \
jmalonzo@webkit.org290fe612009-05-23 22:20:31 +0000238 libWebCoreJS.la \
239 $(webcore_ldflags) \
240 $(CAIRO_LIBS) \
241 $(COVERAGE_LDFLAGS) \
xan@webkit.org0a818012009-05-13 13:49:06 +0000242 $(ENCHANT_LIBS) \
jmalonzo@webkit.org290fe612009-05-23 22:20:31 +0000243 $(FREETYPE_LIBS) \
xan@webkit.org21f12d52009-06-10 13:10:16 +0000244 $(GAIL_LIBS) \
jmalonzo@webkit.org290fe612009-05-23 22:20:31 +0000245 $(GEOCLUE_LIBS) \
246 $(GLIB_LIBS) \
jmalonzo@webkit.org290fe612009-05-23 22:20:31 +0000247 $(GSTREAMER_LIBS) \
248 $(GTK_LIBS) \
249 $(HILDON_LIBS) \
250 $(JPEG_LIBS) \
251 $(LIBSOUP_LIBS) \
252 $(LIBXML_LIBS) \
253 $(LIBXSLT_LIBS) \
254 $(PANGO_LIBS) \
255 $(PNG_LIBS) \
256 $(SQLITE3_LIBS) \
257 $(UNICODE_LIBS) \
258 $(XT_LIBS)
xan@webkit.org0a818012009-05-13 13:49:06 +0000259
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000260#
alp@webkit.org278f1252007-12-27 06:05:21 +0000261# Extra checks and flags
alp@webkit.org278f1252007-12-27 06:05:21 +0000262global_cppflags += \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000263 -DBUILDING_CAIRO__=1 \
alp@webkit.org278f1252007-12-27 06:05:21 +0000264 -DBUILDING_GTK__=1 \
kov@webkit.orgeba9e742009-05-22 18:06:51 +0000265 -DWTF_CHANGES
266
267if USE_ICU_UNICODE
268global_cppflags += \
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +0000269 -DWTF_USE_ICU_UNICODE=1
kov@webkit.orgeba9e742009-05-22 18:06:51 +0000270endif
271
272if USE_GLIB_UNICODE
273# https://bugs.webkit.org/show_bug.cgi?id=15914
274# In patch 1/4 we are compiling a hybrid version of GLib WTF Unicode
275# functionality mixed with ICU-based text codecs and TextBreakIterator.
276# For the transition, introducing an interim HYBRID macro.
277# This macro is required for compiling WTF with GLib Unicode backend,
278# but at the same time keeping ICU dependency for codecs and break iterator.
279# It will be removed with patch 3/4 of the above bug.
280global_cppflags += \
281 -DWTF_USE_GLIB_UNICODE=1 \
282 -DWTF_USE_GLIB_ICU_UNICODE_HYBRID=1
283endif
alp@webkit.org278f1252007-12-27 06:05:21 +0000284
alp@webkit.org27f95c42008-01-12 07:40:52 +0000285if !ENABLE_FAST_MALLOC
286global_cppflags += \
287 -DUSE_SYSTEM_MALLOC
288endif
289
alp@webkit.org278f1252007-12-27 06:05:21 +0000290if !ENABLE_DEBUG
291global_cppflags += -DNDEBUG
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +0000292global_cflags += $(SYMBOL_VISIBILITY)
293
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000294else
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000295webcoregtk_cppflags += \
alp@webkit.org11a31a72007-12-27 23:14:27 +0000296 -DG_DISABLE_DEPRECATED \
297 -DGDK_PIXBUF_DISABLE_DEPRECATED \
298 -DGDK_DISABLE_DEPRECATED \
299 -DGTK_DISABLE_DEPRECATED \
zecke@webkit.org48bc6f42008-01-03 02:07:28 +0000300 -DPANGO_DISABLE_DEPRECATED
301
302# Might be useful in the future
303# -DGDK_MULTIHEAD_SAFE \
304# -DGTK_MULTIHEAD_SAFE
alp@webkit.org278f1252007-12-27 06:05:21 +0000305endif
306
alp@webkit.org278f1252007-12-27 06:05:21 +0000307if ENABLE_COVERAGE
308global_cppflags += \
309 -DGCC_GENERATE_TEST_COVERAGE_FILES \
310 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
311endif
312
alp@webkit.org278f1252007-12-27 06:05:21 +0000313webkitgtk_h_api += \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000314 $(srcdir)/WebKit/gtk/webkit/webkit.h \
315 $(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
316 $(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
317 $(srcdir)/WebKit/gtk/webkit/webkiterror.h \
xan@webkit.org2266a5b2009-09-18 13:53:10 +0000318 $(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000319 $(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
kov@webkit.org6e1ddaf2009-09-07 16:27:29 +0000320 $(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000321 $(srcdir)/WebKit/gtk/webkit/webkitsoupauthdialog.h \
322 $(srcdir)/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
jmalonzo@webkit.org919072f2009-09-02 12:58:59 +0000323 $(srcdir)/WebKit/gtk/webkit/webkitwebdatasource.h \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000324 $(srcdir)/WebKit/gtk/webkit/webkitwebframe.h \
325 $(srcdir)/WebKit/gtk/webkit/webkitwebhistoryitem.h \
326 $(srcdir)/WebKit/gtk/webkit/webkitwebinspector.h \
327 $(srcdir)/WebKit/gtk/webkit/webkitwebnavigationaction.h \
328 $(srcdir)/WebKit/gtk/webkit/webkitwebpolicydecision.h \
jmalonzo@webkit.orgd764ffc2009-09-01 12:19:28 +0000329 $(srcdir)/WebKit/gtk/webkit/webkitwebresource.h \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000330 $(srcdir)/WebKit/gtk/webkit/webkitwebsettings.h \
331 $(srcdir)/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
332 $(srcdir)/WebKit/gtk/webkit/webkitwebview.h \
xan@webkit.org00c0d9a2009-09-06 14:31:13 +0000333 $(srcdir)/WebKit/gtk/webkit/webkitwebdatabase.h \
334 $(srcdir)/WebKit/gtk/webkit/webkitsecurityorigin.h \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000335 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000336
337webkitgtk_built_sources += \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000338 DerivedSources/webkitenumtypes.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000339 DerivedSources/webkitmarshal.cpp \
340 DerivedSources/webkitmarshal.h \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000341 WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000342
alp@webkit.org278f1252007-12-27 06:05:21 +0000343webkitgtk_sources += \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000344 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
345 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
346 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
347 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
jmalonzo@webkit.org919072f2009-09-02 12:58:59 +0000348 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
349 WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000350 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
351 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
352 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
353 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
354 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
355 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
356 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
357 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
358 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
359 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
jmalonzo@webkit.orgd9686da2009-07-29 11:18:16 +0000360 WebKit/gtk/webkit/webkitapplicationcache.cpp \
jmalonzo@webkit.org5f5c6c82009-04-25 09:19:42 +0000361 WebKit/gtk/webkit/webkitdownload.cpp \
362 WebKit/gtk/webkit/webkiterror.cpp \
xan@webkit.org2266a5b2009-09-18 13:53:10 +0000363 WebKit/gtk/webkit/webkithittestresult.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000364 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
kov@webkit.org6e1ddaf2009-09-07 16:27:29 +0000365 WebKit/gtk/webkit/webkitnetworkresponse.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000366 WebKit/gtk/webkit/webkitprivate.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000367 WebKit/gtk/webkit/webkitprivate.h \
xan@webkit.orgaa458732009-03-04 20:57:38 +0000368 WebKit/gtk/webkit/webkitsoupauthdialog.c \
christian@webkit.org56f00692008-06-05 22:50:40 +0000369 WebKit/gtk/webkit/webkitversion.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000370 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
jmalonzo@webkit.org919072f2009-09-02 12:58:59 +0000371 WebKit/gtk/webkit/webkitwebdatasource.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000372 WebKit/gtk/webkit/webkitwebframe.cpp \
373 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
zecke@webkit.orgbcca41d2008-10-29 22:39:18 +0000374 WebKit/gtk/webkit/webkitwebinspector.cpp \
zecke@webkit.org2d40b852008-12-20 03:18:31 +0000375 WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
376 WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
jmalonzo@webkit.orgd764ffc2009-09-01 12:19:28 +0000377 WebKit/gtk/webkit/webkitwebresource.cpp \
xan@webkit.org00c0d9a2009-09-06 14:31:13 +0000378 WebKit/gtk/webkit/webkitwebdatabase.cpp \
379 WebKit/gtk/webkit/webkitsecurityorigin.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000380 WebKit/gtk/webkit/webkitwebsettings.cpp \
zecke@webkit.orgdfb38682008-11-29 00:20:56 +0000381 WebKit/gtk/webkit/webkitwebview.cpp \
atwilson@chromium.org805d2062009-08-18 18:14:26 +0000382 WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
383 WebKit/gtk/webkit/webkitworkers.cpp
alp@webkit.org278f1252007-12-27 06:05:21 +0000384
alp@webkit.org7c869902008-06-08 19:04:23 +0000385webkitgtk_cppflags += \
386 -DBUILDING_WEBKIT \
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +0000387 -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
388 -DDATA_DIR=\"${datadir}\" \
alp@webkit.org7c869902008-06-08 19:04:23 +0000389 -I$(srcdir)/WebKit/gtk \
390 -I$(srcdir)/WebKit/gtk/WebCoreSupport \
391 -I$(srcdir)/WebKit/gtk/webkit \
392 -I$(top_builddir)/WebKit/gtk/webkit
393
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000394webkitgtk_cleanfiles += \
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000395 $(top_builddir)/stamp-webkitmarshal.cpp \
396 $(top_builddir)/stamp-webkitmarshal.h \
397 $(top_builddir)/stamp-webkitenumtypes.cpp \
398 $(top_builddir)/stamp-webkitenumtypes.h \
399 $(top_builddir)/Programs/GtkLauncher \
kov@webkit.org53600a92009-05-28 17:48:25 +0000400 $(top_builddir)/WebKit/gtk/docs/version.xml \
401 $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
alp@webkit.orge359c842008-11-04 04:25:52 +0000402 $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
jmalonzo@webkit.org249f7ce2009-05-18 11:30:41 +0000403 $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
404 $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000405
alp@webkit.org278f1252007-12-27 06:05:21 +0000406pkgconfigdir = $(libdir)/pkgconfig
alp@webkit.org12057322008-02-01 07:01:18 +0000407pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
alp@webkit.org278f1252007-12-27 06:05:21 +0000408
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000409if ENABLE_INTROSPECTION
kov@webkit.org2a1f73c2009-11-30 19:27:53 +0000410JSCORE_GIRSOURCES += JSCore-1.0.gir
411WEBKIT_GIRSOURCES += WebKit-1.0.gir
412
413# JSCore-1.0.gir is handwritten - this is a hack to make the typelib
414# generation work during make dist
415JSCore-1.0.gir: $(srcdir)/WebKit/gtk/JSCore-1.0.gir
416 cp $(srcdir)/WebKit/gtk/JSCore-1.0.gir $(builddir)/
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000417
kov@webkit.org29cccd62009-12-05 15:35:51 +0000418$(WEBKIT_GIRSOURCES): $(JSCORE_GIRSOURCES) $(G_IR_SCANNER) libwebkit-1.0.la
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000419 $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=1.0 \
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000420 --include=GObject-2.0 \
421 --include=Gtk-2.0 \
422 --include=JSCore-1.0 \
423 --include=Soup-2.4 \
424 --library=webkit-1.0 \
425 --libtool="$(LIBTOOL)" \
426 --pkg gobject-2.0 \
427 --pkg gtk+-2.0 \
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000428 --output $@ \
eric@webkit.org8086c252009-11-05 09:51:32 +0000429 --add-include-path $(top_srcdir)/WebKit/gtk \
xan@webkit.orgd62ef702009-09-23 13:25:20 +0000430 -I$(top_srcdir)/WebKit/gtk \
431 -I$(top_builddir)/WebKit/gtk \
432 -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
433 -I$(top_srcdir) \
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000434 $(webkitgtk_h_api)
435
436girdir = $(GIRDIR)
437gir_DATA = $(WEBKIT_GIRSOURCES) $(JSCORE_GIRSOURCES)
438
kov@webkit.org2a1f73c2009-11-30 19:27:53 +0000439typelibsdir += $(GIRTYPELIBDIR)
440typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000441
442%.typelib: %.gir $(G_IR_COMPILER)
eric@webkit.org8086c252009-11-05 09:51:32 +0000443 $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk $< -o $@
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000444
kov@webkit.org2a1f73c2009-11-30 19:27:53 +0000445CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
jmalonzo@webkit.orgea8d0e92009-09-23 13:08:51 +0000446
447endif
448
kov@webkit.org9609af52010-01-05 01:43:47 +0000449EXTRA_DIST += WebKit/gtk/JSCore-1.0.gir
450
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000451WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
zecke@webkit.orgfa530382009-02-26 16:48:58 +0000452WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000453
454$(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
alp@webkit.org278f1252007-12-27 06:05:21 +0000455 @true
456
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000457$(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000458 @true
459
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000460stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000461 $(AM_V_GEN) echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
462 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
alp@webkit.org278f1252007-12-27 06:05:21 +0000463 echo timestamp > $(@F)
464
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000465stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
xan@webkit.orgdde42662009-08-11 10:37:58 +0000466 $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
alp@webkit.org278f1252007-12-27 06:05:21 +0000467 echo timestamp > $(@F)
468
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000469WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
470 @true
jmalonzo@webkit.org46fd3f42008-08-06 12:40:53 +0000471stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000472 $(AM_V_GEN)glib-mkenums \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000473 --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
474 --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
475 --fhead "#include <glib-object.h>\n\n" \
476 --fhead "#include <webkit/webkitdefines.h>\n\n" \
477 --fhead "G_BEGIN_DECLS\n\n" \
478 --ftail "G_END_DECLS\n\n" \
479 --ftail "#endif\n" \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000480 --fprod "#include <webkit/@basename@>\n\n" \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000481 --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
482 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
483 $(webkitgtk_h_api) | \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000484 sed 's,web_kit,webkit,' | \
485 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000486 > xgen-gth \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000487 && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
488 && rm -f xgen-gth \
489 && echo timestamp > $(@F)
490
jmalonzo@webkit.org46fd3f42008-08-06 12:40:53 +0000491DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000492 $(AM_V_GEN)glib-mkenums \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000493 --fhead "#include <config.h>\n" \
494 --fhead "#include <glib-object.h>\n" \
495 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
496 --fhead "extern \"C\" {\n\n" \
497 --fprod "\n/* enumerations from \"@filename@\" */" \
498 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
499 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
500 --vtail " { 0, NULL, NULL }\n};\n\n" \
501 --vtail "GType @enum_name@_get_type(void)\n{\n" \
502 --vtail " static GType type = 0;\n\n" \
503 --vtail " if (!type)\n" \
504 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
505 --vtail " return type;\n}\n\n" \
506 --ftail "}\n" \
507 $(webkitgtk_h_api) | \
508 sed 's,web_kit,webkit,' \
xan@webkit.orgbc59e8d2009-08-27 07:26:02 +0000509 > xgen-gtc \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000510 && cp xgen-gtc $@ \
511 && rm -f xgen-gtc
512
kov@webkit.org30bb9182009-10-26 20:16:59 +0000513# Files that will be distributed
514EXTRA_DIST += \
515 $(srcdir)/gtk-doc.make \
516 WebKit/LICENSE \
517 $(javascriptcore_dist) \
518 $(webcore_dist) \
519 $(srcdir)/autotools/symbols.filter \
520 $(srcdir)/WebKit/gtk/ChangeLog \
521 $(srcdir)/WebKit/gtk/NEWS \
522 $(srcdir)/WebKit/gtk/webkitmarshal.list \
523 $(srcdir)/WebKit/gtk/docs/GNUmakefile.* \
524 $(srcdir)/WebKit/gtk/docs/webkitenvironment.xml \
525 $(srcdir)/WebKit/gtk/docs/webkitgtk-docs.sgml \
526 $(srcdir)/WebKit/gtk/docs/webkitgtk-sections.txt \
527 $(srcdir)/WebKit/gtk/docs/version.xml.in \
528 $(srcdir)/WebKit/gtk/po/* \
kov@webkit.orge43cb102009-12-17 11:33:55 +0000529 $(srcdir)/WebKit/gtk/resources/* \
530 $(srcdir)/WebKit/gtk/tests/resources/*
kov@webkit.org30bb9182009-10-26 20:16:59 +0000531
jmalonzo@webkit.org7ffddf152009-04-25 09:19:20 +0000532# extra resource files
533resourcesdir = ${datadir}/webkit-1.0/resources
534dist_resources_DATA = \
535 $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
536
537# END WEBKIT GTK+
alp@webkit.org278f1252007-12-27 06:05:21 +0000538
alp@webkit.org278f1252007-12-27 06:05:21 +0000539# Include module makefiles
540include JavaScriptCore/GNUmakefile.am
541include WebCore/GNUmakefile.am
542include WebKitTools/GNUmakefile.am
kov@webkit.org774c23b2009-04-06 19:39:14 +0000543include WebKit/gtk/po/GNUmakefile.am
alp@webkit.org278f1252007-12-27 06:05:21 +0000544
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000545# Build unit tests
546noinst_PROGRAMS += $(TEST_PROGS)
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000547
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000548webkit_tests_cflags = \
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000549 -fno-strict-aliasing \
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000550 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
551 -I$(srcdir)/WebKit/gtk \
552 -I$(top_builddir)/WebKit/gtk \
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000553 $(global_cflags) \
554 $(GLIB_CFLAGS) \
christian@webkit.org3a74ebf2009-02-23 11:15:30 +0000555 $(GTK_CFLAGS) \
556 $(LIBSOUP_CFLAGS)
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000557
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000558webkit_tests_ldadd = \
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000559 libwebkit-1.0.la \
christian@webkit.org2c1a0db2009-02-19 21:41:25 +0000560 $(GTK_LIBS) \
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000561 $(GLIB_LIBS) \
562 $(LIBSOUP_LIBS)
563
jmalonzo@webkit.orgb6766c52009-05-18 11:30:25 +0000564webkit_tests_ldflags = \
565 -no-install \
566 -no-fast-install
567
kov@webkit.orgb6934942009-05-29 14:48:33 +0000568TEST_PROGS += Programs/unittests/testhttpbackend \
kov@webkit.org4ece5912009-06-20 13:20:23 +0000569 Programs/unittests/testloading \
kov@webkit.org14462f82009-12-07 14:35:30 +0000570 Programs/unittests/testmimehandling \
kov@webkit.org74a9b762009-06-11 02:48:29 +0000571 Programs/unittests/testnetworkrequest \
kov@webkit.org6e1ddaf2009-09-07 16:27:29 +0000572 Programs/unittests/testnetworkresponse \
kov@webkit.orgb6934942009-05-29 14:48:33 +0000573 Programs/unittests/testwebframe \
jmalonzo@webkit.orga4ae29c2009-03-20 20:23:12 +0000574 Programs/unittests/testwebbackforwardlist \
christian@webkit.org278d4cd2009-04-01 19:48:20 +0000575 Programs/unittests/testwebhistoryitem \
kov@webkit.org6f367912009-08-28 15:24:15 +0000576 Programs/unittests/testwindow \
xan@webkit.org5151f5b2009-05-28 18:20:01 +0000577 Programs/unittests/testdownload \
jmalonzo@webkit.org54cd7bc2009-07-03 09:57:39 +0000578 Programs/unittests/testatk \
xan@webkit.orgfd4dd8e2009-09-18 13:53:22 +0000579 Programs/unittests/testhittestresult \
jmalonzo@webkit.orgd764ffc2009-09-01 12:19:28 +0000580 Programs/unittests/testwebsettings \
jmalonzo@webkit.org77693272009-09-02 13:06:04 +0000581 Programs/unittests/testwebresource \
eric@webkit.org4f864b92009-10-01 09:02:30 +0000582 Programs/unittests/testwebdatasource \
kov@webkit.org71924f92009-12-10 14:29:59 +0000583 Programs/unittests/testwebview \
eric@webkit.org4f864b92009-10-01 09:02:30 +0000584 Programs/unittests/testkeyevents
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000585
586# Add additional tests here
kov@webkit.orgb6934942009-05-29 14:48:33 +0000587Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
588Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
589Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
590Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
591
kov@webkit.org4ece5912009-06-20 13:20:23 +0000592Programs_unittests_testloading_SOURCES = WebKit/gtk/tests/testloading.c
593Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
594Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
595Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
596
kov@webkit.org14462f82009-12-07 14:35:30 +0000597Programs_unittests_testmimehandling_SOURCES = WebKit/gtk/tests/testmimehandling.c
598Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
599Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
600Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
601
kov@webkit.org74a9b762009-06-11 02:48:29 +0000602Programs_unittests_testnetworkrequest_SOURCES = WebKit/gtk/tests/testnetworkrequest.c
603Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
604Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
605Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
606
kov@webkit.org6e1ddaf2009-09-07 16:27:29 +0000607Programs_unittests_testnetworkresponse_SOURCES = WebKit/gtk/tests/testnetworkresponse.c
608Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
609Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
610Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
611
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000612Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
613Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
614Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
jmalonzo@webkit.orgb6766c52009-05-18 11:30:25 +0000615Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000616
617Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
618Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
619Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
jmalonzo@webkit.orgb6766c52009-05-18 11:30:25 +0000620Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000621
jmalonzo@webkit.orga4ae29c2009-03-20 20:23:12 +0000622Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
623Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
624Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
jmalonzo@webkit.orgb6766c52009-05-18 11:30:25 +0000625Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
jmalonzo@webkit.orga4ae29c2009-03-20 20:23:12 +0000626
kov@webkit.org6f367912009-08-28 15:24:15 +0000627Programs_unittests_testwindow_SOURCES = WebKit/gtk/tests/testwindow.c
628Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
629Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
630Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
631
christian@webkit.org278d4cd2009-04-01 19:48:20 +0000632Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
633Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
634Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
jmalonzo@webkit.orgb6766c52009-05-18 11:30:25 +0000635Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
jmalonzo@webkit.orga4ae29c2009-03-20 20:23:12 +0000636
xan@webkit.org5151f5b2009-05-28 18:20:01 +0000637Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
638Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
639Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
640Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
641
jmalonzo@webkit.org54cd7bc2009-07-03 09:57:39 +0000642Programs_unittests_testwebsettings_SOURCES = WebKit/gtk/tests/testwebsettings.c
643Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
644Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
645Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
646
jmalonzo@webkit.orgd764ffc2009-09-01 12:19:28 +0000647Programs_unittests_testwebresource_SOURCES = WebKit/gtk/tests/testwebresource.c
648Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
649Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
650
jmalonzo@webkit.org77693272009-09-02 13:06:04 +0000651Programs_unittests_testwebdatasource_SOURCES = WebKit/gtk/tests/testwebdatasource.c
652Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
653Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
654
kov@webkit.org71924f92009-12-10 14:29:59 +0000655Programs_unittests_testwebview_SOURCES = WebKit/gtk/tests/testwebview.c
656Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
657Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
658Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
659
xan@webkit.orgfd4dd8e2009-09-18 13:53:22 +0000660Programs_unittests_testhittestresult_SOURCES = WebKit/gtk/tests/testhittestresult.c
661Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
662Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
663
eric@webkit.org4f864b92009-10-01 09:02:30 +0000664Programs_unittests_testkeyevents_SOURCES = WebKit/gtk/tests/testkeyevents.c
665Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
666Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
667Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
668
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000669# Autogenerated sources
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000670BUILT_SOURCES += \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000671 $(javascriptcore_built_sources) \
672 $(javascriptcore_built_nosources) \
673 $(webcore_built_sources) \
674 $(webcore_built_nosources) \
675 $(webkitgtk_built_sources) \
676 $(webkitgtk_built_nosources)
677
alp@webkit.org278f1252007-12-27 06:05:21 +0000678# Project-wide clean rules
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000679# Files that will be cleaned
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000680CLEANFILES += \
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000681 $(BUILT_SOURCES) \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000682 $(webkitgtk_cleanfiles)
alp@webkit.org278f1252007-12-27 06:05:21 +0000683
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000684DISTCLEANFILES += \
685 $(CLEANFILES) \
686 $(builddir)/doltcompile \
687 $(builddir)/doltlibtool
688
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000689MAINTAINERCLEANFILES += \
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000690 $(CLEANFILES) \
691 $(builddir)/doltcompile \
692 $(builddir)/doltlibtool \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000693 $(srcdir)/aconfig.h.in \
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000694 $(srcdir)/autotools/config.* \
695 $(srcdir)/autotools/compile \
696 $(srcdir)/autotools/depcomp \
697 $(srcdir)/autotools/install-sh \
698 $(srcdir)/autotools/missing \
699 $(srcdir)/configure \
700 $(srcdir)/GNUmakefile.in \
701 $(srcdir)/INSTALL \
702 $(srcdir)/README \
703 $(top_builddir)/config.*
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000704
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000705# Older automake versions (1.7) place Plo files in a different place so we need
706# to create the output directory manually.
kov@webkit.org774c23b2009-04-06 19:39:14 +0000707all-local: stamp-po
708 $(mkdir_p) $(top_builddir)/$(DEPDIR)/DerivedSources
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000709
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000710# remove built sources and program directories
711clean-local:
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000712 -rm -rf $(GENPROGRAMS)
713
xan@webkit.org233d51e2009-03-14 20:22:13 +0000714maintainer-clean-local: distclean-local
715
716distclean-local:
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000717 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
kov@webkit.org774c23b2009-04-06 19:39:14 +0000718
719install-data-local: po-install-data-local
720
721installdirs-data-local: po-installdirs-data-local
722
jmalonzo@webkit.org7ffddf152009-04-25 09:19:20 +0000723uninstall-local: po-uninstall-local
jmalonzo@webkit.orgc9b4de42009-05-18 11:30:53 +0000724
725# Run all tests in cwd
726# FIXME: we should run this under xvfb
727test: $(TEST_PROGS)
728 $(GTESTER) --verbose $(TEST_PROGS);
729
730# test-report: run tests in cwd and generate report
731# full-report: run tests in cwd with -m perf and -m slow and generate report
732# perf-report: run tests in cwd with -m perf and generate report
733test-report full-report perf-report: $(TEST_PROGS)
734 @ case $@ in \
735 test-report) test_options="-k";; \
736 full-report) test_options="-k -m=perf";; \
737 perf-report) test_options="-k -m=perf -m=slow";; \
738 esac ; \
739 $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
740 $(GTESTER_REPORT) test-report.xml > test-report.html ;
741
742.PHONY: test test-report perf-report full-report
743check-local: test