028d4b37a14e34698aaffa160e2e2d58687ee849
[WebKit-https.git] / Source / WebKit / gtk / GNUmakefile.am
1 if ENABLE_WEBKIT1
2 lib_LTLIBRARIES += \
3         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
4 endif
5
6 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
7         $(webkitgtk_built_sources)
8
9 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(libwebkitgtkincludedir)/webkit
10 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
11         $(webkitgtk_static_h_api)
12
13 nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
14         $(webkitgtk_built_h_api) \
15         $(GENSOURCES_WEBKIT)/webkitenumtypes.h
16
17 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
18         $(webkitgtk_sources)
19
20 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
21         -fvisibility-inlines-hidden \
22         $(global_cxxflags)
23
24 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
25         -fvisibility=hidden \
26         $(global_cflags)
27
28 if ENABLE_SPELLCHECK
29 webkitgtk_sources += \
30         Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp \
31         Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
32 endif
33
34 # When building WebCore/WebKit, we want WebCore/config.h and NOT JavaScriptCore/config.h,
35 # hence, it's important that WebCore/ should come first before JavaScriptCore in the
36 # include path.
37 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
38         -DBUILDING_WEBKIT \
39         -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
40         -DDATA_DIR=\"${datadir}\" \
41         -I$(WebCore)/bindings \
42         -I$(WebCore)/bindings/gobject \
43         -I$(WebKit) \
44         -I$(WebKit)/WebCoreSupport \
45         -I$(WebKit)/webkit \
46         -I$(GENSOURCES_WEBKIT) \
47         -I$(GENSOURCES_WEBKITDOM) \
48         -ISource/WebKit/gtk/webkit \
49         $(global_cppflags) \
50         $(platform_cppflags) \
51         $(platformgtk_cppflags) \
52         $(platform_webcore_cppflags) \
53         $(webcore_cppflags) \
54         $(webcoregtk_cppflags) \
55         $(javascriptcore_cppflags) \
56         $(webkitgtk_cppflags) \
57         -fno-strict-aliasing \
58         $(COVERAGE_CFLAGS) \
59         $(ENCHANT_CFLAGS) \
60         $(FREETYPE_CFLAGS) \
61         $(GEOCLUE_CFLAGS) \
62         $(GLIB_CFLAGS) \
63         $(GSTREAMER_CFLAGS) \
64         $(GTK_CFLAGS) \
65         $(LIBSOUP_CFLAGS) \
66         $(LIBXML_CFLAGS) \
67         $(LIBXSLT_CFLAGS) \
68         $(SQLITE3_CFLAGS) \
69         $(UNICODE_CFLAGS) \
70         $(XCOMPOSITE_CFLAGS) \
71         $(XDAMAGE_CFLAGS) \
72         $(XT_CFLAGS) \
73         $(ZLIB_CFLAGS)
74
75 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
76         -version-info @LIBWEBKITGTK_VERSION@ \
77         $(version_script) \
78         $(no_undefined)
79
80 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD := \
81         -lpthread \
82         libPlatform.la \
83         libPlatformGtk.la \
84         libWebCore.la \
85         libWebCorePlatform.la \
86         libWebCoreModules.la \
87         libGObjectDOMBindings.la \
88         libWebCoreGtk.la
89
90 if ENABLE_INDEXED_DATABASE
91 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
92         libLevelDB.la
93 endif
94
95 if USE_OPENGL
96 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
97         libANGLE.la
98 endif
99
100 if ENABLE_SVG
101 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
102         libWebCoreSVG.la
103 endif
104
105 libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD += \
106         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
107         $(CAIRO_LIBS) \
108         $(COVERAGE_LDFLAGS) \
109         $(ENCHANT_LIBS) \
110         $(FREETYPE_LIBS) \
111         $(GAMEPAD_LIBS) \
112         $(GEOCLUE_LIBS) \
113         $(GLIB_LIBS) \
114         $(GSTREAMER_LIBS) \
115         $(GTK_LIBS) \
116         $(JPEG_LIBS) \
117         $(LIBSECRET_LIBS) \
118         $(LIBSOUP_LIBS) \
119         $(LIBXML_LIBS) \
120         $(LIBXSLT_LIBS) \
121         $(OPENGL_LIBS) \
122         $(PANGO_LIBS) \
123         $(PNG_LIBS) \
124         $(SQLITE3_LIBS) \
125         $(UNICODE_LIBS) \
126         $(WEBP_LIBS) \
127         $(XCOMPOSITE_LIBS) \
128         $(XDAMAGE_LIBS) \
129         $(XRENDER_LIBS) \
130         $(XT_LIBS) \
131         $(WINMM_LIBS) \
132         $(SHLWAPI_LIBS) \
133         $(OLE32_LIBS) \
134         $(ZLIB_LIBS)
135
136 webkitgtk_static_h_api += \
137         $(srcdir)/Source/WebKit/gtk/webkit/webkit.h \
138         $(srcdir)/Source/WebKit/gtk/webkit/webkitapplicationcache.h \
139         $(srcdir)/Source/WebKit/gtk/webkit/webkitdefines.h \
140         $(srcdir)/Source/WebKit/gtk/webkit/webkitdom.h \
141         $(srcdir)/Source/WebKit/gtk/webkit/webkitdownload.h \
142         $(srcdir)/Source/WebKit/gtk/webkit/webkiterror.h \
143         $(srcdir)/Source/WebKit/gtk/webkit/webkitfavicondatabase.h \
144         $(srcdir)/Source/WebKit/gtk/webkit/webkitfilechooserrequest.h \
145         $(srcdir)/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
146         $(srcdir)/Source/WebKit/gtk/webkit/webkitglobals.h \
147         $(srcdir)/Source/WebKit/gtk/webkit/webkithittestresult.h \
148         $(srcdir)/Source/WebKit/gtk/webkit/webkiticondatabase.h \
149         $(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkrequest.h \
150         $(srcdir)/Source/WebKit/gtk/webkit/webkitnetworkresponse.h \
151         $(srcdir)/Source/WebKit/gtk/webkit/webkitsecurityorigin.h \
152         $(srcdir)/Source/WebKit/gtk/webkit/webkitsoupauthdialog.h \
153         $(srcdir)/Source/WebKit/gtk/webkit/webkitspellchecker.h \
154         $(srcdir)/Source/WebKit/gtk/webkit/webkitviewportattributes.h \
155         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebbackforwardlist.h \
156         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatabase.h \
157         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebdatasource.h \
158         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebframe.h \
159         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebhistoryitem.h \
160         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebinspector.h \
161         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebnavigationaction.h \
162         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugin.h \
163         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebplugindatabase.h \
164         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebpolicydecision.h \
165         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebresource.h \
166         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebsettings.h \
167         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebwindowfeatures.h \
168         $(srcdir)/Source/WebKit/gtk/webkit/webkitwebview.h
169
170 webkitgtk_built_h_api += \
171         Source/WebKit/gtk/webkit/webkitversion.h
172
173 webkitgtk_h_api += \
174         $(webkitgtk_built_h_api) \
175         $(webkitgtk_static_h_api)
176
177 # webkitenumtypes.{h,cpp} cannot be in webkitgtk_built_h_api, because
178 # the rule that builds it depends on webkitgtk_built_h_api (circular dependency).
179 webkitgtk_built_sources += \
180         DerivedSources/webkit/webkitenumtypes.cpp \
181         DerivedSources/webkit/webkitenumtypes.h \
182         DerivedSources/webkit/webkitmarshal.cpp \
183         DerivedSources/webkit/webkitmarshal.h \
184         $(webkitgtk_built_h_api)
185
186 BUILT_SOURCES += $(webkitgtk_built_sources)
187
188 webkitgtk_sources += \
189         Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h \
190         Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp \
191         Source/WebKit/gtk/WebCoreSupport/AssertMatchingEnums.cpp \
192         Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
193         Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
194         Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
195         Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
196         Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.cpp \
197         Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.h \
198         Source/WebKit/gtk/WebCoreSupport/DeviceOrientationClientGtk.cpp \
199         Source/WebKit/gtk/WebCoreSupport/DeviceOrientationClientGtk.h \
200         Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp \
201         Source/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.h \
202         Source/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
203         Source/WebKit/gtk/WebCoreSupport/DragClientGtk.h \
204         Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp \
205         Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h \
206         Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
207         Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
208         Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
209         Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
210         Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp \
211         Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
212         Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp \
213         Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.h \
214         Source/WebKit/gtk/WebCoreSupport/GtkAdjustmentWatcher.cpp \
215         Source/WebKit/gtk/WebCoreSupport/GtkAdjustmentWatcher.h \
216         Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
217         Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
218         Source/WebKit/gtk/WebCoreSupport/NavigatorContentUtilsClientGtk.h \
219         Source/WebKit/gtk/WebCoreSupport/NavigatorContentUtilsClientGtk.cpp \
220         Source/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
221         Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h \
222         Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp \
223         Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp \
224         Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h \
225         Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.cpp \
226         Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h \
227         Source/WebKit/gtk/webkit/webkitapplicationcache.cpp \
228         Source/WebKit/gtk/webkit/webkitauthenticationdialog.cpp \
229         Source/WebKit/gtk/webkit/webkitauthenticationdialog.h \
230         Source/WebKit/gtk/webkit/webkitdownload.cpp \
231         Source/WebKit/gtk/webkit/webkitdownloadprivate.h \
232         Source/WebKit/gtk/webkit/webkiterror.cpp \
233         Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp \
234         Source/WebKit/gtk/webkit/webkitfavicondatabaseprivate.h \
235         Source/WebKit/gtk/webkit/webkitfilechooserrequest.cpp \
236         Source/WebKit/gtk/webkit/webkitfilechooserrequest.h \
237         Source/WebKit/gtk/webkit/webkitfilechooserrequestprivate.h \
238         Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
239         Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h \
240         Source/WebKit/gtk/webkit/webkitglobals.cpp \
241         Source/WebKit/gtk/webkit/webkitglobals.h \
242         Source/WebKit/gtk/webkit/webkitglobalsprivate.h \
243         Source/WebKit/gtk/webkit/webkithittestresult.cpp \
244         Source/WebKit/gtk/webkit/webkithittestresultprivate.h \
245         Source/WebKit/gtk/webkit/webkiticondatabase.cpp \
246         Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp \
247         Source/WebKit/gtk/webkit/webkitnetworkrequestprivate.h \
248         Source/WebKit/gtk/webkit/webkitnetworkresponse.cpp \
249         Source/WebKit/gtk/webkit/webkitnetworkresponseprivate.h \
250         Source/WebKit/gtk/webkit/webkitsecurityorigin.cpp \
251         Source/WebKit/gtk/webkit/webkitsecurityoriginprivate.h \
252         Source/WebKit/gtk/webkit/webkitsoupauthdialog.cpp \
253         Source/WebKit/gtk/webkit/webkitspellchecker.cpp \
254         Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp \
255         Source/WebKit/gtk/webkit/webkitspellcheckerenchant.h \
256         Source/WebKit/gtk/webkit/webkitversion.cpp \
257         Source/WebKit/gtk/webkit/webkitviewportattributes.cpp \
258         Source/WebKit/gtk/webkit/webkitviewportattributesprivate.h \
259         Source/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
260         Source/WebKit/gtk/webkit/webkitwebbackforwardlistprivate.h \
261         Source/WebKit/gtk/webkit/webkitwebdatabase.cpp \
262         Source/WebKit/gtk/webkit/webkitwebdatasource.cpp \
263         Source/WebKit/gtk/webkit/webkitwebdatasourceprivate.h \
264         Source/WebKit/gtk/webkit/webkitwebframe.cpp \
265         Source/WebKit/gtk/webkit/webkitwebframeprivate.h \
266         Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
267         Source/WebKit/gtk/webkit/webkitwebhistoryitemprivate.h \
268         Source/WebKit/gtk/webkit/webkitwebinspector.cpp \
269         Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h \
270         Source/WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
271         Source/WebKit/gtk/webkit/webkitwebnavigationactionprivate.h \
272         Source/WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
273         Source/WebKit/gtk/webkit/webkitwebpolicydecisionprivate.h \
274         Source/WebKit/gtk/webkit/webkitwebresource.cpp \
275         Source/WebKit/gtk/webkit/webkitwebresourceprivate.h \
276         Source/WebKit/gtk/webkit/webkitwebplugin.cpp \
277         Source/WebKit/gtk/webkit/webkitwebpluginprivate.h \
278         Source/WebKit/gtk/webkit/webkitwebplugindatabase.cpp \
279         Source/WebKit/gtk/webkit/webkitwebplugindatabaseprivate.h \
280         Source/WebKit/gtk/webkit/webkitwebsettings.cpp \
281         Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h \
282         Source/WebKit/gtk/webkit/webkitwebview.cpp \
283         Source/WebKit/gtk/webkit/webkitwebviewprivate.h \
284         Source/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp \
285         Source/WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h
286
287 if ENABLE_WEBKIT1
288 pkgconfig_DATA += Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
289
290 if ENABLE_INTROSPECTION
291 WebKit-@WEBKITGTK_API_VERSION@.gir: $(G_IR_SCANNER) JavaScriptCore-@WEBKITGTK_API_VERSION@.gir libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
292         $(AM_V_GEN) \
293              CFLAGS="$(CFLAGS) -Wno-deprecated-declarations" \
294              $(G_IR_SCANNER) \
295              --quiet \
296              --warn-all \
297              --symbol-prefix=webkit \
298              --identifier-prefix=WebKit \
299              --namespace=WebKit \
300              --nsversion=@WEBKITGTK_API_VERSION@ \
301              --include=GObject-2.0 \
302              --include=Gtk-@GTK_API_VERSION@ \
303              --include=JavaScriptCore-@WEBKITGTK_API_VERSION@ \
304              --include=Soup-2.4 \
305              --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
306              --library=javascriptcoregtk-@WEBKITGTK_API_VERSION@ \
307              --libtool="$(LIBTOOL)" \
308              --pkg=gobject-2.0 \
309              --pkg=gtk+-@GTK_API_VERSION@ \
310              --pkg=libsoup-2.4 \
311              --pkg-export=webkitgtk-@WEBKITGTK_API_VERSION@ \
312              --output=$@ \
313              --add-include-path=$(WebKit) \
314              --add-include-path=$(top_builddir) \
315              --c-include="webkit/webkit.h" \
316              -DBUILDING_WEBKIT \
317              -I$(srcdir)/Source \
318              -I$(WebKit) \
319              -I$(GENSOURCES) \
320              -I$(GENSOURCES_WEBKITDOM) \
321              -I$(GENSOURCES_WEBKIT) \
322              -I$(top_builddir)/Source/WebKit/gtk \
323              -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
324              -I$(top_srcdir) \
325              $(GENSOURCES_WEBKIT)/webkitenumtypes.h \
326              $(webkitgtk_h_api) \
327              $(webkitgtk_gdom_built_h_api) \
328              $(WebKit)/webkit/*.cpp
329
330 WebKit-@WEBKITGTK_API_VERSION@.typelib: WebKit-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER)
331         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@
332
333 gir_DATA += WebKit-@WEBKITGTK_API_VERSION@.gir
334 typelibs_DATA += WebKit-@WEBKITGTK_API_VERSION@.typelib
335 CLEANFILES += WebKit-@WEBKITGTK_API_VERSION@.gir WebKit-@WEBKITGTK_API_VERSION@.typelib
336 endif
337 endif
338
339 WEBKIT_MARSHAL_LIST = $(WebKit)/webkitmarshal.list
340 $(GENSOURCES_WEBKIT)/webkitmarshal.cpp: stamp-webkitmarshal.cpp
341         @true
342 $(GENSOURCES_WEBKIT)/webkitmarshal.h: stamp-webkitmarshal.h
343         @true
344
345 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
346         $(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
347         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
348         echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
349         echo timestamp > $(@F)
350
351 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
352         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(GENSOURCES_WEBKIT)/webkitmarshal.h && \
353         echo timestamp > $(@F)
354
355 $(GENSOURCES_WEBKIT)/webkitenumtypes.h: stamp-webkitenumtypes.h
356         @true
357 stamp-webkitenumtypes.h: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
358         $(AM_V_GEN)glib-mkenums \
359                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
360                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
361                         --fhead "#include <glib-object.h>\n\n" \
362                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
363                         --fhead "G_BEGIN_DECLS\n\n" \
364                         --ftail "G_END_DECLS\n\n" \
365                         --ftail "#endif\n" \
366                         --fprod "#include <webkit/@basename@>\n\n" \
367                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
368                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
369                 $(webkitgtk_h_api) | \
370                 sed 's,web_kit,webkit,' | \
371                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
372                 > xgen-gth \
373         && (cmp -s xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h || cp xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h) \
374         && rm -f xgen-gth \
375         && echo timestamp > $(@F)
376
377 $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
378         $(AM_V_GEN)glib-mkenums \
379                         --fhead "#include <config.h>\n" \
380                         --fhead "#include <glib-object.h>\n" \
381                         --fhead "#include \"$(GENSOURCES_WEBKIT)/webkitenumtypes.h\"\n\n" \
382                         --fhead "extern \"C\" {\n\n" \
383                         --fprod "\n/* enumerations from \"@filename@\" */" \
384                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
385                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
386                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
387                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
388                         --vtail "    static GType type = 0;\n\n" \
389                         --vtail "    if (!type)\n" \
390                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
391                         --vtail "    return type;\n}\n\n" \
392                         --ftail "}\n" \
393                 $(webkitgtk_h_api) | \
394                 sed 's,web_kit,webkit,' \
395                 > xgen-gtc \
396         && cp xgen-gtc $@ \
397         && rm -f xgen-gtc
398
399 EXTRA_DIST += \
400         $(WebKit)/ChangeLog \
401         $(WebKit)/NEWS \
402         $(WebKit)/docs/webkitgtk-docs.sgml \
403         $(WebKit)/docs/webkitgtk-sections.txt \
404         $(WebKit)/docs/webkitgtk.types \
405         $(WebKit)/docs/webkitenvironment.xml \
406         $(WebKit)/docs/webkitgtk-overrides.txt \
407         $(WebKit)/webkitmarshal.list \
408         $(WebKit)/resources/* \
409         $(WebKit)/tests/resources/* \
410         $(WebKit)/tests/test_utils.h
411
412 # extra resource files
413 resourcesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/resources
414 dist_resources_DATA = \
415         $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
416
417 # Build unit tests
418 webkit_tests_cflags = \
419         -fno-strict-aliasing \
420         -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
421         -I$(WebKit) \
422         -I$(GENSOURCES) \
423         -I$(top_builddir)/Source/WebKit/gtk \
424         -I$(top_srcdir)/Source/WebCore/bindings \
425         -I$(top_srcdir)/Source/WebCore/bindings/gobject \
426         $(global_cppflags) \
427         $(global_cflags) \
428         $(javascriptcore_cppflags) \
429         $(FREETYPE_CFLAGS) \
430         $(GLIB_CFLAGS) \
431         $(GTK_CFLAGS) \
432         $(LIBSOUP_CFLAGS) \
433         $(XRENDER_CFLAGS) \
434         $(XT_CFLAGS)
435
436 webkit_tests_ldadd = \
437         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
438         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
439         $(FREETYPE_LIBS) \
440         $(GTK_LIBS) \
441         $(GLIB_LIBS) \
442         $(LIBSOUP_LIBS) \
443         $(LIBXSLT_LIBS) \
444         $(XRENDER_LIBS)
445
446 webkit_tests_ldflags = \
447         -no-install \
448         -no-fast-install
449
450 if ENABLE_WEBKIT1
451 noinst_PROGRAMS += \
452         Programs/unittests/testapplicationcache \
453         Programs/unittests/testcontextmenu \
454         Programs/unittests/testdomdocument \
455         Programs/unittests/testdomdomwindow \
456         Programs/unittests/testdomnode \
457         Programs/unittests/testhttpbackend \
458         Programs/unittests/testfavicondatabase \
459         Programs/unittests/testloading \
460         Programs/unittests/testglobals \
461         Programs/unittests/testmimehandling \
462         Programs/unittests/testnetworkrequest \
463         Programs/unittests/testnetworkresponse \
464         Programs/unittests/testwebframe \
465         Programs/unittests/testwebbackforwardlist \
466         Programs/unittests/testwebhistoryitem \
467         Programs/unittests/testwindow \
468         Programs/unittests/testdownload \
469         Programs/unittests/testatk \
470         Programs/unittests/testatkroles \
471         Programs/unittests/testhittestresult \
472         Programs/unittests/testwebinspector \
473         Programs/unittests/testwebsettings \
474         Programs/unittests/testwebresource \
475         Programs/unittests/testwebdatasource \
476         Programs/unittests/testwebplugindatabase \
477         Programs/unittests/testwebview \
478         Programs/unittests/testkeyevents \
479         Programs/unittests/testcopyandpaste
480 endif
481
482 # Add additional tests here
483 Programs_unittests_testapplicationcache_SOURCES = Source/WebKit/gtk/tests/testapplicationcache.c
484 Programs_unittests_testapplicationcache_CFLAGS = $(webkit_tests_cflags)
485 Programs_unittests_testapplicationcache_LDADD = $(webkit_tests_ldadd)
486 Programs_unittests_testapplicationcache_LDFLAGS = $(webkit_tests_ldflags)
487
488 Programs_unittests_testcontextmenu_SOURCES = Source/WebKit/gtk/tests/testcontextmenu.c
489 Programs_unittests_testcontextmenu_CFLAGS = $(webkit_tests_cflags)
490 Programs_unittests_testcontextmenu_LDADD = $(webkit_tests_ldadd)
491 Programs_unittests_testcontextmenu_LDFLAGS = $(webkit_tests_ldflags)
492
493 Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
494 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
495 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
496 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
497
498 Programs_unittests_testdomdomwindow_SOURCES = Source/WebKit/gtk/tests/testdomdomwindow.c
499 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
500 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
501 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
502
503 Programs_unittests_testdomnode_SOURCES = Source/WebKit/gtk/tests/testdomnode.c
504 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
505 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
506 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
507
508 Programs_unittests_testhttpbackend_SOURCES = Source/WebKit/gtk/tests/testhttpbackend.c
509 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
510 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
511 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
512
513 Programs_unittests_testfavicondatabase_SOURCES = Source/WebKit/gtk/tests/testfavicondatabase.c Source/WebKit/gtk/tests/test_utils.c
514 Programs_unittests_testfavicondatabase_CFLAGS = $(webkit_tests_cflags)
515 Programs_unittests_testfavicondatabase_LDADD = $(webkit_tests_ldadd)
516 Programs_unittests_testfavicondatabase_LDFLAGS = $(webkit_tests_ldflags)
517
518 Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
519 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
520 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
521 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
522
523 Programs_unittests_testloading_SOURCES = Source/WebKit/gtk/tests/testloading.c
524 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
525 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
526 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
527
528 Programs_unittests_testmimehandling_SOURCES = Source/WebKit/gtk/tests/testmimehandling.c Source/WebKit/gtk/tests/test_utils.c
529 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
530 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
531 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
532
533 Programs_unittests_testnetworkrequest_SOURCES = Source/WebKit/gtk/tests/testnetworkrequest.c
534 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
535 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
536 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
537
538 Programs_unittests_testnetworkresponse_SOURCES = Source/WebKit/gtk/tests/testnetworkresponse.c
539 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
540 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
541 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
542
543 Programs_unittests_testwebframe_SOURCES = Source/WebKit/gtk/tests/testwebframe.c
544 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
545 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
546 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
547
548 Programs_unittests_testwebplugindatabase_SOURCES = Source/WebKit/gtk/tests/testwebplugindatabase.c
549 Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" $(webkit_tests_cflags)
550 Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
551 Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
552
553 Programs_unittests_testwebbackforwardlist_SOURCES = Source/WebKit/gtk/tests/testwebbackforwardlist.c
554 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
555 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
556 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
557
558 Programs_unittests_testwebhistoryitem_SOURCES = Source/WebKit/gtk/tests/testwebhistoryitem.c
559 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
560 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
561 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
562
563 Programs_unittests_testwindow_SOURCES = Source/WebKit/gtk/tests/testwindow.c
564 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
565 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
566 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
567
568 Programs_unittests_testdownload_SOURCES = Source/WebKit/gtk/tests/testdownload.c
569 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
570 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
571 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
572
573 Programs_unittests_testatk_SOURCES = Source/WebKit/gtk/tests/testatk.c
574 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
575 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
576 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
577
578 Programs_unittests_testatkroles_SOURCES = Source/WebKit/gtk/tests/testatkroles.c
579 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
580 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
581 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
582
583 Programs_unittests_testwebinspector_SOURCES = Source/WebKit/gtk/tests/testwebinspector.c Source/WebKit/gtk/tests/test_utils.c
584 Programs_unittests_testwebinspector_CFLAGS = $(webkit_tests_cflags)
585 Programs_unittests_testwebinspector_LDADD = $(webkit_tests_ldadd)
586 Programs_unittests_testwebinspector_LDFLAGS = $(webkit_tests_ldflags)
587
588 Programs_unittests_testwebsettings_SOURCES = Source/WebKit/gtk/tests/testwebsettings.c
589 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
590 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
591 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
592
593 Programs_unittests_testwebresource_SOURCES = Source/WebKit/gtk/tests/testwebresource.c
594 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
595 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
596
597 Programs_unittests_testwebdatasource_SOURCES = Source/WebKit/gtk/tests/testwebdatasource.c
598 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
599 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
600
601 Programs_unittests_testwebview_SOURCES = Source/WebKit/gtk/tests/testwebview.c Source/WebKit/gtk/tests/test_utils.c
602 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
603 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
604 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
605
606 Programs_unittests_testhittestresult_SOURCES = Source/WebKit/gtk/tests/testhittestresult.c
607 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
608 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
609
610 Programs_unittests_testkeyevents_SOURCES = Source/WebKit/gtk/tests/testkeyevents.c
611 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
612 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
613 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
614
615 Programs_unittests_testcopyandpaste_SOURCES = Source/WebKit/gtk/tests/testcopyandpaste.c \
616         Source/WebCore/platform/gtk/GtkVersioning.c
617 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
618         -I$(srcdir)/Source/WebCore/platform/gtk \
619         -I$(srcdir)/Source/WebCore
620 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
621 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
622
623 # Project-wide clean rules
624 # Files that will be cleaned
625 CLEANFILES += \
626         $(BUILT_SOURCES) \
627         $(top_builddir)/stamp-webkitmarshal.cpp \
628         $(top_builddir)/stamp-webkitmarshal.h \
629         $(top_builddir)/stamp-webkitenumtypes.cpp \
630         $(top_builddir)/stamp-webkitenumtypes.h \
631         $(top_builddir)/Programs/GtkLauncher
632
633 DISTCLEANFILES += \
634         $(top_builddir)/Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
635         $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml \
636         $(top_builddir)/Source/WebKit/gtk/webkit/webkitversion.h