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