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