JavaScriptCore/ChangeLog:
[WebKit-https.git] / GNUmakefile.am
1 # Top-level Makefile rule for automake
2 #
3 # Variable conventions:
4 #
5 # _h_api            = API headers that will be installed and included in the distribution
6 # _cppflags         = flags that will be passed to the C/CXX Preprocessor
7 # _sources          = sources that will be compiled and included in the distribution
8 # _headers          = header files that will be part of the distribution
9 # _built_sources    = files that will be autogenerated by the build system and
10 #                     will be part of the _SOURCES primary
11 # _built_nosources  = files that are autogenerated but are not part of the
12 #                     _SOURCES primary
13 # _cleanfiles       = files that will be removed by the clean target
14 #
15 # Sources, headers, flags, etc... should be added to the respective variables
16 # with the above suffix, e.g, webcore-specific sources should go to
17 # webcore_sources, gtk port-specific flags should go to webkitgtk_cppflags,
18 # etc... The only exceptions are the global variables. See Global Variables below.
19 #
20 # Global Variables
21 #
22 # global_cppflags   = CPPFLAGS that apply to JSC, WebCore, and to any
23 #                     specific port
24 # global_cflags     = CFLAGS that apply to JSC, WebCore, and to
25 #                     any specific port
26 # global_cxxflags   = CXXFLAGS that apply to JSC, WebCore, and to any
27 #                     specific port
28
29 srcdir = @srcdir@
30 VPATH = @srcdir@
31
32 # Directory for autogenerated sources
33 GENSOURCES := $(top_builddir)/DerivedSources
34
35 # Script for creating hash tables
36 CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/kjs/create_hash_table
37
38 # Libraries and support components
39 noinst_HEADERS :=
40
41 noinst_PROGRAMS :=
42
43 lib_LIBRARIES :=
44
45 IDL_BINDINGS :=
46
47 # Files that will be distributed
48 EXTRA_DIST :=
49
50 #
51 # Global flags to CPP
52 global_cppflags :=
53
54 global_cppflags += \
55         -DWTF_USE_ICU_UNICODE=1
56
57 # Default compiler flags
58 global_cflags := \
59         -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
60         -Wformat -Wformat-security -Wno-format-y2k -Wundef \
61         -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
62         -Wno-unused-parameter
63
64 global_cxxflags := \
65         $(SYMBOL_VISIBILITY_INLINES)
66
67 if !ENABLE_DEBUG
68 global_cflags += \
69         -fno-exceptions \
70         $(SYMBOL_VISIBILITY)
71
72 global_cxxflags += \
73         -fno-rtti
74 endif
75
76 # Shared libraries
77 lib_LTLIBRARIES = \
78         libwebkit-1.0.la
79
80 # Convenience libraries
81 noinst_LTLIBRARIES = \
82         libJavaScriptCore.la \
83         libWebCore.la
84
85 #
86 # JavaScriptCore
87 javascriptcore_h_api :=
88 javascriptcore_cppflags:=
89 javascriptcore_sources :=
90 javascriptcore_built_sources :=
91 javascriptcore_built_nosources :=
92
93 javascriptcore_cppflags += \
94         -I$(srcdir)/JavaScriptCore \
95         -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
96         -I$(srcdir)/JavaScriptCore/wtf \
97         -I$(srcdir)/JavaScriptCore/kjs \
98         -I$(top_builddir)/DerivedSources
99
100 # The variables above are already included below so no need to touch
101 # these variables unless you really have to
102 libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
103 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
104
105 libJavaScriptCore_la_SOURCES = \
106         $(javascriptcore_built_sources) \
107         $(javascriptcore_sources)
108
109 libJavaScriptCore_la_LIBADD = \
110         $(UNICODE_LIBS) \
111         $(GLOBALDEPS_LIBS) \
112         -lpthread
113
114 libJavaScriptCore_la_CXXFLAGS = \
115         $(global_cxxflags) \
116         $(global_cflags) \
117         $(GLOBALDEPS_CFLAGS) \
118         $(UNICODE_CFLAGS) \
119         -fstrict-aliasing
120
121 libJavaScriptCore_la_CFLAGS = \
122         $(global_cflags) \
123         $(GLOBALDEPS_CFLAGS) \
124         $(UNICODE_CFLAGS) \
125         -fstrict-aliasing
126
127 libJavaScriptCore_la_CPPFLAGS = \
128         $(global_cppflags) \
129         $(javascriptcore_cppflags)
130
131 #
132 # WebCore
133 webcore_cppflags :=
134 webcore_sources :=
135 webcore_headers :=
136 webcore_libadd :=
137 webcore_built_sources :=
138 webcore_built_nosources :=
139
140 webcore_cppflags += $(HILDON_CPPFLAGS)
141
142 # WebKit
143 webkitgtk_h_api :=
144 webkitgtk_headers :=
145 webkitgtk_sources :=
146 webkitgtk_cppflags :=
147 webkitgtk_built_sources :=
148 webkitgtk_built_nosources :=
149 webkitgtk_cleanfiles :=
150
151 libWebCore_la_SOURCES = \
152         $(webcore_built_sources) \
153         $(webcore_headers) \
154         $(webcore_sources)
155
156 libWebCore_la_CXXFLAGS = \
157         -fno-strict-aliasing \
158         $(global_cxxflags) \
159         $(global_cflags) \
160         $(GLOBALDEPS_CFLAGS) \
161         $(UNICODE_CFLAGS) \
162         $(WEBKITDEPS_CFLAGS) \
163         $(LIBCURL_CFLAGS) \
164         $(LIBSOUP_CFLAGS) \
165         $(SQLITE3_CFLAGS) \
166         $(GSTREAMER_CFLAGS) \
167         $(LIBXSLT_CFLAGS) \
168         $(COVERAGE_CFLAGS) \
169         $(HILDON_CFLAGS)
170
171 libWebCore_la_CFLAGS = \
172         -fno-strict-aliasing \
173         $(global_cflags) \
174         $(GLOBALDEPS_CFLAGS) \
175         $(UNICODE_CFLAGS) \
176         $(WEBKITDEPS_CFLAGS) \
177         $(LIBCURL_CFLAGS) \
178         $(LIBSOUP_CFLAGS) \
179         $(SQLITE3_CFLAGS) \
180         $(GSTREAMER_CFLAGS) \
181         $(LIBXSLT_CFLAGS) \
182         $(COVERAGE_CFLAGS) \
183         $(HILDON_CFLAGS)
184
185 libWebCore_la_CPPFLAGS = \
186         $(global_cppflags) \
187         $(webcore_cppflags) \
188         $(javascriptcore_cppflags) \
189         $(webkitgtk_cppflags)
190
191 libWebCore_la_LIBADD = \
192         libJavaScriptCore.la \
193         $(webcore_libadd) \
194         $(GLOBALDEPS_LIBS) \
195         $(WEBKITDEPS_LIBS) \
196         $(LIBCURL_LIBS) \
197         $(LIBSOUP_LIBS) \
198         $(UNICODE_LIBS) \
199         $(SQLITE3_LIBS) \
200         $(GSTREAMER_LIBS) \
201         $(LIBXSLT_LIBS) \
202         $(HILDON_LIBS) \
203         -lpthread \
204         -ljpeg
205
206 libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
207 libwebkit_1_0_la_HEADERS = $(webkitgtk_h_api)
208
209 libwebkit_1_0_la_SOURCES = \
210         $(webkitgtk_built_sources) \
211         $(webkitgtk_headers) \
212         $(webkitgtk_sources)
213
214 libwebkit_1_0_la_CXXFLAGS = \
215         $(libWebCore_la_CXXFLAGS)
216
217 libwebkit_1_0_la_CFLAGS = \
218         $(libWebCore_la_CFLAGS)
219
220 libwebkit_1_0_la_CPPFLAGS = \
221         $(libWebCore_la_CPPFLAGS)
222
223 libwebkit_1_0_la_LDFLAGS = \
224         $(COVERAGE_LDFLAGS) \
225         -version-info @LIBWEBKITGTK_VERSION@
226
227 libwebkit_1_0_la_LIBADD = \
228         libWebCore.la
229
230 #
231 # Extra checks and flags
232 global_cppflags += \
233         -DBUILDING_GTK__=1 \
234         -DWTF_CHANGES
235
236 if !ENABLE_FAST_MALLOC
237 global_cppflags += \
238         -DUSE_SYSTEM_MALLOC
239 endif
240
241 if TARGET_X11
242 global_cppflags += -DXP_UNIX
243 endif
244
245 if !ENABLE_DEBUG
246 global_cppflags += -DNDEBUG
247 else
248 webkitgtk_cppflags += \
249         -DG_DISABLE_DEPRECATED \
250         -DGDK_PIXBUF_DISABLE_DEPRECATED \
251         -DGDK_DISABLE_DEPRECATED \
252         -DGTK_DISABLE_DEPRECATED \
253         -DPANGO_DISABLE_DEPRECATED
254
255 # Might be useful in the future
256 #       -DGDK_MULTIHEAD_SAFE \
257 #       -DGTK_MULTIHEAD_SAFE
258 endif
259
260 if !ENABLE_DATABASE
261 global_cppflags += -DENABLE_DATABASE=0
262 endif
263
264 if !ENABLE_ICONDATABASE
265 global_cppflags += -DENABLE_ICONDATABASE=0
266 endif
267
268 if ENABLE_COVERAGE
269 global_cppflags += \
270         -DGCC_GENERATE_TEST_COVERAGE_FILES \
271         -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
272 endif
273
274 if ENABLE_VIDEO
275 webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
276 endif
277
278 webkitgtk_cppflags += \
279 -I$(top_builddir)/WebKit/gtk/webkit \
280 -DBUILDING_CAIRO__=1 \
281 -DBUILD_WEBKIT
282
283 webkitgtk_h_api += \
284         WebKit/gtk/webkit/webkit.h \
285         WebKit/gtk/webkit/webkitdefines.h \
286         WebKit/gtk/webkit/webkitnetworkrequest.h \
287         WebKit/gtk/webkit/webkitwebbackforwardlist.h \
288         WebKit/gtk/webkit/webkitwebframe.h \
289         WebKit/gtk/webkit/webkitwebhistoryitem.h \
290         WebKit/gtk/webkit/webkitwebsettings.h \
291         WebKit/gtk/webkit/webkitwebview.h
292
293 webkitgtk_built_sources += \
294         WebKit/gtk/webkit/webkit-marshal.h \
295         WebKit/gtk/webkit/webkit-marshal.cpp
296
297 webkitgtk_headers += \
298         WebKit/gtk/webkit/webkitprivate.h \
299         WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
300         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h \
301         WebKit/gtk/WebCoreSupport/DragClientGtk.h \
302         WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
303         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
304         WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
305         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
306
307 webkitgtk_sources += \
308         WebKit/gtk/webkit/webkitnetworkrequest.cpp \
309         WebKit/gtk/webkit/webkitprivate.cpp \
310         WebKit/gtk/webkit/webkitwebbackforwardlist.cpp \
311         WebKit/gtk/webkit/webkitwebframe.cpp \
312         WebKit/gtk/webkit/webkitwebhistoryitem.cpp \
313         WebKit/gtk/webkit/webkitwebsettings.cpp \
314         WebKit/gtk/webkit/webkitwebview.cpp \
315         WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
316         WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
317         WebKit/gtk/WebCoreSupport/DragClientGtk.cpp \
318         WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp \
319         WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
320         WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
321         WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
322
323 webkitgtk_cleanfiles += \
324         $(top_builddir)/Programs/GtkLauncher \
325         $(top_builddir)/WebKit/gtk/webkit-1.0.pc
326
327 pkgconfigdir = $(libdir)/pkgconfig
328 pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
329
330 WEBKIT_MARSHAL = $(CURDIR)/WebKit/gtk/webkit/webkit-marshal
331 WEBKIT_MARSHAL_LIST = $(srcdir)/WebKit/gtk/webkit/webkit-marshal.list
332
333 stamp_files := \
334         stamp-webkit-marshal.cpp \
335         stamp-webkit-marshal.h
336
337 WebKit/gtk/webkit/webkit-marshal.cpp: stamp-webkit-marshal.cpp
338         @true
339
340 WebKit/gtk/webkit/webkit-marshal.h: stamp-webkit-marshal.h
341         @true
342
343 stamp-webkit-marshal.cpp: $(WEBKIT_MARSHAL_LIST)
344         echo "extern \"C\" {" > $(WEBKIT_MARSHAL).cpp && \
345         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(WEBKIT_MARSHAL).cpp && echo '}' >> $(WEBKIT_MARSHAL).cpp && \
346         echo timestamp > $(@F)
347
348 stamp-webkit-marshal.h: $(WEBKIT_MARSHAL_LIST)
349         $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --header > $(WEBKIT_MARSHAL).h && \
350         echo timestamp > $(@F)
351
352 # END WEBKIT GTK+
353
354 # Files that will be cleaned
355 MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
356 DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES)
357 CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
358
359 # Include module makefiles
360 include JavaScriptCore/GNUmakefile.am
361 include WebCore/GNUmakefile.am
362 include WebKitTools/GNUmakefile.am
363
364
365 # Autogenerated sources
366 BUILT_SOURCES = \
367         $(javascriptcore_built_sources) \
368         $(javascriptcore_built_nosources) \
369         $(webcore_built_sources) \
370         $(webcore_built_nosources) \
371         $(webkitgtk_built_sources) \
372         $(webkitgtk_built_nosources)
373
374 # Project-wide clean rules
375 CLEANFILES += \
376         $(webkitgtk_cleanfiles) \
377         $(top_builddir)/Programs/DumpRenderTree \
378         $(top_builddir)/Programs/testkjs \
379         $(GENSOURCES)
380
381 MAINTAINERCLEANFILES += \
382         $(srcdir)/aconfig.h.in \
383         configure \
384         config.* \
385         GNUmakefile.in \
386         INSTALL \
387         README