[GTK] Enable introspection always for developer builds
[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) \
299              CFLAGS="$(CFLAGS) -Wno-deprecated-declarations" \
300              $(G_IR_SCANNER) \
301              --quiet \
302              --warn-all \
303              --warn-error \
304              --symbol-prefix=webkit \
305              --identifier-prefix=WebKit \
306              --namespace=WebKit \
307              --nsversion=@WEBKITGTK_API_VERSION@ \
308              --include=GObject-2.0 \
309              --include=Gtk-@GTK_API_VERSION@ \
310              --include=JavaScriptCore-@WEBKITGTK_API_VERSION@ \
311              --include=Soup-2.4 \
312              --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
313              --library=javascriptcoregtk-@WEBKITGTK_API_VERSION@ \
314              --libtool="$(LIBTOOL)" \
315              --pkg=gobject-2.0 \
316              --pkg=gtk+-@GTK_API_VERSION@ \
317              --pkg=libsoup-2.4 \
318              --pkg-export=webkitgtk-@WEBKITGTK_API_VERSION@ \
319              --output=$@ \
320              --add-include-path=$(WebKit) \
321              --add-include-path=$(top_builddir) \
322              --c-include="webkit/webkit.h" \
323              -DBUILDING_WEBKIT \
324              -I$(srcdir)/Source \
325              -I$(WebKit) \
326              -I$(GENSOURCES) \
327              -I$(GENSOURCES_WEBKITDOM) \
328              -I$(GENSOURCES_WEBKIT) \
329              -I$(top_builddir)/Source/WebKit/gtk \
330              -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
331              -I$(top_srcdir) \
332              $(GENSOURCES_WEBKIT)/webkitenumtypes.h \
333              $(webkitgtk_h_api) \
334              $(webkitgtk_gdom_built_h_api) \
335              $(WebKit)/webkit/*.cpp
336
337 WebKit-@WEBKITGTK_API_VERSION@.typelib: WebKit-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER)
338         $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@
339
340 gir_DATA += WebKit-@WEBKITGTK_API_VERSION@.gir
341 typelibs_DATA += WebKit-@WEBKITGTK_API_VERSION@.typelib
342 CLEANFILES += WebKit-@WEBKITGTK_API_VERSION@.gir WebKit-@WEBKITGTK_API_VERSION@.typelib
343 endif
344 endif
345
346 WEBKIT_MARSHAL_LIST = $(WebKit)/webkitmarshal.list
347 $(GENSOURCES_WEBKIT)/webkitmarshal.cpp: stamp-webkitmarshal.cpp
348         @true
349 $(GENSOURCES_WEBKIT)/webkitmarshal.h: stamp-webkitmarshal.h
350         @true
351
352 stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
353         $(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
354         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
355         echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
356         echo timestamp > $(@F)
357
358 stamp-webkitmarshal.h: $(WEBKIT_MARSHAL_LIST)
359         $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(GENSOURCES_WEBKIT)/webkitmarshal.h && \
360         echo timestamp > $(@F)
361
362 $(GENSOURCES_WEBKIT)/webkitenumtypes.h: stamp-webkitenumtypes.h
363         @true
364 stamp-webkitenumtypes.h: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
365         $(AM_V_GEN)glib-mkenums \
366                         --fhead "#ifndef WEBKIT_ENUM_TYPES_H\n" \
367                         --fhead "#define WEBKIT_ENUM_TYPES_H\n\n" \
368                         --fhead "#include <glib-object.h>\n\n" \
369                         --fhead "#include <webkit/webkitdefines.h>\n\n" \
370                         --fhead "G_BEGIN_DECLS\n\n" \
371                         --ftail "G_END_DECLS\n\n" \
372                         --ftail "#endif\n" \
373                         --fprod "#include <webkit/@basename@>\n\n" \
374                         --eprod "#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n\n" \
375                         --eprod "WEBKIT_API GType\n@enum_name@_get_type(void);\n\n" \
376                 $(webkitgtk_h_api) | \
377                 sed 's,web_kit,webkit,' | \
378                 sed 's,WEBKIT_TYPE_KIT,WEBKIT_TYPE,' \
379                 > xgen-gth \
380         && (cmp -s xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h || cp xgen-gth $(GENSOURCES_WEBKIT)/webkitenumtypes.h) \
381         && rm -f xgen-gth \
382         && echo timestamp > $(@F)
383
384 $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefile.am
385         $(AM_V_GEN)glib-mkenums \
386                         --fhead "#include <config.h>\n" \
387                         --fhead "#include <glib-object.h>\n" \
388                         --fhead "#include \"$(GENSOURCES_WEBKIT)/webkitenumtypes.h\"\n\n" \
389                         --fhead "extern \"C\" {\n\n" \
390                         --fprod "\n/* enumerations from \"@filename@\" */" \
391                         --vhead "static const G@Type@Value _@enum_name@_values[] = {" \
392                         --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
393                         --vtail "    { 0, NULL, NULL }\n};\n\n" \
394                         --vtail "GType @enum_name@_get_type(void)\n{\n" \
395                         --vtail "    static GType type = 0;\n\n" \
396                         --vtail "    if (!type)\n" \
397                         --vtail "        type = g_@type@_register_static(\"@EnumName@\", _@enum_name@_values);\n\n" \
398                         --vtail "    return type;\n}\n\n" \
399                         --ftail "}\n" \
400                 $(webkitgtk_h_api) | \
401                 sed 's,web_kit,webkit,' \
402                 > xgen-gtc \
403         && cp xgen-gtc $@ \
404         && rm -f xgen-gtc
405
406 EXTRA_DIST += \
407         $(WebKit)/ChangeLog \
408         $(WebKit)/NEWS \
409         $(WebKit)/docs/webkitgtk-docs.sgml \
410         $(WebKit)/docs/webkitgtk-sections.txt \
411         $(WebKit)/docs/webkitgtk.types \
412         $(WebKit)/docs/webkitenvironment.xml \
413         $(WebKit)/docs/webkitgtk-overrides.txt \
414         $(WebKit)/webkitmarshal.list \
415         $(WebKit)/resources/* \
416         $(WebKit)/tests/resources/* \
417         $(WebKit)/tests/test_utils.h
418
419 # extra resource files
420 resourcesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/resources
421 dist_resources_DATA = \
422         $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html)
423
424 # Build unit tests
425 webkit_tests_cflags = \
426         -fno-strict-aliasing \
427         -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
428         -I$(WebKit) \
429         -I$(GENSOURCES) \
430         -I$(top_builddir)/Source/WebKit/gtk \
431         -I$(top_srcdir)/Source/WebCore/bindings \
432         -I$(top_srcdir)/Source/WebCore/bindings/gobject \
433         $(global_cppflags) \
434         $(global_cflags) \
435         $(javascriptcore_cppflags) \
436         $(FREETYPE_CFLAGS) \
437         $(GLIB_CFLAGS) \
438         $(GTK_CFLAGS) \
439         $(LIBSOUP_CFLAGS) \
440         $(XRENDER_CFLAGS) \
441         $(XT_CFLAGS)
442
443 webkit_tests_ldadd = \
444         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
445         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
446         $(FREETYPE_LIBS) \
447         $(GTK_LIBS) \
448         $(GLIB_LIBS) \
449         $(LIBSOUP_LIBS) \
450         $(XRENDER_LIBS)
451
452 webkit_tests_ldflags = \
453         -no-install \
454         -no-fast-install
455
456 if ENABLE_WEBKIT1
457 noinst_PROGRAMS += \
458         Programs/unittests/testapplicationcache \
459         Programs/unittests/testcontextmenu \
460         Programs/unittests/testdomdocument \
461         Programs/unittests/testdomdomwindow \
462         Programs/unittests/testdomnode \
463         Programs/unittests/testhttpbackend \
464         Programs/unittests/testfavicondatabase \
465         Programs/unittests/testloading \
466         Programs/unittests/testglobals \
467         Programs/unittests/testmimehandling \
468         Programs/unittests/testnetworkrequest \
469         Programs/unittests/testnetworkresponse \
470         Programs/unittests/testwebframe \
471         Programs/unittests/testwebbackforwardlist \
472         Programs/unittests/testwebhistoryitem \
473         Programs/unittests/testwindow \
474         Programs/unittests/testdownload \
475         Programs/unittests/testatk \
476         Programs/unittests/testatkroles \
477         Programs/unittests/testhittestresult \
478         Programs/unittests/testwebinspector \
479         Programs/unittests/testwebsettings \
480         Programs/unittests/testwebresource \
481         Programs/unittests/testwebdatasource \
482         Programs/unittests/testwebplugindatabase \
483         Programs/unittests/testwebview \
484         Programs/unittests/testkeyevents \
485         Programs/unittests/testcopyandpaste
486 endif
487
488 # Add additional tests here
489 Programs_unittests_testapplicationcache_SOURCES = Source/WebKit/gtk/tests/testapplicationcache.c
490 Programs_unittests_testapplicationcache_CFLAGS = $(webkit_tests_cflags)
491 Programs_unittests_testapplicationcache_LDADD = $(webkit_tests_ldadd)
492 Programs_unittests_testapplicationcache_LDFLAGS = $(webkit_tests_ldflags)
493
494 Programs_unittests_testcontextmenu_SOURCES = Source/WebKit/gtk/tests/testcontextmenu.c
495 Programs_unittests_testcontextmenu_CFLAGS = $(webkit_tests_cflags)
496 Programs_unittests_testcontextmenu_LDADD = $(webkit_tests_ldadd)
497 Programs_unittests_testcontextmenu_LDFLAGS = $(webkit_tests_ldflags)
498
499 Programs_unittests_testdomdocument_SOURCES = Source/WebKit/gtk/tests/testdomdocument.c
500 Programs_unittests_testdomdocument_CFLAGS = $(webkit_tests_cflags)
501 Programs_unittests_testdomdocument_LDADD = $(webkit_tests_ldadd)
502 Programs_unittests_testdomdocument_LDFLAGS = $(webkit_tests_ldflags)
503
504 Programs_unittests_testdomdomwindow_SOURCES = Source/WebKit/gtk/tests/testdomdomwindow.c
505 Programs_unittests_testdomdomwindow_CFLAGS = $(webkit_tests_cflags)
506 Programs_unittests_testdomdomwindow_LDADD = $(webkit_tests_ldadd)
507 Programs_unittests_testdomdomwindow_LDFLAGS = $(webkit_tests_ldflags)
508
509 Programs_unittests_testdomnode_SOURCES = Source/WebKit/gtk/tests/testdomnode.c
510 Programs_unittests_testdomnode_CFLAGS = $(webkit_tests_cflags)
511 Programs_unittests_testdomnode_LDADD = $(webkit_tests_ldadd)
512 Programs_unittests_testdomnode_LDFLAGS = $(webkit_tests_ldflags)
513
514 Programs_unittests_testhttpbackend_SOURCES = Source/WebKit/gtk/tests/testhttpbackend.c
515 Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
516 Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
517 Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
518
519 Programs_unittests_testfavicondatabase_SOURCES = Source/WebKit/gtk/tests/testfavicondatabase.c Source/WebKit/gtk/tests/test_utils.c
520 Programs_unittests_testfavicondatabase_CFLAGS = $(webkit_tests_cflags)
521 Programs_unittests_testfavicondatabase_LDADD = $(webkit_tests_ldadd)
522 Programs_unittests_testfavicondatabase_LDFLAGS = $(webkit_tests_ldflags)
523
524 Programs_unittests_testglobals_SOURCES = Source/WebKit/gtk/tests/testglobals.c
525 Programs_unittests_testglobals_CFLAGS = $(webkit_tests_cflags)
526 Programs_unittests_testglobals_LDADD = $(webkit_tests_ldadd)
527 Programs_unittests_testglobals_LDFLAGS = $(webkit_tests_ldflags)
528
529 Programs_unittests_testloading_SOURCES = Source/WebKit/gtk/tests/testloading.c
530 Programs_unittests_testloading_CFLAGS = $(webkit_tests_cflags)
531 Programs_unittests_testloading_LDADD = $(webkit_tests_ldadd)
532 Programs_unittests_testloading_LDFLAGS = $(webkit_tests_ldflags)
533
534 Programs_unittests_testmimehandling_SOURCES = Source/WebKit/gtk/tests/testmimehandling.c Source/WebKit/gtk/tests/test_utils.c
535 Programs_unittests_testmimehandling_CFLAGS = $(webkit_tests_cflags)
536 Programs_unittests_testmimehandling_LDADD = $(webkit_tests_ldadd)
537 Programs_unittests_testmimehandling_LDFLAGS = $(webkit_tests_ldflags)
538
539 Programs_unittests_testnetworkrequest_SOURCES = Source/WebKit/gtk/tests/testnetworkrequest.c
540 Programs_unittests_testnetworkrequest_CFLAGS = $(webkit_tests_cflags)
541 Programs_unittests_testnetworkrequest_LDADD = $(webkit_tests_ldadd)
542 Programs_unittests_testnetworkrequest_LDFLAGS = $(webkit_tests_ldflags)
543
544 Programs_unittests_testnetworkresponse_SOURCES = Source/WebKit/gtk/tests/testnetworkresponse.c
545 Programs_unittests_testnetworkresponse_CFLAGS = $(webkit_tests_cflags)
546 Programs_unittests_testnetworkresponse_LDADD = $(webkit_tests_ldadd)
547 Programs_unittests_testnetworkresponse_LDFLAGS = $(webkit_tests_ldflags)
548
549 Programs_unittests_testwebframe_SOURCES = Source/WebKit/gtk/tests/testwebframe.c
550 Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
551 Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
552 Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
553
554 Programs_unittests_testwebplugindatabase_SOURCES = Source/WebKit/gtk/tests/testwebplugindatabase.c
555 Programs_unittests_testwebplugindatabase_CFLAGS = -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" $(webkit_tests_cflags)
556 Programs_unittests_testwebplugindatabase_LDADD = $(webkit_tests_ldadd)
557 Programs_unittests_testwebplugindatabase_LDFLAGS = $(webkit_tests_ldflags)
558
559 Programs_unittests_testwebbackforwardlist_SOURCES = Source/WebKit/gtk/tests/testwebbackforwardlist.c
560 Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
561 Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
562 Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
563
564 Programs_unittests_testwebhistoryitem_SOURCES = Source/WebKit/gtk/tests/testwebhistoryitem.c
565 Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
566 Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
567 Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
568
569 Programs_unittests_testwindow_SOURCES = Source/WebKit/gtk/tests/testwindow.c
570 Programs_unittests_testwindow_CFLAGS = $(webkit_tests_cflags)
571 Programs_unittests_testwindow_LDADD = $(webkit_tests_ldadd)
572 Programs_unittests_testwindow_LDFLAGS = $(webkit_tests_ldflags)
573
574 Programs_unittests_testdownload_SOURCES = Source/WebKit/gtk/tests/testdownload.c
575 Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
576 Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
577 Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
578
579 Programs_unittests_testatk_SOURCES = Source/WebKit/gtk/tests/testatk.c
580 Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
581 Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
582 Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
583
584 Programs_unittests_testatkroles_SOURCES = Source/WebKit/gtk/tests/testatkroles.c
585 Programs_unittests_testatkroles_CFLAGS = $(webkit_tests_cflags)
586 Programs_unittests_testatkroles_LDADD = $(webkit_tests_ldadd)
587 Programs_unittests_testatkroles_LDFLAGS = $(webkit_tests_ldflags)
588
589 Programs_unittests_testwebinspector_SOURCES = Source/WebKit/gtk/tests/testwebinspector.c Source/WebKit/gtk/tests/test_utils.c
590 Programs_unittests_testwebinspector_CFLAGS = $(webkit_tests_cflags)
591 Programs_unittests_testwebinspector_LDADD = $(webkit_tests_ldadd)
592 Programs_unittests_testwebinspector_LDFLAGS = $(webkit_tests_ldflags)
593
594 Programs_unittests_testwebsettings_SOURCES = Source/WebKit/gtk/tests/testwebsettings.c
595 Programs_unittests_testwebsettings_CFLAGS = $(webkit_tests_cflags)
596 Programs_unittests_testwebsettings_LDADD = $(webkit_tests_ldadd)
597 Programs_unittests_testwebsettings_LDFLAGS = $(webkit_tests_ldflags)
598
599 Programs_unittests_testwebresource_SOURCES = Source/WebKit/gtk/tests/testwebresource.c
600 Programs_unittests_testwebresource_CFLAGS = $(webkit_tests_cflags)
601 Programs_unittests_testwebresource_LDADD = $(webkit_tests_ldadd)
602
603 Programs_unittests_testwebdatasource_SOURCES = Source/WebKit/gtk/tests/testwebdatasource.c
604 Programs_unittests_testwebdatasource_CFLAGS = $(webkit_tests_cflags)
605 Programs_unittests_testwebdatasource_LDADD = $(webkit_tests_ldadd)
606
607 Programs_unittests_testwebview_SOURCES = Source/WebKit/gtk/tests/testwebview.c Source/WebKit/gtk/tests/test_utils.c
608 Programs_unittests_testwebview_CFLAGS = $(webkit_tests_cflags)
609 Programs_unittests_testwebview_LDADD = $(webkit_tests_ldadd)
610 Programs_unittests_testwebview_LDFLAGS = $(webkit_tests_ldflags)
611
612 Programs_unittests_testhittestresult_SOURCES = Source/WebKit/gtk/tests/testhittestresult.c
613 Programs_unittests_testhittestresult_CFLAGS = $(webkit_tests_cflags)
614 Programs_unittests_testhittestresult_LDADD = $(webkit_tests_ldadd)
615
616 Programs_unittests_testkeyevents_SOURCES = Source/WebKit/gtk/tests/testkeyevents.c
617 Programs_unittests_testkeyevents_CFLAGS = $(webkit_tests_cflags)
618 Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
619 Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
620
621 Programs_unittests_testcopyandpaste_SOURCES = Source/WebKit/gtk/tests/testcopyandpaste.c \
622         Source/WebCore/platform/gtk/GtkVersioning.c
623 Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
624         -I$(srcdir)/Source/WebCore/platform/gtk \
625         -I$(srcdir)/Source/WebCore
626 Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
627 Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
628
629 # Project-wide clean rules
630 # Files that will be cleaned
631 CLEANFILES += \
632         $(BUILT_SOURCES) \
633         $(top_builddir)/stamp-webkitmarshal.cpp \
634         $(top_builddir)/stamp-webkitmarshal.h \
635         $(top_builddir)/stamp-webkitenumtypes.cpp \
636         $(top_builddir)/stamp-webkitenumtypes.h \
637         $(top_builddir)/Programs/GtkLauncher
638
639 DISTCLEANFILES += \
640         $(top_builddir)/Source/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
641         $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml \
642         $(top_builddir)/Source/WebKit/gtk/webkit/webkitversion.h