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