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