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