blob: f71e7ad1271714c2a95b7402cef178a68a26a5a7 [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
37CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
38
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
alp@webkit.org278f1252007-12-27 06:05:21 +000050# Global flags to CPP
alp@webkit.org040ad8b2008-02-04 11:00:43 +000051global_cppflags :=
alp@webkit.org278f1252007-12-27 06:05:21 +000052
53global_cppflags += \
alp@webkit.orgd28cae02008-03-10 00:49:15 +000054 -DWTF_USE_ICU_UNICODE=1
55
alp@webkit.org278f1252007-12-27 06:05:21 +000056# Default compiler flags
57global_cflags := \
58 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
59 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
60 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
alp@webkit.org491d9092008-11-03 17:27:55 +000061 -Wno-unused-parameter -Wno-parentheses \
62 -fno-exceptions
mrowe@apple.com84cdb082008-02-05 03:25:59 +000063
64global_cxxflags := \
alp@webkit.org491d9092008-11-03 17:27:55 +000065 $(SYMBOL_VISIBILITY_INLINES) \
66 -fno-rtti
alp@webkit.org278f1252007-12-27 06:05:21 +000067
alp@webkit.org36d65492008-01-13 07:33:53 +000068if !ENABLE_DEBUG
69global_cflags += \
alp@webkit.orgd31a7362008-01-15 21:47:25 +000070 $(SYMBOL_VISIBILITY)
alp@webkit.org36d65492008-01-13 07:33:53 +000071endif
72
alp@webkit.org15ef3c42008-06-03 00:30:19 +000073# -no-undefined required for building DLLs on Windows
74# It breaks the build on other platforms, so we use it conditionally
75if OS_WIN32
76no_undefined = -no-undefined
77endif
78
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +000079if OS_GNU
jmalonzo@webkit.orge39356e2008-10-25 07:24:17 +000080version_script = -Wl,--version-script,$(srcdir)/symbols.filter
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +000081endif
82
alp@webkit.org36d65492008-01-13 07:33:53 +000083# Shared libraries
84lib_LTLIBRARIES = \
alp@webkit.org66551a12008-03-02 19:51:26 +000085 libwebkit-1.0.la
alp@webkit.org36d65492008-01-13 07:33:53 +000086
87# Convenience libraries
88noinst_LTLIBRARIES = \
alp@webkit.org66551a12008-03-02 19:51:26 +000089 libJavaScriptCore.la \
90 libWebCore.la
alp@webkit.org278f1252007-12-27 06:05:21 +000091
alp@webkit.orgf93619a2007-12-30 03:33:44 +000092#
alp@webkit.org278f1252007-12-27 06:05:21 +000093# JavaScriptCore
alp@webkit.org278f1252007-12-27 06:05:21 +000094javascriptcore_h_api :=
95javascriptcore_cppflags:=
96javascriptcore_sources :=
alp@webkit.org040ad8b2008-02-04 11:00:43 +000097javascriptcore_built_sources :=
alp@webkit.org278f1252007-12-27 06:05:21 +000098javascriptcore_built_nosources :=
alp@webkit.org9388fc82008-08-10 18:21:21 +000099javascriptcore_dist :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000100
zecke@webkit.org5d487372008-03-21 18:21:25 +0000101javascriptcore_cppflags += \
102 -I$(srcdir)/JavaScriptCore \
103 -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
104 -I$(srcdir)/JavaScriptCore/wtf \
105 -I$(srcdir)/JavaScriptCore/kjs \
106 -I$(top_builddir)/DerivedSources
107
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000108# The variables above are already included below so no need to touch
109# these variables unless you really have to
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000110nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
alp@webkit.org81514942008-04-23 03:14:26 +0000111 $(javascriptcore_built_nosources)
112
113nodist_libJavaScriptCore_la_SOURCES = \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000114 $(javascriptcore_built_sources)
115
alp@webkit.org66551a12008-03-02 19:51:26 +0000116libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
alp@webkit.org36d65492008-01-13 07:33:53 +0000117libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
alp@webkit.org278f1252007-12-27 06:05:21 +0000118
alp@webkit.org36d65492008-01-13 07:33:53 +0000119libJavaScriptCore_la_SOURCES = \
alp@webkit.org278f1252007-12-27 06:05:21 +0000120 $(javascriptcore_sources)
121
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000122libJavaScriptCore_la_LIBADD = \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000123 $(UNICODE_LIBS) \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000124 $(GLOBALDEPS_LIBS) \
125 -lpthread
alp@webkit.org278f1252007-12-27 06:05:21 +0000126
darin@apple.com47e2c232008-02-24 05:42:29 +0000127libJavaScriptCore_la_CXXFLAGS = \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000128 $(global_cxxflags) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000129 $(libJavaScriptCore_la_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000130
darin@apple.com47e2c232008-02-24 05:42:29 +0000131libJavaScriptCore_la_CFLAGS = \
alp@webkit.org2d181c52008-06-08 16:10:16 +0000132 -fstrict-aliasing \
133 -O3 \
pewtermoose@webkit.org7a953d92008-02-24 07:07:03 +0000134 $(global_cflags) \
135 $(GLOBALDEPS_CFLAGS) \
alp@webkit.org2d181c52008-06-08 16:10:16 +0000136 $(UNICODE_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000137
alp@webkit.orgf49bd1e2008-01-21 23:06:23 +0000138libJavaScriptCore_la_CPPFLAGS = \
139 $(global_cppflags) \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000140 $(javascriptcore_cppflags)
alp@webkit.org278f1252007-12-27 06:05:21 +0000141
alp@webkit.org278f1252007-12-27 06:05:21 +0000142#
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000143# WebCore
144webcore_cppflags :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000145webcore_sources :=
alp@webkit.org66551a12008-03-02 19:51:26 +0000146webcore_libadd :=
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000147webcore_built_sources :=
148webcore_built_nosources :=
alp@webkit.org9388fc82008-08-10 18:21:21 +0000149webcore_dist :=
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000150webcoregtk_cppflags :=
151webcoregtk_sources :=
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000152
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000153nodist_EXTRA_libWebCore_la_SOURCES = \
154 $(webcore_built_nosources)
155
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000156nodist_libWebCore_la_SOURCES = \
157 $(webcore_built_sources)
alp@webkit.org278f1252007-12-27 06:05:21 +0000158
alp@webkit.org66551a12008-03-02 19:51:26 +0000159libWebCore_la_SOURCES = \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000160 $(webcore_sources) \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000161 $(webcoregtk_sources)
alp@webkit.org278f1252007-12-27 06:05:21 +0000162
alp@webkit.org66551a12008-03-02 19:51:26 +0000163libWebCore_la_CXXFLAGS = \
mrowe@apple.com84cdb082008-02-05 03:25:59 +0000164 $(global_cxxflags) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000165 $(libWebCore_la_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000166
alp@webkit.org66551a12008-03-02 19:51:26 +0000167libWebCore_la_CFLAGS = \
alp@webkit.org36d65492008-01-13 07:33:53 +0000168 -fno-strict-aliasing \
alp@webkit.org278f1252007-12-27 06:05:21 +0000169 $(global_cflags) \
darin@apple.com47e2c232008-02-24 05:42:29 +0000170 $(GLOBALDEPS_CFLAGS) \
alp@webkit.org478185d2008-03-10 02:44:33 +0000171 $(UNICODE_CFLAGS) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000172 $(LIBXML_CFLAGS) \
173 $(CAIRO_CFLAGS) \
174 $(PANGO_CFLAGS) \
175 $(GTK_CFLAGS) \
alp@webkit.org7ba3bb92008-08-05 21:33:35 +0000176 $(XT_CFLAGS) \
alp@webkit.org99436822008-01-16 03:32:29 +0000177 $(LIBCURL_CFLAGS) \
alp@webkit.orgb51d08f2008-03-11 23:06:38 +0000178 $(LIBSOUP_CFLAGS) \
alp@webkit.org8cfd6ab2008-05-19 23:06:49 +0000179 $(FREETYPE_CFLAGS) \
alp@webkit.org278f1252007-12-27 06:05:21 +0000180 $(SQLITE3_CFLAGS) \
181 $(GSTREAMER_CFLAGS) \
182 $(LIBXSLT_CFLAGS) \
alp@webkit.org4ad34cb2008-02-12 21:04:50 +0000183 $(COVERAGE_CFLAGS) \
184 $(HILDON_CFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000185
alp@webkit.org66551a12008-03-02 19:51:26 +0000186libWebCore_la_CPPFLAGS = \
alp@webkit.org278f1252007-12-27 06:05:21 +0000187 $(global_cppflags) \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000188 $(webcore_cppflags) \
zecke@webkit.org5d487372008-03-21 18:21:25 +0000189 $(javascriptcore_cppflags) \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000190 $(webcoregtk_cppflags) \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000191 $(HILDON_CPPFLAGS)
alp@webkit.org278f1252007-12-27 06:05:21 +0000192
alp@webkit.org66551a12008-03-02 19:51:26 +0000193libWebCore_la_LIBADD = \
194 libJavaScriptCore.la \
alp@webkit.orge1244662008-10-07 18:28:43 +0000195 libWebCoreJS.la \
alp@webkit.org66551a12008-03-02 19:51:26 +0000196 $(webcore_libadd) \
darin@apple.com47e2c232008-02-24 05:42:29 +0000197 $(GLOBALDEPS_LIBS) \
alp@webkit.org139345a2008-09-20 06:34:35 +0000198 $(LIBXML_LIBS) \
199 $(CAIRO_LIBS) \
200 $(PANGO_LIBS) \
201 $(GTK_LIBS) \
alp@webkit.org7ba3bb92008-08-05 21:33:35 +0000202 $(XT_LIBS) \
alp@webkit.org99436822008-01-16 03:32:29 +0000203 $(LIBCURL_LIBS) \
alp@webkit.orgb51d08f2008-03-11 23:06:38 +0000204 $(LIBSOUP_LIBS) \
alp@webkit.org8cfd6ab2008-05-19 23:06:49 +0000205 $(FREETYPE_LIBS) \
alp@webkit.orgd28cae02008-03-10 00:49:15 +0000206 $(UNICODE_LIBS) \
alp@webkit.org278f1252007-12-27 06:05:21 +0000207 $(SQLITE3_LIBS) \
208 $(GSTREAMER_LIBS) \
209 $(LIBXSLT_LIBS) \
alp@webkit.org4ad34cb2008-02-12 21:04:50 +0000210 $(HILDON_LIBS) \
jmalonzo@webkit.org20c9f4b2008-07-27 06:00:36 +0000211 $(JPEG_LIBS) \
zecke@webkit.orga05d5962008-10-29 20:19:06 +0000212 $(PNG_LIBS) \
jmalonzo@webkit.org20c9f4b2008-07-27 06:00:36 +0000213 -lpthread
alp@webkit.orgc53b43d2008-02-21 19:43:44 +0000214
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000215# WebKit
216webkitgtk_h_api :=
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000217webkitgtk_sources :=
218webkitgtk_cppflags :=
219webkitgtk_built_sources :=
220webkitgtk_built_nosources :=
221webkitgtk_cleanfiles :=
222
223nodist_libwebkit_1_0_la_SOURCES = \
224 $(webkitgtk_built_sources)
225
alp@webkit.org66551a12008-03-02 19:51:26 +0000226libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000227libwebkit_1_0_la_HEADERS = \
228 $(webkitgtk_h_api) \
229 WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.org66551a12008-03-02 19:51:26 +0000230
231libwebkit_1_0_la_SOURCES = \
alp@webkit.org66551a12008-03-02 19:51:26 +0000232 $(webkitgtk_sources)
233
234libwebkit_1_0_la_CXXFLAGS = \
235 $(libWebCore_la_CXXFLAGS)
236
237libwebkit_1_0_la_CFLAGS = \
238 $(libWebCore_la_CFLAGS)
239
240libwebkit_1_0_la_CPPFLAGS = \
alp@webkit.org7c869902008-06-08 19:04:23 +0000241 $(libWebCore_la_CPPFLAGS) \
242 $(webkitgtk_cppflags)
alp@webkit.org66551a12008-03-02 19:51:26 +0000243
244libwebkit_1_0_la_LDFLAGS = \
alp@webkit.orgc53b43d2008-02-21 19:43:44 +0000245 $(COVERAGE_LDFLAGS) \
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000246 -version-info @LIBWEBKITGTK_VERSION@ \
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000247 $(version_script) \
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000248 $(no_undefined)
alp@webkit.org278f1252007-12-27 06:05:21 +0000249
alp@webkit.org66551a12008-03-02 19:51:26 +0000250libwebkit_1_0_la_LIBADD = \
251 libWebCore.la
252
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000253#
alp@webkit.org278f1252007-12-27 06:05:21 +0000254# Extra checks and flags
alp@webkit.org278f1252007-12-27 06:05:21 +0000255global_cppflags += \
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000256 -DBUILDING_CAIRO__=1 \
alp@webkit.org278f1252007-12-27 06:05:21 +0000257 -DBUILDING_GTK__=1 \
alp@webkit.org278f1252007-12-27 06:05:21 +0000258 -DWTF_CHANGES
259
alp@webkit.org27f95c42008-01-12 07:40:52 +0000260if !ENABLE_FAST_MALLOC
261global_cppflags += \
262 -DUSE_SYSTEM_MALLOC
263endif
264
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000265if TARGET_X11
266global_cppflags += -DXP_UNIX
267endif
268
alp@webkit.org278f1252007-12-27 06:05:21 +0000269if !ENABLE_DEBUG
270global_cppflags += -DNDEBUG
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000271else
alp@webkit.orgf1dbca62008-06-02 16:36:32 +0000272webcoregtk_cppflags += \
alp@webkit.org11a31a72007-12-27 23:14:27 +0000273 -DG_DISABLE_DEPRECATED \
274 -DGDK_PIXBUF_DISABLE_DEPRECATED \
275 -DGDK_DISABLE_DEPRECATED \
276 -DGTK_DISABLE_DEPRECATED \
zecke@webkit.org48bc6f42008-01-03 02:07:28 +0000277 -DPANGO_DISABLE_DEPRECATED
278
279# Might be useful in the future
280# -DGDK_MULTIHEAD_SAFE \
281# -DGTK_MULTIHEAD_SAFE
alp@webkit.org278f1252007-12-27 06:05:21 +0000282endif
283
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000284if !ENABLE_DATABASE
285global_cppflags += -DENABLE_DATABASE=0
alp@webkit.org278f1252007-12-27 06:05:21 +0000286endif
287
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000288if !ENABLE_ICONDATABASE
289global_cppflags += -DENABLE_ICONDATABASE=0
alp@webkit.org278f1252007-12-27 06:05:21 +0000290endif
291
292if ENABLE_COVERAGE
293global_cppflags += \
294 -DGCC_GENERATE_TEST_COVERAGE_FILES \
295 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
296endif
297
298if ENABLE_VIDEO
alp@webkit.org66551a12008-03-02 19:51:26 +0000299webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
alp@webkit.org278f1252007-12-27 06:05:21 +0000300endif
301
alp@webkit.org278f1252007-12-27 06:05:21 +0000302webkitgtk_h_api += \
alp@webkit.org94c06552008-01-31 23:51:53 +0000303 WebKit/gtk/webkit/webkit.h \
304 WebKit/gtk/webkit/webkitdefines.h \
305 WebKit/gtk/webkit/webkitnetworkrequest.h \
christian@webkit.org56f00692008-06-05 22:50:40 +0000306 WebKit/gtk/webkit/webkitversion.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000307 WebKit/gtk/webkit/webkitwebbackforwardlist.h \
308 WebKit/gtk/webkit/webkitwebframe.h \
309 WebKit/gtk/webkit/webkitwebhistoryitem.h \
zecke@webkit.orgbcca41d2008-10-29 22:39:18 +0000310 WebKit/gtk/webkit/webkitwebinspector.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000311 WebKit/gtk/webkit/webkitwebsettings.h \
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000312 WebKit/gtk/webkit/webkitwebview.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000313
314webkitgtk_built_sources += \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000315 DerivedSources/webkitenumtypes.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000316 DerivedSources/webkitmarshal.cpp \
317 DerivedSources/webkitmarshal.h \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000318 WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000319
alp@webkit.org278f1252007-12-27 06:05:21 +0000320webkitgtk_sources += \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000321 WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
322 WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
323 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
324 WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
325 WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
326 WebKit/gtk/WebCoreSupport/DragClientGtk.h \
327 WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
328 WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
329 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
330 WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
331 WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
332 WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
333 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
334 WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
alp@webkit.org94c06552008-01-31 23:51:53 +0000335 WebKit/gtk/webkit/webkitnetworkrequest.cpp \
336 WebKit/gtk/webkit/webkitprivate.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000337 WebKit/gtk/webkit/webkitprivate.h \
christian@webkit.org56f00692008-06-05 22:50:40 +0000338 WebKit/gtk/webkit/webkitversion.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000339 WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
340 WebKit/gtk/webkit/webkitwebframe.cpp \
341 WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
zecke@webkit.orgbcca41d2008-10-29 22:39:18 +0000342 WebKit/gtk/webkit/webkitwebinspector.cpp \
alp@webkit.org94c06552008-01-31 23:51:53 +0000343 WebKit/gtk/webkit/webkitwebsettings.cpp \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000344 WebKit/gtk/webkit/webkitwebview.cpp
alp@webkit.org278f1252007-12-27 06:05:21 +0000345
alp@webkit.org7c869902008-06-08 19:04:23 +0000346webkitgtk_cppflags += \
347 -DBUILDING_WEBKIT \
348 -I$(srcdir)/WebKit/gtk \
349 -I$(srcdir)/WebKit/gtk/WebCoreSupport \
350 -I$(srcdir)/WebKit/gtk/webkit \
351 -I$(top_builddir)/WebKit/gtk/webkit
352
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000353webkitgtk_cleanfiles += \
354 $(top_builddir)/Programs/GtkLauncher \
alp@webkit.orge359c842008-11-04 04:25:52 +0000355 $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
356 $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000357
alp@webkit.org278f1252007-12-27 06:05:21 +0000358pkgconfigdir = $(libdir)/pkgconfig
alp@webkit.org12057322008-02-01 07:01:18 +0000359pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
alp@webkit.org278f1252007-12-27 06:05:21 +0000360
jmalonzo@webkit.orgb5895212008-06-18 17:16:12 +0000361stamp_files := \
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000362 stamp-webkitmarshal.cpp \
363 stamp-webkitmarshal.h \
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000364 stamp-webkitenumtypes.cpp \
365 stamp-webkitenumtypes.h
366
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000367WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
368WEBKIT_MARSHAL_LIST = $(WEBKIT_MARSHAL).list
jmalonzo@webkit.orgb5895212008-06-18 17:16:12 +0000369
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000370$(WEBKIT_MARSHAL_LIST): $(webkitgtk_sources) GNUmakefile.am
371 ( cd $(top_srcdir) && \
372 sed -n -e 's/.*webkit_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
373 $(webkitgtk_sources) ) \
374 | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
375 if cmp -s $@.tmp $@; then \
376 rm $@.tmp; \
377 else \
378 mv $@.tmp $@; \
379 fi
380
381$(WEBKIT_MARSHAL).cpp: stamp-webkitmarshal.cpp
alp@webkit.org278f1252007-12-27 06:05:21 +0000382 @true
383
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000384$(WEBKIT_MARSHAL).h: stamp-webkitmarshal.h
alp@webkit.org278f1252007-12-27 06:05:21 +0000385 @true
386
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000387stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
alp@webkit.org278f1252007-12-27 06:05:21 +0000388 echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000389 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
alp@webkit.org278f1252007-12-27 06:05:21 +0000390 echo timestamp > $(@F)
391
christian@webkit.orge0a030f2008-07-30 18:17:24 +0000392stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000393 $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
alp@webkit.org278f1252007-12-27 06:05:21 +0000394 echo timestamp > $(@F)
395
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000396WebKit/gtk/webkit/webkitenumtypes.h: stamp-webkitenumtypes.h
397 @true
jmalonzo@webkit.org46fd3f42008-08-06 12:40:53 +0000398stamp-webkitenumtypes.h: $(webkitgtk_h_api) GNUmakefile
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000399 (cd $(srcdir) \
400 && glib-mkenums \
401 --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
402 --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
403 --fhead "#include <glib-object.h>\n\n" \
404 --fhead "#include <webkit/webkitdefines.h>\n\n" \
405 --fhead "G_BEGIN_DECLS\n\n" \
406 --ftail "G_END_DECLS\n\n" \
407 --ftail "#endif\n" \
408 --fprod "#include <@filename@>\n\n" \
409 --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
410 --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
411 $(webkitgtk_h_api) | \
412 sed 's,WebKit/gtk/,,' | \
413 sed 's,web_kit,webkit,' | \
414 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
415 ) > xgen-gth \
416 && (cmp -s xgen-gth WebKit/gtk/webkit/webkitenumtypes.h || cp xgen-gth WebKit/gtk/webkit/webkitenumtypes.h) \
417 && rm -f xgen-gth \
418 && echo timestamp > $(@F)
419
jmalonzo@webkit.org46fd3f42008-08-06 12:40:53 +0000420DerivedSources/webkitenumtypes.cpp: $(webkitgtk_h_api) GNUmakefile
jmalonzo@webkit.orgd18157182008-06-18 20:04:18 +0000421 (cd $(srcdir) \
422 && glib-mkenums \
423 --fhead "#include <config.h>\n" \
424 --fhead "#include <glib-object.h>\n" \
425 --fhead "#include \"$(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h\"\n\n" \
426 --fhead "extern \"C\" {\n\n" \
427 --fprod "\n/* enumerations from \"@filename@\" */" \
428 --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
429 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
430 --vtail " { 0, NULL, NULL }\n};\n\n" \
431 --vtail "GType @enum_name@_get_type(void)\n{\n" \
432 --vtail " static GType type = 0;\n\n" \
433 --vtail " if (!type)\n" \
434 --vtail " type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
435 --vtail " return type;\n}\n\n" \
436 --ftail "}\n" \
437 $(webkitgtk_h_api) | \
438 sed 's,web_kit,webkit,' \
439 ) > xgen-gtc \
440 && cp xgen-gtc $@ \
441 && rm -f xgen-gtc
442
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000443# END WEBKIT GTK+
alp@webkit.org9388fc82008-08-10 18:21:21 +0000444#
445# Files that will be distributed
446EXTRA_DIST = \
alp@webkit.org2ab36952008-10-28 12:53:51 +0000447 WebKit/LICENSE \
alp@webkit.org9388fc82008-08-10 18:21:21 +0000448 $(javascriptcore_dist) \
alp@webkit.org97d8c102008-08-29 05:09:39 +0000449 $(webcore_dist) \
450 symbols.filter
alp@webkit.org278f1252007-12-27 06:05:21 +0000451
452# Files that will be cleaned
453MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
alp@webkit.orge359c842008-11-04 04:25:52 +0000454DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
alp@webkit.org278f1252007-12-27 06:05:21 +0000455CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
456
457# Include module makefiles
458include JavaScriptCore/GNUmakefile.am
459include WebCore/GNUmakefile.am
460include WebKitTools/GNUmakefile.am
461
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000462# Autogenerated sources
alp@webkit.orge1244662008-10-07 18:28:43 +0000463BUILT_SOURCES := \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000464 $(javascriptcore_built_sources) \
465 $(javascriptcore_built_nosources) \
466 $(webcore_built_sources) \
467 $(webcore_built_nosources) \
468 $(webkitgtk_built_sources) \
469 $(webkitgtk_built_nosources)
470
alp@webkit.org278f1252007-12-27 06:05:21 +0000471# Project-wide clean rules
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000472CLEANFILES += \
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000473 $(webkitgtk_cleanfiles)
alp@webkit.org278f1252007-12-27 06:05:21 +0000474
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000475MAINTAINERCLEANFILES += \
476 $(srcdir)/aconfig.h.in \
477 configure \
478 config.* \
479 GNUmakefile.in \
480 INSTALL \
481 README
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000482
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000483# Older automake versions (1.7) place Plo files in a different place so we need
484# to create the output directory manually.
485all-local:
486 mkdir -p $(top_builddir)/$(DEPDIR)/DerivedSources
487
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000488# remove built sources and program directories
489clean-local:
490 -rm -rf $(GENSOURCES) $(GENPROGRAMS)