blob: 13cf5eefa1ab8bc2994cad6be31486ca09b46583 [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
32# Directory for autogenerated sources
33GENSOURCES := $(top_builddir)/DerivedSources
alp@webkit.orgc04fee22008-04-19 05:16:00 +000034GENPROGRAMS := $(top_builddir)/Programs
alp@webkit.org278f1252007-12-27 06:05:21 +000035
36# Script for creating hash tables
alp@webkit.org4c29a2f2008-11-06 08:58:53 +000037CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
alp@webkit.org278f1252007-12-27 06:05:21 +000038
39# Libraries and support components
alp@webkit.org643f3ef2008-06-15 11:46:18 +000040bin_PROGRAMS :=
41
alp@webkit.org278f1252007-12-27 06:05:21 +000042noinst_PROGRAMS :=
43
alp@webkit.org9388fc82008-08-10 18:21:21 +000044noinst_HEADERS :=
45
alp@webkit.org278f1252007-12-27 06:05:21 +000046lib_LIBRARIES :=
47
48IDL_BINDINGS :=
49
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +000050TEST_PROGS :=
51
alp@webkit.org278f1252007-12-27 06:05:21 +000052# Global flags to CPP
alp@webkit.org040ad8b2008-02-04 11:00:43 +000053global_cppflags :=
alp@webkit.org278f1252007-12-27 06:05:21 +000054
55global_cppflags += \
alp@webkit.orgd28cae02008-03-10 00:49:15 +000056 -DWTF_USE_ICU_UNICODE=1
57
alp@webkit.org278f1252007-12-27 06:05:21 +000058# Default compiler flags
59global_cflags := \
60 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
61 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
62 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
alp@webkit.org491d9092008-11-03 17:27:55 +000063 -Wno-unused-parameter -Wno-parentheses \
64 -fno-exceptions
mrowe@apple.com84cdb082008-02-05 03:25:59 +000065
66global_cxxflags := \
alp@webkit.org491d9092008-11-03 17:27:55 +000067 $(SYMBOL_VISIBILITY_INLINES) \
68 -fno-rtti
alp@webkit.org278f1252007-12-27 06:05:21 +000069
alp@webkit.org36d65492008-01-13 07:33:53 +000070if !ENABLE_DEBUG
71global_cflags += \
alp@webkit.orgd31a7362008-01-15 21:47:25 +000072 $(SYMBOL_VISIBILITY)
alp@webkit.org36d65492008-01-13 07:33:53 +000073endif
74
alp@webkit.org15ef3c42008-06-03 00:30:19 +000075# -no-undefined required for building DLLs on Windows
76# It breaks the build on other platforms, so we use it conditionally
77if OS_WIN32
78no_undefined = -no-undefined
79endif
80
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +000081if OS_GNU
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +000082version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +000083endif
84
alp@webkit.org36d65492008-01-13 07:33:53 +000085# Shared libraries
86lib_LTLIBRARIES = \
alp@webkit.org66551a12008-03-02 19:51:26 +000087 libwebkit-1.0.la
alp@webkit.org36d65492008-01-13 07:33:53 +000088
89# Convenience libraries
90noinst_LTLIBRARIES = \
alp@webkit.org66551a12008-03-02 19:51:26 +000091 libJavaScriptCore.la \
92 libWebCore.la
alp@webkit.org278f1252007-12-27 06:05:21 +000093
alp@webkit.orgf93619a2007-12-30 03:33:44 +000094#
alp@webkit.org278f1252007-12-27 06:05:21 +000095# JavaScriptCore
alp@webkit.org278f1252007-12-27 06:05:21 +000096javascriptcore_h_api :=
97javascriptcore_cppflags:=
98javascriptcore_sources :=
alp@webkit.org040ad8b2008-02-04 11:00:43 +000099javascriptcore_built_sources :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000100javascriptcore_built_nosources :=
alp@webkit.org9388fc82008-08-10 18:21:21 +0000101javascriptcore_dist :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000102
zecke@webkit.org5d487372008-03-21 18:21:25 +0000103javascriptcore_cppflags += \
104 -I$(srcdir)/JavaScriptCore \
105 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
cwzwarich@webkit.orgb77ab3a2008-11-07 07:41:18 +0000106 -I$(srcdir)/JavaScriptCore/parser \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000107 -I$(srcdir)/JavaScriptCore/wtf \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000108 -I$(top_builddir)/DerivedSources
109
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000110# The variables above are already included below so no need to touch
111# these variables unless you really have to
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000112nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
alp@webkit.org81514942008-04-23 03:14:26 +0000113 $(javascriptcore_built_nosources)
114
115nodist_libJavaScriptCore_la_SOURCES = \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000116 $(javascriptcore_built_sources)
117
alp@webkit.org66551a12008-03-02 19:51:26 +0000118libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
alp@webkit.org36d65492008-01-13 07:33:53 +0000119libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
alp@webkit.org278f1252007-12-27 06:05:21 +0000120
alp@webkit.org36d65492008-01-13 07:33:53 +0000121libJavaScriptCore_la_SOURCES = \
alp@webkit.org278f1252007-12-27 06:05:21 +0000122 $(javascriptcore_sources)
123
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000124libJavaScriptCore_la_LIBADD = \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000125 $(UNICODE_LIBS) \
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +0000126 $(GLIB_LIBS) \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000127 -lpthread
alp@webkit.org278f1252007-12-27 06:05:21 +0000128
darin@apple.com47e2c232008-02-24 05:42:29 +0000129libJavaScriptCore_la_CXXFLAGS = \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000130 $(global_cxxflags) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000131 $(libJavaScriptCore_la_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000132
darin@apple.com47e2c232008-02-24 05:42:29 +0000133libJavaScriptCore_la_CFLAGS = \
alp@webkit.org2d181c52008-06-08 16:10:16 +0000134 -fstrict-aliasing \
135 -O3 \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000136 $(global_cflags) \
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +0000137 $(GLIB_CFLAGS) \
alp@webkit.org2d181c52008-06-08 16:10:16 +0000138 $(UNICODE_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000139
alp@webkit.orgf49bd1e2008-01-21 23:06:23 +0000140libJavaScriptCore_la_CPPFLAGS = \
141 $(global_cppflags) \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000142 $(javascriptcore_cppflags)
alp@webkit.org278f1252007-12-27 06:05:21 +0000143
alp@webkit.org278f1252007-12-27 06:05:21 +0000144#
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000145# WebCore
146webcore_cppflags :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000147webcore_sources :=
alp@webkit.org66551a12008-03-02 19:51:26 +0000148webcore_libadd :=
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000149webcore_built_sources :=
150webcore_built_nosources :=
alp@webkit.org9388fc82008-08-10 18:21:21 +0000151webcore_dist :=
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000152webcoregtk_cppflags :=
153webcoregtk_sources :=
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000154
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000155nodist_EXTRA_libWebCore_la_SOURCES = \
156 $(webcore_built_nosources)
157
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000158nodist_libWebCore_la_SOURCES = \
159 $(webcore_built_sources)
alp@webkit.org278f1252007-12-27 06:05:21 +0000160
alp@webkit.org66551a12008-03-02 19:51:26 +0000161libWebCore_la_SOURCES = \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000162 $(webcore_sources) \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000163 $(webcoregtk_sources)
alp@webkit.org278f1252007-12-27 06:05:21 +0000164
alp@webkit.org66551a12008-03-02 19:51:26 +0000165libWebCore_la_CXXFLAGS = \
mrowe@apple.com84cdb082008-02-05 03:25:59 +0000166 $(global_cxxflags) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000167 $(libWebCore_la_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000168
alp@webkit.org66551a12008-03-02 19:51:26 +0000169libWebCore_la_CFLAGS = \
alp@webkit.org36d65492008-01-13 07:33:53 +0000170 -fno-strict-aliasing \
alp@webkit.org278f1252007-12-27 06:05:21 +0000171 $(global_cflags) \
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +0000172 $(GLIB_CFLAGS) \
alp@webkit.org478185d2008-03-10 02:44:33 +0000173 $(UNICODE_CFLAGS) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000174 $(LIBXML_CFLAGS) \
175 $(CAIRO_CFLAGS) \
176 $(PANGO_CFLAGS) \
177 $(GTK_CFLAGS) \
alp@webkit.org7ba3bb92008-08-05 21:33:35 +0000178 $(XT_CFLAGS) \
alp@webkit.orgb51d08f2008-03-11 23:06:38 +0000179 $(LIBSOUP_CFLAGS) \
alp@webkit.org8cfd6ab2008-05-19 23:06:49 +0000180 $(FREETYPE_CFLAGS) \
alp@webkit.org278f1252007-12-27 06:05:21 +0000181 $(SQLITE3_CFLAGS) \
182 $(GSTREAMER_CFLAGS) \
183 $(LIBXSLT_CFLAGS) \
alp@webkit.org4ad34cb2008-02-12 21:04:50 +0000184 $(COVERAGE_CFLAGS) \
zecke@webkit.orgb99bb802009-01-31 03:51:00 +0000185 $(HILDON_CFLAGS) \
xan@webkit.orgaa458732009-03-04 20:57:38 +0000186 $(GEOCLUE_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000187
alp@webkit.org66551a12008-03-02 19:51:26 +0000188libWebCore_la_CPPFLAGS = \
alp@webkit.org278f1252007-12-27 06:05:21 +0000189 $(global_cppflags) \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000190 $(webcore_cppflags) \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000191 $(javascriptcore_cppflags) \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000192 $(webcoregtk_cppflags) \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000193 $(HILDON_CPPFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000194
alp@webkit.org66551a12008-03-02 19:51:26 +0000195libWebCore_la_LIBADD = \
196 libJavaScriptCore.la \
alp@webkit.orge1244662008-10-07 18:28:43 +0000197 libWebCoreJS.la \
alp@webkit.org66551a12008-03-02 19:51:26 +0000198 $(webcore_libadd) \
jmalonzo@webkit.org06d65c102009-01-31 09:36:45 +0000199 $(GLIB_LIBS) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000200 $(LIBXML_LIBS) \
201 $(CAIRO_LIBS) \
202 $(PANGO_LIBS) \
203 $(GTK_LIBS) \
alp@webkit.org7ba3bb92008-08-05 21:33:35 +0000204 $(XT_LIBS) \
alp@webkit.orgb51d08f2008-03-11 23:06:38 +0000205 $(LIBSOUP_LIBS) \
alp@webkit.org8cfd6ab2008-05-19 23:06:49 +0000206 $(FREETYPE_LIBS) \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000207 $(UNICODE_LIBS) \
alp@webkit.org278f1252007-12-27 06:05:21 +0000208 $(SQLITE3_LIBS) \
209 $(GSTREAMER_LIBS) \
210 $(LIBXSLT_LIBS) \
alp@webkit.org4ad34cb2008-02-12 21:04:50 +0000211 $(HILDON_LIBS) \
jmalonzo@webkit.org20c9f4b2008-07-27 06:00:36 +0000212 $(JPEG_LIBS) \
zecke@webkit.orga05d5962008-10-29 20:19:06 +0000213 $(PNG_LIBS) \
zecke@webkit.orgb99bb802009-01-31 03:51:00 +0000214 $(GEOCLUE_LIBS) \
jmalonzo@webkit.org20c9f4b2008-07-27 06:00:36 +0000215 -lpthread
alp@webkit.orgc53b43d2008-02-21 19:43:44 +0000216
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000217# WebKit
218webkitgtk_h_api :=
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000219webkitgtk_sources :=
220webkitgtk_cppflags :=
221webkitgtk_built_sources :=
222webkitgtk_built_nosources :=
223webkitgtk_cleanfiles :=
224
225nodist_libwebkit_1_0_la_SOURCES = \
226 $(webkitgtk_built_sources)
227
alp@webkit.org66551a12008-03-02 19:51:26 +0000228libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000229libwebkit_1_0_la_HEADERS = \
230 $(webkitgtk_h_api) \
231 WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.org66551a12008-03-02 19:51:26 +0000232
233libwebkit_1_0_la_SOURCES = \
alp@webkit.org66551a12008-03-02 19:51:26 +0000234 $(webkitgtk_sources)
235
236libwebkit_1_0_la_CXXFLAGS = \
237 $(libWebCore_la_CXXFLAGS)
238
239libwebkit_1_0_la_CFLAGS = \
xan@webkit.orgaa458732009-03-04 20:57:38 +0000240 $(libWebCore_la_CFLAGS) \
241 $(GNOMEKEYRING_CFLAGS)
alp@webkit.org66551a12008-03-02 19:51:26 +0000242
243libwebkit_1_0_la_CPPFLAGS = \
alp@webkit.org7c869902008-06-08 19:04:23 +0000244 $(libWebCore_la_CPPFLAGS) \
245 $(webkitgtk_cppflags)
alp@webkit.org66551a12008-03-02 19:51:26 +0000246
247libwebkit_1_0_la_LDFLAGS = \
alp@webkit.orgc53b43d2008-02-21 19:43:44 +0000248 $(COVERAGE_LDFLAGS) \
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000249 -version-info @LIBWEBKITGTK_VERSION@ \
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000250 $(version_script) \
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000251 $(no_undefined)
alp@webkit.org278f1252007-12-27 06:05:21 +0000252
alp@webkit.org66551a12008-03-02 19:51:26 +0000253libwebkit_1_0_la_LIBADD = \
xan@webkit.orgaa458732009-03-04 20:57:38 +0000254 libWebCore.la \
255 $(GNOMEKEYRING_LIBS)
alp@webkit.org66551a12008-03-02 19:51:26 +0000256
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000257#
alp@webkit.org278f1252007-12-27 06:05:21 +0000258# Extra checks and flags
alp@webkit.org278f1252007-12-27 06:05:21 +0000259global_cppflags += \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000260 -DBUILDING_CAIRO__=1 \
alp@webkit.org278f1252007-12-27 06:05:21 +0000261 -DBUILDING_GTK__=1 \
alp@webkit.org278f1252007-12-27 06:05:21 +0000262 -DWTF_CHANGES
263
alp@webkit.org27f95c42008-01-12 07:40:52 +0000264if !ENABLE_FAST_MALLOC
265global_cppflags += \
266 -DUSE_SYSTEM_MALLOC
267endif
268
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000269if TARGET_X11
270global_cppflags += -DXP_UNIX
271endif
272
alp@webkit.org278f1252007-12-27 06:05:21 +0000273if !ENABLE_DEBUG
274global_cppflags += -DNDEBUG
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000275else
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000276webcoregtk_cppflags += \
alp@webkit.org11a31a72007-12-27 23:14:27 +0000277 -DG_DISABLE_DEPRECATED \
278 -DGDK_PIXBUF_DISABLE_DEPRECATED \
279 -DGDK_DISABLE_DEPRECATED \
280 -DGTK_DISABLE_DEPRECATED \
zecke@webkit.org48bc6f42008-01-03 02:07:28 +0000281 -DPANGO_DISABLE_DEPRECATED
282
283# Might be useful in the future
284# -DGDK_MULTIHEAD_SAFE \
285# -DGTK_MULTIHEAD_SAFE
alp@webkit.org278f1252007-12-27 06:05:21 +0000286endif
287
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000288if !ENABLE_DATABASE
289global_cppflags += -DENABLE_DATABASE=0
alp@webkit.org278f1252007-12-27 06:05:21 +0000290endif
291
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000292if !ENABLE_ICONDATABASE
293global_cppflags += -DENABLE_ICONDATABASE=0
alp@webkit.org278f1252007-12-27 06:05:21 +0000294endif
295
296if ENABLE_COVERAGE
297global_cppflags += \
298 -DGCC_GENERATE_TEST_COVERAGE_FILES \
299 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
300endif
301
302if ENABLE_VIDEO
alp@webkit.org66551a12008-03-02 19:51:26 +0000303webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
alp@webkit.org278f1252007-12-27 06:05:21 +0000304endif
305
alp@webkit.org278f1252007-12-27 06:05:21 +0000306webkitgtk_h_api += \
alp@webkit.org94c06552008-01-31 23:51:53 +0000307 WebKit/gtk/webkit/webkit.h \
308 WebKit/gtk/webkit/webkitdefines.h \
kov@webkit.org7d05c792009-03-03 19:48:22 +0000309 WebKit/gtk/webkit/webkitdownload.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000310 WebKit/gtk/webkit/webkitnetworkrequest.h \
xan@webkit.orgaa458732009-03-04 20:57:38 +0000311 WebKit/gtk/webkit/webkitsoupauthdialog.h \
christian@webkit.org56f00692008-06-05 22:50:40 +0000312 WebKit/gtk/webkit/webkitversion.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000313 WebKit/gtk/webkit/webkitwebbackforwardlist.h \
314 WebKit/gtk/webkit/webkitwebframe.h \
315 WebKit/gtk/webkit/webkitwebhistoryitem.h \
zecke@webkit.orgbcca41d2008-10-29 22:39:18 +0000316 WebKit/gtk/webkit/webkitwebinspector.h \
zecke@webkit.org2d40b852008-12-20 03:18:31 +0000317 WebKit/gtk/webkit/webkitwebnavigationaction.h \
318 WebKit/gtk/webkit/webkitwebpolicydecision.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000319 WebKit/gtk/webkit/webkitwebsettings.h \
zecke@webkit.orgdfb38682008-11-29 00:20:56 +0000320 WebKit/gtk/webkit/webkitwebwindowfeatures.h \
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000321 WebKit/gtk/webkit/webkitwebview.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000322
323webkitgtk_built_sources += \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000324 DerivedSources/webkitenumtypes.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000325 DerivedSources/webkitmarshal.cpp \
326 DerivedSources/webkitmarshal.h \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000327 WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000328
alp@webkit.org278f1252007-12-27 06:05:21 +0000329webkitgtk_sources += \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000330 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
331 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
332 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
333 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
334 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
335 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
336 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
337 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
338 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
339 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
340 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
341 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
342 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
343 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000344 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
345 WebKit/gtk/webkit/webkitprivate.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000346 WebKit/gtk/webkit/webkitprivate.h \
xan@webkit.orgaa458732009-03-04 20:57:38 +0000347 WebKit/gtk/webkit/webkitsoupauthdialog.c \
christian@webkit.org56f00692008-06-05 22:50:40 +0000348 WebKit/gtk/webkit/webkitversion.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000349 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
350 WebKit/gtk/webkit/webkitwebframe.cpp \
351 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
zecke@webkit.orgbcca41d2008-10-29 22:39:18 +0000352 WebKit/gtk/webkit/webkitwebinspector.cpp \
zecke@webkit.org2d40b852008-12-20 03:18:31 +0000353 WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
354 WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000355 WebKit/gtk/webkit/webkitwebsettings.cpp \
kov@webkit.org7d05c792009-03-03 19:48:22 +0000356 WebKit/gtk/webkit/webkitdownload.cpp \
zecke@webkit.orgdfb38682008-11-29 00:20:56 +0000357 WebKit/gtk/webkit/webkitwebview.cpp \
358 WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
alp@webkit.org278f1252007-12-27 06:05:21 +0000359
alp@webkit.org7c869902008-06-08 19:04:23 +0000360webkitgtk_cppflags += \
361 -DBUILDING_WEBKIT \
362 -I$(srcdir)/WebKit/gtk \
363 -I$(srcdir)/WebKit/gtk/WebCoreSupport \
364 -I$(srcdir)/WebKit/gtk/webkit \
365 -I$(top_builddir)/WebKit/gtk/webkit
366
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000367webkitgtk_cleanfiles += \
368 $(top_builddir)/Programs/GtkLauncher \
alp@webkit.orge359c842008-11-04 04:25:52 +0000369 $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
370 $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000371
alp@webkit.org278f1252007-12-27 06:05:21 +0000372pkgconfigdir = $(libdir)/pkgconfig
alp@webkit.org12057322008-02-01 07:01:18 +0000373pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
alp@webkit.org278f1252007-12-27 06:05:21 +0000374
jmalonzo@webkit.orgb5895212008-06-18 17:16:12 +0000375stamp_files := \
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000376 stamp-webkitmarshal.cpp \
377 stamp-webkitmarshal.h \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000378 stamp-webkitenumtypes.cpp \
379 stamp-webkitenumtypes.h
380
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000381WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
zecke@webkit.orgfa530382009-02-26 16:48:58 +0000382WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000383
384$(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
alp@webkit.org278f1252007-12-27 06:05:21 +0000385 @true
386
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000387$(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000388 @true
389
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000390stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
alp@webkit.org278f1252007-12-27 06:05:21 +0000391 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000392 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
alp@webkit.org278f1252007-12-27 06:05:21 +0000393 echo timestamp > $(@F)
394
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000395stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000396 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
alp@webkit.org278f1252007-12-27 06:05:21 +0000397 echo timestamp > $(@F)
398
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000399WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
400 @true
jmalonzo@webkit.org46fd3f42008-08-06 12:40:53 +0000401stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000402 (cd $(srcdir) \
403 && glib-mkenums \
404 --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
405 --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
406 --fhead "#include <glib-object.h>\n\n" \
407 --fhead "#include <webkit/webkitdefines.h>\n\n" \
408 --fhead "G_BEGIN_DECLS\n\n" \
409 --ftail "G_END_DECLS\n\n" \
410 --ftail "#endif\n" \
411 --fprod "#include <@filename@>\n\n" \
412 --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
413 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
414 $(webkitgtk_h_api) | \
415 sed 's,WebKit/gtk/,,' | \
416 sed 's,web_kit,webkit,' | \
417 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
418 ) > xgen-gth \
419 && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
420 && rm -f xgen-gth \
421 && echo timestamp > $(@F)
422
jmalonzo@webkit.org46fd3f42008-08-06 12:40:53 +0000423DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000424 (cd $(srcdir) \
425 && glib-mkenums \
426 --fhead "#include <config.h>\n" \
427 --fhead "#include <glib-object.h>\n" \
428 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
429 --fhead "extern \"C\" {\n\n" \
430 --fprod "\n/* enumerations from \"@filename@\" */" \
431 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
432 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
433 --vtail " { 0, NULL, NULL }\n};\n\n" \
434 --vtail "GType @enum_name@_get_type(void)\n{\n" \
435 --vtail " static GType type = 0;\n\n" \
436 --vtail " if (!type)\n" \
437 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
438 --vtail " return type;\n}\n\n" \
439 --ftail "}\n" \
440 $(webkitgtk_h_api) | \
441 sed 's,web_kit,webkit,' \
442 ) > xgen-gtc \
443 && cp xgen-gtc $@ \
444 && rm -f xgen-gtc
445
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000446# END WEBKIT GTK+
alp@webkit.org9388fc82008-08-10 18:21:21 +0000447#
448# Files that will be distributed
449EXTRA_DIST = \
alp@webkit.org2ab36952008-10-28 12:53:51 +0000450 WebKit/LICENSE \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000451 $(javascriptcore_dist) \
alp@webkit.org97d8c102008-08-29 05:09:39 +0000452 $(webcore_dist) \
kov@webkit.org9551eb62009-02-28 03:44:42 +0000453 $(srcdir)/autotools/symbols.filter \
kov@webkit.org485273b2009-03-02 14:56:41 +0000454 $(srcdir)/WebKit/gtk/ChangeLog \
455 $(srcdir)/WebKit/gtk/NEWS \
kov@webkit.org9551eb62009-02-28 03:44:42 +0000456 $(srcdir)/WebKit/gtk/webkitmarshal.list
alp@webkit.org278f1252007-12-27 06:05:21 +0000457
458# Files that will be cleaned
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000459MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
alp@webkit.orge359c842008-11-04 04:25:52 +0000460DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
alp@webkit.org278f1252007-12-27 06:05:21 +0000461CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
462
463# Include module makefiles
464include JavaScriptCore/GNUmakefile.am
465include WebCore/GNUmakefile.am
466include WebKitTools/GNUmakefile.am
467
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000468# Build unit tests
469noinst_PROGRAMS += $(TEST_PROGS)
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000470
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000471webkit_tests_cflags = \
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000472 -fno-strict-aliasing \
473 -O2 \
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000474 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
475 -I$(srcdir)/WebKit/gtk \
476 -I$(top_builddir)/WebKit/gtk \
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000477 $(global_cflags) \
478 $(GLIB_CFLAGS) \
christian@webkit.org3a74ebf2009-02-23 11:15:30 +0000479 $(GTK_CFLAGS) \
480 $(LIBSOUP_CFLAGS)
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000481
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000482webkit_tests_ldadd = \
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000483 libwebkit-1.0.la \
christian@webkit.org2c1a0db2009-02-19 21:41:25 +0000484 $(GTK_LIBS) \
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000485 $(GLIB_LIBS) \
486 $(LIBSOUP_LIBS)
487
488TEST_PROGS += Programs/unittests/testwebframe \
jmalonzo@webkit.orga4ae29c2009-03-20 20:23:12 +0000489 Programs/unittests/testwebbackforwardlist \
490 Programs/unittests/testwebhistoryitem
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +0000491
492# Add additional tests here
493Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
494Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
495Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
496
497Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
498Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
499Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
zecke@webkit.orgc31c5112008-12-07 19:16:17 +0000500
jmalonzo@webkit.orga4ae29c2009-03-20 20:23:12 +0000501Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
502Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
503Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
504
505
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000506# Autogenerated sources
alp@webkit.orge1244662008-10-07 18:28:43 +0000507BUILT_SOURCES := \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000508 $(javascriptcore_built_sources) \
509 $(javascriptcore_built_nosources) \
510 $(webcore_built_sources) \
511 $(webcore_built_nosources) \
512 $(webkitgtk_built_sources) \
513 $(webkitgtk_built_nosources)
514
alp@webkit.org278f1252007-12-27 06:05:21 +0000515# Project-wide clean rules
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000516CLEANFILES += \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000517 $(webkitgtk_cleanfiles)
alp@webkit.org278f1252007-12-27 06:05:21 +0000518
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000519MAINTAINERCLEANFILES += \
520 $(srcdir)/aconfig.h.in \
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000521 $(srcdir)/autotools/config.* \
522 $(srcdir)/autotools/compile \
523 $(srcdir)/autotools/depcomp \
524 $(srcdir)/autotools/install-sh \
525 $(srcdir)/autotools/missing \
526 $(srcdir)/configure \
527 $(srcdir)/GNUmakefile.in \
528 $(srcdir)/INSTALL \
529 $(srcdir)/README \
530 $(top_builddir)/config.*
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000531
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000532# Older automake versions (1.7) place Plo files in a different place so we need
533# to create the output directory manually.
534all-local:
535 mkdir -p $(top_builddir)/$(DEPDIR)/DerivedSources
536
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000537# remove built sources and program directories
538clean-local:
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000539 -rm -rf $(GENPROGRAMS)
540
xan@webkit.org233d51e2009-03-14 20:22:13 +0000541maintainer-clean-local: distclean-local
542
543distclean-local:
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000544 -rm -rf $(GENSOURCES) $(GENPROGRAMS)