forked from adobe/webkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile.am
367 lines (325 loc) · 9.13 KB
/
GNUmakefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# Top-level Makefile rule for automake
#
# Variable conventions:
#
# _h_api = API headers that will be installed and included in the distribution
# _cppflags = flags that will be passed to the C/CXX Preprocessor
# _sources = sources that will be compiled and included in the distribution
# _built_sources = files that will be autogenerated by the build system and
# will be part of the _SOURCES primary
# _built_nosources = files that are autogenerated but are not part of the
# _SOURCES primary
# _cleanfiles = files that will be removed by the clean target
#
# Sources, headers, flags, etc... should be added to the respective variables
# with the above suffix, e.g, webcore-specific sources should go to
# webcore_sources, gtk port API and WebCoreSupport parts to webkitgtk_sources,
# etc... The only exceptions are the global variables. See Global Variables
# below.
# Global Variables Reference
# global_cppflags = CPPFLAGS that apply to all C/C++ files that are built for any project.
# global_cflags = CFLAGS that apply to all C files that are built for any project.
# global_cxxflags = CXXFLAGS that apply to all C++ files that are bult for any project.
srcdir = @srcdir@
VPATH = @srcdir@
DISTCHECK_CONFIGURE_FLAGS = \
--enable-introspection \
--enable-gtk-doc \
--enable-webkit2
# Directory for autogenerated sources
GENSOURCES := $(top_builddir)/DerivedSources
GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
GENPROGRAMS := $(top_builddir)/Programs
GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
WebCore := $(srcdir)/Source/WebCore
WebKit := $(srcdir)/Source/WebKit/gtk
WebKit2 := $(srcdir)/Source/WebKit2
pkgconfigdir := $(libdir)/pkgconfig
libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
# Libraries and support components
bin_PROGRAMS :=
noinst_PROGRAMS :=
libexec_PROGRAMS :=
noinst_HEADERS :=
noinst_LTLIBRARIES :=
lib_LTLIBRARIES :=
IDL_BINDINGS :=
TEST_PROGS :=
POFILES :=
PO_LINGUAS :=
USER_LINGUAS :=
USE_LINGUAS :=
MOFILES :=
ALL_MOFILES :=
feature_defines_defaults :=
feature_defines_overrides :=
feature_defines_unstable :=
feature_defines :=
dom_binding_idls :=
wtf_sources :=
javascriptcore_h_api :=
javascriptcore_cppflags:=
javascriptcore_cflags :=
javascriptcore_sources :=
javascriptcore_built_sources :=
javascriptcore_built_nosources :=
llint_nosources :=
offlineasm_nosources :=
webcore_platform_sources :=
webcore_modules_sources :=
webcore_svg_built_sources :=
webcore_svg_sources :=
webcore_cppflags :=
webcore_sources :=
webcore_libadd :=
webcore_built_sources :=
webcore_built_nosources :=
webcoregtk_sources :=
webcoregtk_cppflags :=
webkitgtk_built_h_api :=
webkitgtk_static_h_api :=
webkitgtk_h_api :=
webkitgtk_sources :=
webkitgtk_cppflags :=
webkitgtk_gdom_built_sources :=
webkitgtk_built_sources :=
webkitgtk_built_nosources :=
webkit2_h_api :=
webkit2_sources :=
webkit2_built_sources :=
webkit2gtk_h_api :=
webkit2gtk_built_sources :=
webkit2_plugin_process_sources :=
webkit2_plugin_process_built_sources :=
webkittestrunner_built_sources :=
libwebcoreinternals_built_sources :=
minibrowser_built_sources :=
global_cppflags :=
global_cflags :=
global_cxxflags :=
JSCORE_GIRSOURCES :=
WEBKIT_GIRSOURCES :=
typelibsdir :=
typelibs_DATA :=
EXTRA_DIST :=
BUILT_SOURCES :=
CLEANFILES :=
DOMAIN :=
DISTCLEANFILES :=
MAINTAINERCLEANFILES :=
pkgconfig_DATA :=
# We do not care at all about this implicit built-in make rules,
# disable them to save some build time
%: %.c
%: %.cpp
%: %.o
(%): %
%.out: %
%.c: %.w %.ch
%.tex: %.w %.ch
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%
global_cppflags += \
-Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
-Wformat -Wformat-security -Wno-format-y2k -Wundef \
-Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
-Wno-unused-parameter -Wno-parentheses \
-fno-exceptions -DENABLE_GLIB_SUPPORT=1
global_cxxflags += \
-fno-rtti
# -no-undefined required for building DLLs on Windows
# It breaks the build on other platforms, so we use it conditionally
if OS_WIN32
no_undefined = -no-undefined
version_script = -export-symbols-regex "^(webkit_|k?JS).*"
endif
if OS_GNU
version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
endif
# Extra checks and flags
global_cppflags += \
-DBUILDING_CAIRO__=1 \
-DBUILDING_GTK__=1 \
-DWTF_CHANGES
if ENABLE_WEBKIT2
global_cppflags += \
-DBUILDING_WEBKIT2__=1
endif
# For the Gtk port we want to use XP_UNIX both in X11 and Mac
if TARGET_WIN32
global_cppflags += \
-DXP_WIN
else
global_cppflags += \
-DXP_UNIX
endif
# Add MOZ_X11 for X11 targets only
if TARGET_X11
global_cppflags += \
-DMOZ_X11
endif
# Use the wide character version of win32 API by default
if TARGET_WIN32
global_cppflags += \
-DUNICODE \
-D_UNICODE
endif
if USE_ICU_UNICODE
global_cppflags += \
-DWTF_USE_ICU_UNICODE=1
endif
if USE_GLIB_UNICODE
global_cppflags += \
-DWTF_USE_GLIB_UNICODE=1
endif
if !ENABLE_FAST_MALLOC
global_cppflags += \
-DUSE_SYSTEM_MALLOC
endif
if USE_GSTREAMER
global_cppflags += \
-DWTF_USE_GSTREAMER=1
endif
if USE_FARSTREAM
global_cppflags += \
-DWTF_USE_FARSTREAM=1
endif
if USE_ACCELERATED_COMPOSITING
global_cppflags += \
-DWTF_USE_ACCELERATED_COMPOSITING=1 \
-DENABLE_3D_RENDERING=1
endif
if USE_TEXTURE_MAPPER_CAIRO
global_cppflags += \
-DWTF_USE_TEXTURE_MAPPER=1 \
-DWTF_USE_TEXTURE_MAPPER_CAIRO=1
endif
if USE_TEXTURE_MAPPER_GL
global_cppflags += \
-DWTF_USE_TEXTURE_MAPPER=1 \
-DWTF_USE_TEXTURE_MAPPER_GL=1
endif
if USE_CLUTTER
global_cppflags += \
-DWTF_USE_CLUTTER=1
endif
if USE_GLX
global_cppflags += \
-DWTF_USE_GLX=1
endif
if USE_EGL
global_cppflags += \
-DWTF_USE_EGL=1
endif
if USE_GLES2
global_cppflags += \
-DWTF_USE_OPENGL_ES_2=1
endif
if USE_OPENGL
global_cppflags += \
-DWTF_USE_OPENGL=1
endif
# ----
# GTK+ 2.x/3.x support
# ----
if GTK_API_VERSION_2
global_cppflags += \
-DGTK_API_VERSION_2=1
endif
if !ENABLE_DEBUG
global_cppflags += -DNDEBUG
else
global_cppflags += \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DPANGO_DISABLE_DEPRECATED
# Might be useful in the future
# -DGDK_MULTIHEAD_SAFE \
# -DGTK_MULTIHEAD_SAFE
endif
if ENABLE_COVERAGE
global_cppflags += \
-DGCC_GENERATE_TEST_COVERAGE_FILES \
-DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
endif
EXTRA_DIST += \
$(srcdir)/Source/autotools/symbols.filter \
$(srcdir)/Source/WebKit/LICENSE
# Include module makefiles
include Source/WTF/GNUmakefile.am
include Source/JavaScriptCore/GNUmakefile.am
include Source/WebCore/GNUmakefile.am
include Source/WebKit/gtk/GNUmakefile.am
include Source/WebCore/bindings/gobject/GNUmakefile.am
include Tools/GNUmakefile.am
include Source/WebKit/gtk/po/GNUmakefile.am
include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
include Source/WebKit2/GNUmakefile.am
include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
include Tools/MiniBrowser/gtk/GNUmakefile.am
include Tools/WebKitTestRunner/GNUmakefile.am
include Source/ThirdParty/gtest/GNUmakefile.am
include Tools/TestWebKitAPI/GNUmakefile.am
# [GTK] Refactor the translations now that we have webkit2
# https://bugs.webkit.org/show_bug.cgi?id=55153
# Autogenerated sources
BUILT_SOURCES += \
$(javascriptcore_built_sources) \
$(javascriptcore_built_nosources) \
$(webcore_built_sources) \
$(webcore_built_nosources) \
$(webcore_svg_built_sources) \
$(webkitgtk_built_sources) \
$(webkitgtk_built_nosources) \
$(webkit2_built_sources) \
$(webkit2gtk_built_sources) \
$(webkit2_plugin_process_built_sources)
DISTCLEANFILES += \
$(CLEANFILES) \
$(builddir)/doltcompile \
$(builddir)/doltlibtool
MAINTAINERCLEANFILES += \
$(CLEANFILES) \
$(builddir)/doltcompile \
$(builddir)/doltlibtool \
$(srcdir)/aconfig.h.in \
$(srcdir)/Source/autotools/config.* \
$(srcdir)/Source/autotools/compile \
$(srcdir)/Source/autotools/depcomp \
$(srcdir)/Source/autotools/install-sh \
$(srcdir)/Source/autotools/missing \
$(srcdir)/configure \
$(srcdir)/GNUmakefile.in \
$(srcdir)/INSTALL \
$(srcdir)/README \
$(top_builddir)/config.*
# Older automake versions (1.7) place Plo files in a different place so we need
# to create the output directory manually.
all-local: stamp-po
$(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
# remove built sources and program directories
clean-local:
-rm -rf $(GENPROGRAMS)
maintainer-clean-local: distclean-local
distclean-local:
-rm -rf $(GENSOURCES) $(GENPROGRAMS)
dist-hook: doc-dist-hook
doc-dist-hook: docs-build.stamp
cp $(WebKit)/NEWS $(distdir)
@mkdir -p $(distdir)/Documentation/webkitgtk/html
@mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
@-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
@cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
if ENABLE_WEBKIT2
@mkdir -p $(distdir)/Documentation/webkit2gtk/html
@mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
@-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
@cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html
endif