Fix segmentation fault bug.
[vuplus_webkit] / Tools / GNUmakefile.am
1 noinst_PROGRAMS += \
2         Programs/DumpRenderTree \
3         Programs/GtkLauncher
4
5 if ENABLE_WEBKIT2
6 noinst_PROGRAMS += \
7         Programs/GtkLauncher2
8 endif
9
10 # GtkLauncher
11 gtklauncher_sources = \
12         Tools/GtkLauncher/main.c
13
14 gtklauncher_cflags = \
15         -fno-strict-aliasing \
16         $(global_cflags) \
17         $(GTK_CFLAGS) \
18         $(LIBSOUP_CFLAGS)
19
20 gtklauncher_ldadd = \
21         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
22         $(GTK_LIBS) \
23         $(GLIB_LIBS) \
24         $(LIBSOUP_LIBS) \
25         $(WINMM_LIBS)
26
27 gtklauncher_ldflags = \
28         -no-fast-install \
29         -no-install
30
31 Programs_GtkLauncher_CPPFLAGS = \
32         -I$(srcdir)/Source/WebKit/gtk \
33         -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \
34         -I$(top_builddir)/Source/WebKit/gtk \
35         -I$(top_builddir)/DerivedSources \
36         $(global_cppflags) \
37         $(javascriptcore_cppflags)
38
39 Programs_GtkLauncher_SOURCES = \
40         $(gtklauncher_sources)
41
42 Programs_GtkLauncher_CFLAGS = \
43         -ansi \
44         $(gtklauncher_cflags)
45
46 Programs_GtkLauncher_LDADD = \
47         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
48         $(gtklauncher_ldadd)
49
50 Programs_GtkLauncher_LDFLAGS = \
51         $(gtklauncher_ldflags)
52
53 if ENABLE_WEBKIT2
54 Programs_GtkLauncher2_CPPFLAGS = \
55         -I$(srcdir)/Source \
56         -I$(top_builddir)/DerivedSources/WebKit2/include \
57         -I$(srcdir)/Source/WebKit2/UIProcess/API/gtk \
58         -I$(top_builddir)/Source/WebKit2/UIProcess/API/gtk \
59         -I$(srcdir)/Source/WebKit/gtk \
60         -I$(top_builddir)/Source/WebKit/gtk \
61         -I$(top_builddir)/DerivedSources \
62         $(global_cppflags) \
63         $(javascriptcore_cppflags)
64
65 Programs_GtkLauncher2_SOURCES = \
66         $(gtklauncher_sources)
67
68 Programs_GtkLauncher2_CFLAGS = \
69         -DWEBKIT2=\"1\" \
70         $(gtklauncher_cflags)
71
72 Programs_GtkLauncher2_LDADD = \
73         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
74         $(gtklauncher_ldadd)
75
76 Programs_GtkLauncher2_LDFLAGS = \
77         $(gtklauncher_ldflags)
78
79 endif
80
81 # libWebCoreInternals
82 # We must split off the window.internals implementation into a separate
83 # convenience library because it requires a different include path order
84 # to prefer the WebCore config.h over the DumpRenderTree config.h
85 noinst_LTLIBRARIES += libWebCoreInternals.la
86 libWebCoreInternals_la_SOURCES = \
87         Source/WebCore/bindings/js/JSDOMWrapper.cpp \
88         Source/WebCore/bindings/js/JSDOMWrapper.h \
89         Source/WebCore/testing/Internals.cpp \
90         Source/WebCore/testing/Internals.h \
91         Source/WebCore/testing/js/WebCoreTestSupport.cpp \
92         Source/WebCore/testing/js/WebCoreTestSupport.h
93
94 libwebcoreinternals_built_sources += \
95         DerivedSources/WebCore/JSInternals.cpp \
96         DerivedSources/WebCore/JSInternals.h
97 nodist_libWebCoreInternals_la_SOURCES = $(libwebcoreinternals_built_sources)
98 BUILT_SOURCES += $(libwebcoreinternals_built_sources)
99
100 libWebCoreInternals_la_CPPFLAGS = \
101         $(global_cppflags) \
102         $(webcore_cppflags) \
103         $(webcoregtk_cppflags) \
104         $(javascriptcore_cppflags) \
105         $(CAIRO_CFLAGS) \
106         $(LIBSOUP_CFLAGS) \
107         -I$(top_builddir)/DerivedSources \
108         -I$(top_builddir)/DerivedSources/WebCore
109
110 libWebCoreInternals_la_CXXFLAGS = \
111         $(global_cxxflags) \
112         $(libWebCoreInternals_la_CFLAGS)
113
114 libWebCoreInternals_la_CFLAGS = \
115         -fno-strict-aliasing \
116         $(javascriptcore_cflags)
117
118 # DumpRenderTree
119 Programs_DumpRenderTree_CPPFLAGS = \
120         $(global_cppflags) \
121         -I$(srcdir)/Tools/DumpRenderTree \
122         -I$(srcdir)/Tools/DumpRenderTree/cairo \
123         -I$(srcdir)/Tools/DumpRenderTree/gtk \
124         -I$(srcdir)/Source/WebKit/gtk \
125         -I$(srcdir)/Source/WebCore/platform/gtk \
126         -I$(srcdir)/Source/WebCore/testing/js \
127         -I$(top_builddir)/DerivedSources \
128         -I$(top_builddir)/Source/WebKit/gtk \
129         $(javascriptcore_cppflags)
130
131 if TARGET_X11
132 Programs_DumpRenderTree_CPPFLAGS += \
133         -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" \
134         -DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\"
135 endif
136
137 Programs_DumpRenderTree_SOURCES = \
138         Tools/DumpRenderTree/DumpRenderTree.h \
139         Tools/DumpRenderTree/DumpRenderTreePrefix.h \
140         Tools/DumpRenderTree/AccessibilityController.cpp \
141         Tools/DumpRenderTree/AccessibilityController.h \
142         Tools/DumpRenderTree/AccessibilityTextMarker.cpp \
143         Tools/DumpRenderTree/AccessibilityTextMarker.h \
144         Tools/DumpRenderTree/AccessibilityUIElement.cpp \
145         Tools/DumpRenderTree/AccessibilityUIElement.h \
146         Tools/DumpRenderTree/CyclicRedundancyCheck.cpp \
147         Tools/DumpRenderTree/CyclicRedundancyCheck.h \
148         Tools/DumpRenderTree/GCController.cpp \
149         Tools/DumpRenderTree/GCController.h \
150         Tools/DumpRenderTree/JavaScriptThreading.h \
151         Tools/DumpRenderTree/LayoutTestController.cpp \
152         Tools/DumpRenderTree/LayoutTestController.h \
153         Tools/DumpRenderTree/PixelDumpSupport.cpp \
154         Tools/DumpRenderTree/PixelDumpSupport.h \
155         Tools/DumpRenderTree/WorkQueue.cpp \
156         Tools/DumpRenderTree/WorkQueue.h \
157         Tools/DumpRenderTree/WorkQueueItem.h \
158         Tools/DumpRenderTree/config.h \
159         Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp \
160         Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.h \
161         Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h \
162         Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp \
163         Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp \
164         Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp \
165         Tools/DumpRenderTree/gtk/DumpRenderTree.cpp \
166         Tools/DumpRenderTree/gtk/DumpRenderTreeGtk.h \
167         Tools/DumpRenderTree/gtk/EditingCallbacks.h \
168         Tools/DumpRenderTree/gtk/EditingCallbacks.cpp \
169         Tools/DumpRenderTree/gtk/EventSender.h \
170         Tools/DumpRenderTree/gtk/EventSender.cpp \
171         Tools/DumpRenderTree/gtk/GCControllerGtk.cpp \
172         Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
173         Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
174         Tools/DumpRenderTree/gtk/PlainTextController.cpp \
175         Tools/DumpRenderTree/gtk/PlainTextController.h \
176         Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.cpp \
177         Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.h \
178         Tools/DumpRenderTree/gtk/TextInputController.h \
179         Tools/DumpRenderTree/gtk/TextInputController.cpp \
180         Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
181         Source/WebCore/platform/gtk/GtkVersioning.c
182
183 Programs_DumpRenderTree_CXXFLAGS = \
184         $(global_cxxflags) \
185         $(Programs_DumpRenderTree_CFLAGS)
186
187 Programs_DumpRenderTree_CFLAGS = \
188         -fno-strict-aliasing \
189         $(global_cflags) \
190         $(GLOBALDEPS_CFLAGS) \
191         $(CAIRO_CFLAGS) \
192         $(GTK_CFLAGS) \
193         $(LIBSOUP_CFLAGS)
194
195 Programs_DumpRenderTree_LDADD = \
196         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
197         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
198         libWebCoreInternals.la \
199         $(GLOBALDEPS_LIBS) \
200         $(CAIRO_LIBS) \
201         $(GTK_LIBS) \
202         $(GLIB_LIBS) \
203         $(LIBSOUP_LIBS) \
204         $(FREETYPE_LIBS) \
205         $(WINMM_LIBS)
206
207 Programs_DumpRenderTree_LDFLAGS = \
208         -no-fast-install \
209         -no-install
210
211 # clean target
212 CLEANFILES += \
213         Programs/DumpRenderTree \
214         Programs/GtkLauncher
215
216 if ENABLE_WEBKIT2
217 CLEANFILES += \
218         Programs/GtkLauncher2
219 endif
220
221 if TARGET_X11
222
223 # Build TestNetscapePlugin only for X11
224 # since we don't support plugins for non-X11 builds at the moment.
225 noinst_LTLIBRARIES += \
226         TestNetscapePlugin/libtestnetscapeplugin.la
227
228 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS = \
229         -I$(srcdir)/Tools/DumpRenderTree \
230         -I$(srcdir)/Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders \
231         -I$(srcdir)/Source/WebCore \
232         -I$(srcdir)/Source/WebCore/bridge \
233         -I$(srcdir)/Source/WebCore/plugins \
234         -I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn \
235         $(global_cppflags) \
236         $(javascriptcore_cppflags)
237
238 # For the Gtk port we want to use XP_UNIX both on X11 and Mac
239 if !TARGET_WIN32
240 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS += -DXP_UNIX
241 endif
242
243 TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
244         Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h \
245         Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h \
246         Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h \
247         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \
248         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \
249         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp \
250         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp \
251         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp \
252         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp \
253         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \
254         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \
255         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp \
256         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
257         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
258         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp \
259         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp \
260         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp \
261         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PrivateBrowsing.cpp \
262         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp \
263         Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp \
264         Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h \
265         Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp \
266         Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h \
267         Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp \
268         Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h \
269         Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
270
271 TestNetscapePlugin_libtestnetscapeplugin_la_LDFLAGS = \
272         -rpath ${shell pwd}/$(top_builddir)/../unix/TestNetscapePlugin/.libs \
273         $(no_undefined) \
274         -avoid-version \
275         -module
276
277 CLEANFILES += TestNetscapePlugin/libtestnetscapeplugin.la
278 endif