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