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