72f4759c4588c32f5194d32e44fa33ce4de85439
[WebKit-https.git] / Tools / TestWebKitAPI / GNUmakefile.am
1 noinst_LTLIBRARIES += \
2         Libraries/libTestWebKitAPIMain.la
3
4 Libraries_libTestWebKitAPIMain_la_SOURCES = \
5         Tools/TestWebKitAPI/Test.h \
6         Tools/TestWebKitAPI/TestsController.cpp \
7         Tools/TestWebKitAPI/TestsController.h \
8         Tools/TestWebKitAPI/gtk/main.cpp
9
10 # Use -isystem gcc flag so that gcc considers gtest headers as system headers.
11 # We need this to avoid a lot of compile warnings due to -Wundef.
12 # See http://code.google.com/p/googletest/issues/detail?id=258
13 Libraries_libTestWebKitAPIMain_la_CPPFLAGS = \
14         -isystem $(srcdir)/Source/ThirdParty/gtest/include \
15         -I$(srcdir)/Tools/TestWebKitAPI \
16         -I$(srcdir)/Source/ThirdParty/gtest/include \
17         -I$(top_builddir)/DerivedSources/WebCore/include \
18         -I$(top_builddir)/DerivedSources/WebKit2/include \
19         $(global_cppflags) \
20         $(javascriptcore_cppflags) \
21         $(GTK_CFLAGS)
22
23 noinst_PROGRAMS += \
24         Programs/TestWebKitAPI/TestWTF \
25         Programs/TestWebKitAPI/TestJavaScriptCore \
26         Programs/TestWebKitAPI/TestWebCore \
27         Programs/TestWebKitAPI/TestGtk
28
29 if ENABLE_WEBKIT2
30 noinst_PROGRAMS += \
31         Programs/TestWebKitAPI/TestWebKit2
32 endif # ENABLE_WEBKIT2
33
34 Programs_TestWebKitAPI_TestWTF_CPPFLAGS = \
35         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
36         $(GLIB_LIBS) \
37         $(CAIRO_CFLAGS)
38
39 Programs_TestWebKitAPI_TestWTF_CXXFLAGS = \
40         $(global_cxxflags)
41
42 Programs_TestWebKitAPI_TestWTF_LDADD = \
43         Libraries/libTestWebKitAPIMain.la \
44         Libraries/libgtest.la \
45         libWTF.la \
46         $(GTK_LIBS) \
47         $(GLIB_LIBS)
48
49 Programs_TestWebKitAPI_TestWTF_LDFLAGS = \
50         -no-install \
51         -no-fast-install
52
53 Programs_TestWebKitAPI_TestWTF_SOURCES = \
54         Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp \
55         Tools/TestWebKitAPI/Tests/WTF/CString.cpp \
56         Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp \
57         Tools/TestWebKitAPI/Tests/WTF/Functional.cpp \
58         Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp \
59         Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp \
60         Tools/TestWebKitAPI/Tests/WTF/IntegerToStringConversion.cpp \
61         Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp \
62         Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp \
63         Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp \
64         Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp \
65         Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp \
66         Tools/TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp \
67         Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp \
68         Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp \
69         Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp \
70         Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp \
71         Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp \
72         Tools/TestWebKitAPI/Tests/WTF/Vector.cpp \
73         Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp \
74         Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp \
75         Tools/TestWebKitAPI/WTFStringUtilities.h
76
77 Programs_TestWebKitAPI_TestJavaScriptCore_CPPFLAGS = \
78         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS)
79
80 Programs_TestWebKitAPI_TestJavaScriptCore_CXXFLAGS = \
81         $(global_cxxflags)
82
83 Programs_TestWebKitAPI_TestJavaScriptCore_LDADD = \
84         Libraries/libTestWebKitAPIMain.la \
85         Libraries/libgtest.la \
86         libWTF.la \
87         $(GTK_LIBS)
88
89 Programs_TestWebKitAPI_TestJavaScriptCore_LDFLAGS = \
90         -no-install \
91         -no-fast-install
92
93 Programs_TestWebKitAPI_TestJavaScriptCore_SOURCES = \
94         Tools/TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp
95
96 webcore_layer_deps = \
97         libPlatform.la \
98         libPlatformGtk.la \
99         libWebCorePlatform.la \
100         libWebCoreGtk.la \
101         libWebCore.la \
102         libWebCoreModules.la
103 if ENABLE_SVG
104 webcore_layer_deps += \
105         libWebCoreSVG.la
106 endif
107 if ENABLE_INDEXED_DATABASE
108 webcore_layer_deps += \
109         libLevelDB.la
110 endif
111 if USE_OPENGL
112 webcore_layer_deps += \
113         libANGLE.la
114 endif
115
116 webcore_layer_archives = $(foreach lib, $(webcore_layer_deps), $(shell echo $(lib) | sed "s/\(.*\)\.la/.libs\/\1.a/"))
117
118 WebCoreLayer.a: $(webcore_layer_deps)
119         $(AM_V_GEN)
120         $(AM_V_at)$(foreach archive, $(webcore_layer_archives), $(shell ar t $(archive) | xargs -n50 ar cruT $@))
121
122 Programs_TestWebKitAPI_TestWebCore_CPPFLAGS = \
123         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
124         -I$(top_builddir)/DerivedSources/WebCore/include
125
126 Programs_TestWebKitAPI_TestWebCore_CXXFLAGS = \
127         $(global_cxxflags)
128
129 Programs_TestWebKitAPI_TestWebCore_LDADD = \
130         Libraries/libTestWebKitAPIMain.la \
131         Libraries/libgtest.la \
132         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
133         libWTF.la \
134         WebCoreLayer.a \
135         $(CAIRO_LIBS) \
136         $(CLUTTER_LIBS) \
137         $(FREETYPE_LIBS) \
138         $(GAMEPAD_LIBS) \
139         $(GEOCLUE_LIBS) \
140         $(GAIL_LIBS) \
141         $(GLIB_LIBS) \
142         $(GSTREAMER_LIBS) \
143         $(GTK_LIBS) \
144         $(JPEG_LIBS) \
145         $(LIBSECRET_LIBS) \
146         $(LIBSOUP_LIBS) \
147         $(LIBXML_LIBS) \
148         $(LIBXSLT_LIBS) \
149         $(OPENGL_LIBS) \
150         $(PANGO_LIBS) \
151         $(PNG_LIBS) \
152         $(SQLITE3_LIBS) \
153         $(UNICODE_LIBS) \
154         $(WEBP_LIBS) \
155         $(XRENDER_LIBS) \
156         $(XT_LIBS) \
157         $(ZLIB_LIBS)
158
159 Programs_TestWebKitAPI_TestWebCore_LDFLAGS = \
160         -no-install \
161         -no-fast-install
162
163 Programs_TestWebKitAPI_TestWebCore_SOURCES = \
164         Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp \
165         Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
166
167 Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
168         $(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
169         $(platform_cppflags) \
170         $(platformgtk_cppflags) \
171         $(webcore_cppflags) \
172         $(webcoregtk_cppflags) \
173         $(FREETYPE_CFLAGS) \
174         $(GLIB_CFLAGS) \
175         $(GTK_CFLAGS) \
176         $(LIBSOUP_CFLAGS)
177
178 Programs_TestWebKitAPI_TestGtk_LDADD = \
179         Libraries/libTestWebKitAPIMain.la \
180         Libraries/libgtest.la \
181         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
182         libPlatformGtk.la \
183         libWebCore.la \
184         libWebCoreGtk.la \
185         $(FREETYPE_LIBS) \
186         $(GLIB_LIBS) \
187         $(GTK_LIBS) \
188         $(LIBSOUP_LIBS)
189
190 Programs_TestWebKitAPI_TestGtk_LDFLAGS = \
191         $(Programs_TestWebKitAPI_TestWTF_LDFLAGS)
192
193 Programs_TestWebKitAPI_TestGtk_SOURCES = \
194         Source/WebCore/platform/graphics/IntRect.cpp \
195         Source/WebCore/platform/graphics/cairo/IntRectCairo.cpp \
196         Source/WebCore/platform/graphics/gtk/IntRectGtk.cpp \
197         Source/WebCore/platform/gtk/GtkInputMethodFilter.cpp \
198         Tools/TestWebKitAPI/config.h \
199         Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
200
201 Programs_TestWebKitAPI_TestWebKit2_CPPFLAGS = \
202         $(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
203         -I$(top_builddir)/DerivedSources/WebKit2/include \
204         $(FREETYPE_CFLAGS) \
205         $(GLIB_CFLAGS) \
206         $(GTK_CFLAGS) \
207         $(LIBSOUP_CFLAGS)
208
209 Programs_TestWebKitAPI_TestWebKit2_LDADD = \
210         Libraries/libTestWebKitAPIMain.la \
211         Libraries/libgtest.la \
212         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
213         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
214         $(FREETYPE_LIBS) \
215         $(GLIB_LIBS) \
216         $(GTK_LIBS) \
217         $(LIBSOUP_LIBS)
218
219 Programs_TestWebKitAPI_TestWebKit2_LDFLAGS = \
220         $(Programs_TestWebKitAPI_TestWTF_LDFLAGS)
221
222 Programs_TestWebKitAPI_TestWebKit2_SOURCES = \
223         Tools/TestWebKitAPI/config.h \
224         Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp \
225         Tools/TestWebKitAPI/gtk/PlatformWebViewGtk.cpp \
226         Tools/TestWebKitAPI/JavaScriptTest.cpp \
227         Tools/TestWebKitAPI/JavaScriptTest.h \
228         Tools/TestWebKitAPI/PlatformUtilities.cpp \
229         Tools/TestWebKitAPI/PlatformUtilities.h \
230         Tools/TestWebKitAPI/PlatformWebView.h \
231         Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp \
232         Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp \
233         Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp \
234         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp \
235         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp \
236         Tools/TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp \
237         Tools/TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp \
238         Tools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp \
239         Tools/TestWebKitAPI/Tests/WebKit2/Find.cpp \
240         Tools/TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp \
241         Tools/TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp \
242         Tools/TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp \
243         Tools/TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback.cpp \
244         Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp \
245         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp \
246         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins.cpp \
247         Tools/TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp \
248         Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp \
249         Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp \
250         Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp \
251         Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp \
252         Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp \
253         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp \
254         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp \
255         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages.cpp \
256         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames.cpp \
257         Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp \
258         Tools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp \
259         Tools/TestWebKitAPI/Tests/WebKit2/ParentFrame.cpp \
260         Tools/TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp \
261         Tools/TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp \
262         Tools/TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly.cpp \
263         Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp \
264         Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp \
265         Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp \
266         Tools/TestWebKitAPI/Tests/WebKit2/TerminateTwice.cpp \
267         Tools/TestWebKitAPI/Tests/WebKit2/UserMessage.cpp \
268         Tools/TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent.cpp \
269         Tools/TestWebKitAPI/Tests/WebKit2/WKConnection.cpp \
270         Tools/TestWebKitAPI/Tests/WebKit2/WKPageGetScaleFactorNotZero.cpp \
271         Tools/TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp \
272         Tools/TestWebKitAPI/Tests/WebKit2/WKString.cpp \
273         Tools/TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp
274
275 if ENABLE_WEBKIT2
276 noinst_LTLIBRARIES += \
277         Libraries/libTestWebKitAPIInjectedBundle.la
278 endif # ENABLE_WEBKIT2
279
280 Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES = \
281         Tools/TestWebKitAPI/InjectedBundleController.cpp \
282         Tools/TestWebKitAPI/InjectedBundleController.h \
283         Tools/TestWebKitAPI/InjectedBundleMain.cpp \
284         Tools/TestWebKitAPI/InjectedBundleTest.h \
285         Tools/TestWebKitAPI/PlatformUtilities.cpp \
286         Tools/TestWebKitAPI/PlatformUtilities.h \
287         Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp \
288         Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp \
289         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp \
290         Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp \
291         Tools/TestWebKitAPI/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp \
292         Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp \
293         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp \
294         Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp \
295         Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp \
296         Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp \
297         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp \
298         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp \
299         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp \
300         Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp \
301         Tools/TestWebKitAPI/Tests/WebKit2/ParentFrame_Bundle.cpp \
302         Tools/TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp \
303         Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp \
304         Tools/TestWebKitAPI/Tests/WebKit2/UserMessage_Bundle.cpp \
305         Tools/TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp \
306         Tools/TestWebKitAPI/Tests/WebKit2/WKConnection_Bundle.cpp \
307         Tools/TestWebKitAPI/gtk/InjectedBundleControllerGtk.cpp \
308         Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp
309
310 Libraries_libTestWebKitAPIInjectedBundle_la_LDFLAGS = \
311         -rpath ${shell pwd}/$(top_builddir)/Libraries/.libs \
312         $(no_undefined) \
313         -avoid-version \
314         -module
315
316 Libraries_libTestWebKitAPIInjectedBundle_la_CPPFLAGS = \
317         $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
318         -I$(top_builddir)/DerivedSources/InjectedBundle \
319         $(GTK_CFLAGS)
320
321 Libraries_libTestWebKitAPIInjectedBundle_la_CXXFLAGS = \
322         $(global_cxxflags)
323
324 Libraries_libTestWebKitAPIInjectedBundle_la_CFLAGS = \
325         $(global_cflags)
326
327
328 stamp-testwebkitapi-webcore-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebCore_SOURCES)
329         $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI/Tests/WebCore $(GENSOURCES_WEBCORE)/include gtk \
330         && echo timestamp > $(@F)
331
332 stamp-testwebkitapi-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebKit2_SOURCES) $(Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES)
333         $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk \
334         && echo timestamp > $(@F)
335
336 BUILT_SOURCES += $(top_builddir)/stamp-testwebkitapi-webcore-forwarding-headers
337 if ENABLE_WEBKIT2
338 BUILT_SOURCES += $(top_builddir)/stamp-testwebkitapi-webkit2-forwarding-headers
339 endif # ENABLE_WEBKIT2
340
341
342 EXTRA_DIST += \
343         Tools/TestWebKitAPI/Tests/WebKit2/18-characters.html \
344         Tools/TestWebKitAPI/Tests/WebKit2/file-with-anchor.html \
345         Tools/TestWebKitAPI/Tests/WebKit2/find.html \
346         Tools/TestWebKitAPI/Tests/WebKit2/icon.png \
347         Tools/TestWebKitAPI/Tests/WebKit2/lots-of-iframes.html \
348         Tools/TestWebKitAPI/Tests/WebKit2/lots-of-images.html \
349         Tools/TestWebKitAPI/Tests/WebKit2/lots-of-text.html \
350         Tools/TestWebKitAPI/Tests/WebKit2/mouse-move-listener.html \
351         Tools/TestWebKitAPI/Tests/WebKit2/push-state.html \
352         Tools/TestWebKitAPI/Tests/WebKit2/simple-accelerated-compositing.html \
353         Tools/TestWebKitAPI/Tests/WebKit2/simple-form.html \
354         Tools/TestWebKitAPI/Tests/WebKit2/simple.html \
355         Tools/TestWebKitAPI/Tests/WebKit2/simple-iframe.html \
356         Tools/TestWebKitAPI/Tests/WebKit2/simple-tall.html \
357         Tools/TestWebKitAPI/Tests/WebKit2/spacebar-scrolling.html