[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.24
[framework/web/webkit-efl.git] / Tools / GNUmakefile.am
1 noinst_PROGRAMS += \
2         Programs/DumpRenderTree \
3         Programs/GtkLauncher
4
5 # GtkLauncher
6 Programs_GtkLauncher_CPPFLAGS = \
7         -I$(srcdir)/Source/WebKit/gtk \
8         -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \
9         -I$(top_builddir)/Source/WebKit/gtk \
10         -I$(top_builddir)/DerivedSources \
11         $(global_cppflags) \
12         $(javascriptcore_cppflags)
13
14 Programs_GtkLauncher_SOURCES = \
15         Tools/GtkLauncher/LauncherInspectorWindow.c \
16         Tools/GtkLauncher/LauncherInspectorWindow.h \
17         Tools/GtkLauncher/main.c
18
19 Programs_GtkLauncher_CFLAGS = \
20         -ansi \
21         -fno-strict-aliasing \
22         $(global_cflags) \
23         $(GTK_CFLAGS) \
24         $(LIBSOUP_CFLAGS)
25
26 Programs_GtkLauncher_LDADD = \
27         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
28         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
29         $(GTK_LIBS) \
30         $(GLIB_LIBS) \
31         $(LIBSOUP_LIBS) \
32         $(WINMM_LIBS)
33
34 Programs_GtkLauncher_LDFLAGS = \
35         -no-fast-install \
36         -no-install
37
38 # libWebCoreInternals
39 # We must split off the window.internals implementation into a separate
40 # convenience library because it requires a different include path order
41 # to prefer the WebCore config.h over the DumpRenderTree config.h
42 noinst_LTLIBRARIES += libWebCoreInternals.la
43 libWebCoreInternals_la_SOURCES = \
44         Source/WebCore/bindings/js/JSDOMWrapper.cpp \
45         Source/WebCore/bindings/js/JSDOMWrapper.h \
46         Source/WebCore/testing/Internals.cpp \
47         Source/WebCore/testing/Internals.h \
48         Source/WebCore/testing/InternalSettings.cpp \
49         Source/WebCore/testing/InternalSettings.h \
50         Source/WebCore/testing/js/WebCoreTestSupport.cpp \
51         Source/WebCore/testing/js/WebCoreTestSupport.h
52
53 libwebcoreinternals_built_sources += \
54         DerivedSources/WebCore/JSInternals.cpp \
55         DerivedSources/WebCore/JSInternals.h   \
56         DerivedSources/WebCore/JSInternalSettings.cpp \
57         DerivedSources/WebCore/JSInternalSettings.h
58
59 nodist_libWebCoreInternals_la_SOURCES = $(libwebcoreinternals_built_sources)
60 BUILT_SOURCES += $(libwebcoreinternals_built_sources)
61
62 libWebCoreInternals_la_CPPFLAGS = \
63         $(global_cppflags) \
64         $(webcore_cppflags) \
65         $(webcoregtk_cppflags) \
66         $(javascriptcore_cppflags) \
67         $(CAIRO_CFLAGS) \
68         $(LIBSOUP_CFLAGS) \
69         $(PANGO_CFLAGS) \
70         -I$(top_builddir)/DerivedSources \
71         -I$(top_builddir)/DerivedSources/WebCore
72
73 libWebCoreInternals_la_CXXFLAGS = \
74         $(global_cxxflags) \
75         $(libWebCoreInternals_la_CFLAGS)
76
77 libWebCoreInternals_la_CFLAGS = \
78         -fno-strict-aliasing \
79         $(javascriptcore_cflags)
80
81 # DumpRenderTree
82 Programs_DumpRenderTree_CPPFLAGS = \
83         $(global_cppflags) \
84         -DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \
85         -I$(srcdir)/Tools/DumpRenderTree \
86         -I$(srcdir)/Tools/DumpRenderTree/cairo \
87         -I$(srcdir)/Tools/DumpRenderTree/gtk \
88         -I$(srcdir)/Source/WebKit/gtk \
89         -I$(srcdir)/Source/WebCore/platform/gtk \
90         -I$(srcdir)/Source/WebCore/testing/js \
91         -I$(top_builddir)/DerivedSources \
92         -I$(top_builddir)/Source/WebKit/gtk \
93         $(javascriptcore_cppflags) \
94         $(webcore_cppflags)
95
96 if TARGET_X11
97 Programs_DumpRenderTree_CPPFLAGS += \
98         -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\" \
99         -DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\"
100 endif
101
102 Programs_DumpRenderTree_SOURCES = \
103         Tools/DumpRenderTree/DumpRenderTree.h \
104         Tools/DumpRenderTree/DumpRenderTreePrefix.h \
105         Tools/DumpRenderTree/AccessibilityController.cpp \
106         Tools/DumpRenderTree/AccessibilityController.h \
107         Tools/DumpRenderTree/AccessibilityTextMarker.cpp \
108         Tools/DumpRenderTree/AccessibilityTextMarker.h \
109         Tools/DumpRenderTree/AccessibilityUIElement.cpp \
110         Tools/DumpRenderTree/AccessibilityUIElement.h \
111         Tools/DumpRenderTree/CyclicRedundancyCheck.cpp \
112         Tools/DumpRenderTree/CyclicRedundancyCheck.h \
113         Tools/DumpRenderTree/GCController.cpp \
114         Tools/DumpRenderTree/GCController.h \
115         Tools/DumpRenderTree/JavaScriptThreading.h \
116         Tools/DumpRenderTree/LayoutTestController.cpp \
117         Tools/DumpRenderTree/LayoutTestController.h \
118         Tools/DumpRenderTree/PixelDumpSupport.cpp \
119         Tools/DumpRenderTree/PixelDumpSupport.h \
120         Tools/DumpRenderTree/WorkQueue.cpp \
121         Tools/DumpRenderTree/WorkQueue.h \
122         Tools/DumpRenderTree/WorkQueueItem.h \
123         Tools/DumpRenderTree/config.h \
124         Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp \
125         Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.h \
126         Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h \
127         Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp \
128         Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp \
129         Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp \
130         Tools/DumpRenderTree/gtk/DumpRenderTree.cpp \
131         Tools/DumpRenderTree/gtk/DumpRenderTreeGtk.h \
132         Tools/DumpRenderTree/gtk/EditingCallbacks.h \
133         Tools/DumpRenderTree/gtk/EditingCallbacks.cpp \
134         Tools/DumpRenderTree/gtk/EventSender.h \
135         Tools/DumpRenderTree/gtk/EventSender.cpp \
136         Tools/DumpRenderTree/gtk/GCControllerGtk.cpp \
137         Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
138         Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
139         Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.cpp \
140         Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.h \
141         Tools/DumpRenderTree/gtk/TextInputController.h \
142         Tools/DumpRenderTree/gtk/TextInputController.cpp \
143         Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
144         Source/WebCore/platform/gtk/GtkVersioning.c
145
146 Programs_DumpRenderTree_CXXFLAGS = \
147         $(global_cxxflags) \
148         $(Programs_DumpRenderTree_CFLAGS)
149
150 Programs_DumpRenderTree_CFLAGS = \
151         -fno-strict-aliasing \
152         $(global_cflags) \
153         $(GLOBALDEPS_CFLAGS) \
154         $(CAIRO_CFLAGS) \
155         $(GTK_CFLAGS) \
156         $(LIBSOUP_CFLAGS)
157
158 Programs_DumpRenderTree_LDADD = \
159         libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
160         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
161         libWebCoreModules.la \
162         libWebCoreInternals.la \
163         $(GLOBALDEPS_LIBS) \
164         $(CAIRO_LIBS) \
165         $(GTK_LIBS) \
166         $(GLIB_LIBS) \
167         $(LIBSOUP_LIBS) \
168         $(FREETYPE_LIBS) \
169         $(WINMM_LIBS) \
170         $(XRENDER_LIBS) \
171         $(XT_LIBS)
172
173 Programs_DumpRenderTree_LDFLAGS = \
174         -no-fast-install \
175         -no-install
176
177 # clean target
178 CLEANFILES += \
179         Programs/DumpRenderTree \
180         Programs/GtkLauncher
181
182 if TARGET_X11
183
184 # Build TestNetscapePlugin only for X11
185 # since we don't support plugins for non-X11 builds at the moment.
186 noinst_LTLIBRARIES += \
187         TestNetscapePlugin/libtestnetscapeplugin.la
188
189 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS = \
190         -I$(srcdir)/Tools/DumpRenderTree \
191         -I$(srcdir)/Source/WebCore \
192         -I$(srcdir)/Source/WebCore/bridge \
193         -I$(srcdir)/Source/WebCore/plugins \
194         -I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn \
195         -I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders \
196         $(global_cppflags) \
197         $(javascriptcore_cppflags)
198
199 # For the Gtk port we want to use XP_UNIX both on X11 and Mac
200 if !TARGET_WIN32
201 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS += -DXP_UNIX
202 endif
203
204 # Add MOZ_X11 only for X11 targets
205 if TARGET_X11
206 TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS += -DMOZ_X11
207 endif
208
209 TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
210         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \
211         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \
212         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp \
213         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp \
214         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp \
215         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp \
216         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \
217         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \
218         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp \
219         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
220         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
221         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp \
222         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp \
223         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp \
224         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PrivateBrowsing.cpp \
225         Tools/DumpRenderTree/TestNetscapePlugIn/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp \
226         Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp \
227         Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h \
228         Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp \
229         Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h \
230         Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp \
231         Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h \
232         Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp \
233         Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npapi.h \
234         Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npfunctions.h \
235         Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders/WebKit/npruntime.h
236
237 TestNetscapePlugin_libtestnetscapeplugin_la_LDFLAGS = \
238         -rpath ${shell pwd}/$(top_builddir)/../unix/TestNetscapePlugin/.libs \
239         $(no_undefined) \
240         -avoid-version \
241         -module
242
243 CLEANFILES += TestNetscapePlugin/libtestnetscapeplugin.la
244 endif
245
246 check-local:
247         $(top_srcdir)/Tools/Scripts/run-gtk-tests
248
249 EXTRA_DIST += \
250         Tools/gtk/common.py \
251         Tools/gtk/generate-gtkdoc \
252         Tools/gtk/gtkdoc.py \
253         Tools/gtk/run-api-tests \
254         Tools/Scripts/VCSUtils.pm \
255         Tools/Scripts/run-gtk-tests \
256         Tools/Scripts/webkit-build-directory \
257         Tools/Scripts/webkitdirs.pm
258
259 docs: docs-build.stamp
260 .PHONY : docs
261 DISTCLEANFILES += docs-build.stamp
262
263 if ENABLE_WEBKIT2
264 docs-build.stamp: \
265         Source/WebKit/gtk/docs/webkitenvironment.xml \
266         Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
267         Source/WebKit/gtk/docs/webkitgtk-sections.txt \
268         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
269         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
270         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
271         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
272         $(srcdir)/Tools/gtk/generate-gtkdoc
273         @touch docs-build.stamp
274 else
275 docs-build.stamp: \
276         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
277         Source/WebKit/gtk/docs/webkitenvironment.xml \
278         Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
279         Source/WebKit/gtk/docs/webkitgtk-sections.txt
280         $(srcdir)/Tools/gtk/generate-gtkdoc
281         @touch docs-build.stamp
282 endif
283
284 clean-local: doc-clean-local
285 doc-clean-local:
286         @rm -f Documentation/webkitgtk/*~ Documentation/webkitgtk*.bak
287         @rm -f Documentation/webkit2gtk/*~ Documentation/webkit2gtk*.bak
288 distclean-local: doc-distclean-local
289 doc-distclean-local:
290         @rm -rf Documentation
291 maintainer-clean-local: doc-maintainer-clean-local
292 doc-maintainer-clean-local: clean
293         @rm -rf Documentation/webkitgtk Documentation/webkit2gtk
294         -@rmdir Documentation
295
296 install-data-local:
297         @installfiles=`echo ./Documentation/webkitgtk/html/*`; \
298         if test "$$installfiles" = './Documentation/webkitgtk/html/*'; \
299         then echo 1>&2 'No documentation to install' ; \
300         else \
301           DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
302           if test -n "$(DOC_MODULE_VERSION)"; then \
303             installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
304           else \
305             installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
306           fi; \
307           $(mkinstalldirs) $${installdir} ; \
308           for i in $$installfiles; do \
309             echo ' $(INSTALL_DATA) '$$i ; \
310             $(INSTALL_DATA) $$i $${installdir}; \
311           done; \
312           if test -n "$(DOC_MODULE_VERSION)"; then \
313             mv -f $${installdir}/webkitgtk.devhelp2 \
314               $${installdir}/webkitgtk-$(DOC_MODULE_VERSION).devhelp2; \
315           fi; \
316         fi
317 if ENABLE_WEBKIT2
318         @installfiles=`echo ./Documentation/webkit2gtk/html/*`; \
319         if test "$$installfiles" = './Documentation/webkit2gtk/html/*'; \
320         then echo 1>&2 'No documentation to install' ; \
321         else \
322           DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
323           if test -n "$(DOC_MODULE_VERSION)"; then \
324             installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk-$(DOC_MODULE_VERSION)"; \
325           else \
326             installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk"; \
327           fi; \
328           $(mkinstalldirs) $${installdir} ; \
329           for i in $$installfiles; do \
330             echo ' $(INSTALL_DATA) '$$i ; \
331             $(INSTALL_DATA) $$i $${installdir}; \
332           done; \
333           if test -n "$(DOC_MODULE_VERSION)"; then \
334             mv -f $${installdir}/webkit2gtk.devhelp2 \
335               $${installdir}/webkit2gtk-$(DOC_MODULE_VERSION).devhelp2; \
336           fi; \
337         fi
338 endif
339         @$(AM_V_GEN)$(PYTHON) $(srcdir)/Tools/gtk/generate-gtkdoc --rebase --virtual-root=$${DESTDIR}
340
341 uninstall-local:
342         @DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
343         if test -n "$(DOC_MODULE_VERSION)"; then \
344           installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
345         else \
346           installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
347         fi; \
348         rm -rf $${installdir}
349 if ENABLE_WEBKIT2
350         @DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
351         if test -n "$(DOC_MODULE_VERSION)"; then \
352           installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk-$(DOC_MODULE_VERSION)"; \
353         else \
354           installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk"; \
355         fi; \
356         rm -rf $${installdir}
357 endif
358
359 if ENABLE_GTK_DOC
360 all: docs-build.stamp
361 endif
362