blob: 9af8e035e4fc13c5ce579513282cc0d92cbfb69c [file] [log] [blame]
alp@webkit.orgf93619a2007-12-30 03:33:44 +00001# 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
alp@webkit.orgf93619a2007-12-30 03:33:44 +00008# _built_sources = files that will be autogenerated by the build system and
9# will be part of the _SOURCES primary
10# _built_nosources = files that are autogenerated but are not part of the
11# _SOURCES primary
12# _cleanfiles = files that will be removed by the clean target
13#
14# Sources, headers, flags, etc... should be added to the respective variables
15# with the above suffix, e.g, webcore-specific sources should go to
alp@webkit.orgf1dbca62008-06-02 16:36:32 +000016# webcore_sources, gtk port API and WebCoreSupport parts to webkitgtk_sources,
17# etc... The only exceptions are the global variables. See Global Variables
18# below.
mrobinson@webkit.org27bbef32010-08-26 16:16:10 +000019
20# Global Variables Reference
21# global_cppflags = CPPFLAGS that apply to all C/C++ files that are built for any project.
22# global_cflags = CFLAGS that apply to all C files that are built for any project.
23# global_cxxflags = CXXFLAGS that apply to all C++ files that are bult for any project.
alp@webkit.org278f1252007-12-27 06:05:21 +000024
25srcdir = @srcdir@
26VPATH = @srcdir@
27
eric@webkit.orgb6dcd3f2009-11-10 01:12:00 +000028DISTCHECK_CONFIGURE_FLAGS = \
29 --enable-introspection \
alex@webkit.orge3137282011-10-26 17:45:31 +000030 --enable-gtk-doc \
31 --enable-webkit2
eric@webkit.orgb6dcd3f2009-11-10 01:12:00 +000032
alp@webkit.org278f1252007-12-27 06:05:21 +000033# Directory for autogenerated sources
34GENSOURCES := $(top_builddir)/DerivedSources
mrobinson@webkit.orge53c0fb2010-07-02 16:53:06 +000035GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
36GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
kov@webkit.org86b826a2013-09-13 19:06:11 +000037GENSOURCES_WEBINSPECTOR_UI := $(top_builddir)/DerivedSources/WebInspectorUI
mrobinson@webkit.orge53c0fb2010-07-02 16:53:06 +000038GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
mrobinson@webkit.org59b9ac12010-12-29 23:46:42 +000039GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
commit-queue@webkit.org029d84f2012-12-11 17:58:03 +000040GENSOURCES_WEBKITDOM := $(top_builddir)/DerivedSources/webkitdom
zandobersek@gmail.com6d888f82013-05-14 17:40:53 +000041GENSOURCES_PLATFORM := $(top_builddir)/DerivedSources/Platform
alp@webkit.orgc04fee22008-04-19 05:16:00 +000042GENPROGRAMS := $(top_builddir)/Programs
loislo@chromium.orga47f6722010-08-18 14:36:58 +000043GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
abarth@webkit.org8ac7e152011-01-08 09:35:14 +000044WebCore := $(srcdir)/Source/WebCore
kov@webkit.org86b826a2013-09-13 19:06:11 +000045WebInspectorUI := $(srcdir)/Source/WebInspectorUI
abarth@webkit.orga5db5752011-01-17 05:02:09 +000046WebKit := $(srcdir)/Source/WebKit/gtk
abarth@webkit.orgbe159d92011-01-15 20:02:03 +000047WebKit2 := $(srcdir)/Source/WebKit2
carlosgc@webkit.orgeedf25e2011-08-03 07:43:44 +000048pkgconfigdir := $(libdir)/pkgconfig
carlosgc@webkit.org28f29832011-09-27 09:35:55 +000049libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
jmalonzo@webkit.orgc9b4de42009-05-18 11:30:53 +000050
alp@webkit.org278f1252007-12-27 06:05:21 +000051# Libraries and support components
alp@webkit.org643f3ef2008-06-15 11:46:18 +000052bin_PROGRAMS :=
alp@webkit.org278f1252007-12-27 06:05:21 +000053noinst_PROGRAMS :=
carlosgc@webkit.org4e17b162011-08-03 12:20:12 +000054libexec_PROGRAMS :=
commit-queue@webkit.org5a7d9572013-05-18 07:19:37 +000055noinst_DATA :=
alp@webkit.org9388fc82008-08-10 18:21:21 +000056noinst_HEADERS :=
kov@webkit.org478f5952010-01-05 19:08:10 +000057noinst_LTLIBRARIES :=
xan@webkit.orgceeb8492010-06-28 13:58:42 +000058lib_LTLIBRARIES :=
alp@webkit.org278f1252007-12-27 06:05:21 +000059IDL_BINDINGS :=
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +000060TEST_PROGS :=
kov@webkit.org774c23b2009-04-06 19:39:14 +000061POFILES :=
commit-queue@webkit.orga43130b2012-03-02 23:10:32 +000062PO_LINGUAS :=
63USER_LINGUAS :=
64USE_LINGUAS :=
kov@webkit.org774c23b2009-04-06 19:39:14 +000065MOFILES :=
carlosgc@webkit.org7ecc61f2012-04-30 11:18:14 +000066ALL_MOFILES :=
haraken@chromium.org5f99f4f2011-12-27 22:31:45 +000067dom_binding_idls :=
kov@webkit.orge6dee6c2012-01-06 14:25:39 +000068wtf_sources :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000069javascriptcore_h_api :=
70javascriptcore_cppflags:=
carlosgc@webkit.org2a591002011-06-06 07:57:26 +000071javascriptcore_cflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000072javascriptcore_sources :=
73javascriptcore_built_sources :=
74javascriptcore_built_nosources :=
carlosgc@webkit.orgf4fbe002012-06-11 15:31:19 +000075llint_nosources :=
76offlineasm_nosources :=
zandobersek@gmail.comf12ef742013-03-28 18:58:02 +000077platform_webcore_cppflags :=
zandobersek@gmail.com25d930a2013-04-22 19:52:09 +000078platform_cppflags :=
zandobersek@gmail.com6d888f82013-05-14 17:40:53 +000079platform_built_sources :=
zandobersek@gmail.com25d930a2013-04-22 19:52:09 +000080platform_sources :=
zandobersek@gmail.com6e0b8072013-03-12 15:54:34 +000081platformgtk_cppflags :=
82platformgtk_sources :=
kov@webkit.org64545a32012-11-16 01:05:18 +000083webcore_platform_sources :=
kov@webkit.orgc34e0ed2012-03-20 03:22:34 +000084webcore_modules_sources :=
kov@webkit.orge0b94072012-11-22 21:07:03 +000085webcore_svg_built_sources :=
86webcore_svg_sources :=
87webcore_cppflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000088webcore_sources :=
89webcore_libadd :=
90webcore_built_sources :=
91webcore_built_nosources :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000092webcoregtk_sources :=
mrobinson@webkit.org27bbef32010-08-26 16:16:10 +000093webcoregtk_cppflags :=
mrobinson@webkit.org65b62452010-07-26 21:32:18 +000094webkitgtk_built_h_api :=
95webkitgtk_static_h_api :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000096webkitgtk_h_api :=
97webkitgtk_sources :=
98webkitgtk_cppflags :=
commit-queue@webkit.org029d84f2012-12-11 17:58:03 +000099webkitgtk_gdom_built_h_api :=
mrobinson@webkit.org65b62452010-07-26 21:32:18 +0000100webkitgtk_gdom_built_sources :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000101webkitgtk_built_sources :=
102webkitgtk_built_nosources :=
carlosgc@webkit.org8ac10222012-05-09 16:08:56 +0000103webkit2_h_api :=
mrobinson@webkit.org20bd7d42012-02-22 18:56:40 +0000104webkit2_sources :=
mrobinson@webkit.org59b9ac12010-12-29 23:46:42 +0000105webkit2_built_sources :=
carlosgc@webkit.orge5e37552013-04-08 17:24:50 +0000106webkit2platform_sources :=
carlosgc@webkit.org8ac10222012-05-09 16:08:56 +0000107webkit2gtk_h_api :=
108webkit2gtk_built_sources :=
commit-queue@webkit.orgd1278702013-01-10 11:27:49 +0000109webkit2_web_extension_h_api :=
mrobinson@webkit.org20bd7d42012-02-22 18:56:40 +0000110webkit2_plugin_process_sources :=
mrobinson@webkit.org26c1c9a2011-07-15 18:11:24 +0000111webkit2_plugin_process_built_sources :=
112webkittestrunner_built_sources :=
mrobinson@webkit.orgae9b2b82011-06-06 20:18:58 +0000113libwebcoreinternals_built_sources :=
carlosgc@webkit.orgcccb615e2012-01-02 14:56:35 +0000114minibrowser_built_sources :=
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000115global_cppflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000116global_cflags :=
117global_cxxflags :=
kov@webkit.org30bb9182009-10-26 20:16:59 +0000118EXTRA_DIST :=
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000119BUILT_SOURCES :=
120CLEANFILES :=
alex@webkit.orga3615432011-09-26 21:44:11 +0000121DOMAIN :=
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000122DISTCLEANFILES :=
123MAINTAINERCLEANFILES :=
carlosgc@webkit.orgeedf25e2011-08-03 07:43:44 +0000124pkgconfig_DATA :=
carlosgc@webkit.orge5132af2013-10-18 10:33:26 +0000125gdom_symbol_files :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000126
mrobinson@webkit.org374ddf72013-04-19 17:55:57 +0000127if ENABLE_INTROSPECTION
128gir_DATA :=
129typelibs_DATA :=
130girdir := $(datadir)/gir-1.0
131typelibsdir := $(libdir)/girepository-1.0
132endif
133
xan@webkit.orga0e3f5f2011-01-03 18:26:12 +0000134# We do not care at all about this implicit built-in make rules,
135# disable them to save some build time
136%: %.c
137%: %.cpp
138%: %.o
139(%): %
140%.out: %
141%.c: %.w %.ch
142%.tex: %.w %.ch
143%:: %,v
144%:: RCS/%,v
145%:: RCS/%
146%:: s.%
147%:: SCCS/s.%
148
mrobinson@webkit.org27bbef32010-08-26 16:16:10 +0000149global_cppflags += \
alp@webkit.org278f1252007-12-27 06:05:21 +0000150 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
151 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
152 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
mrobinson@webkit.org9bc326f2013-02-07 22:08:08 +0000153 -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
154 -DBUILDING_CAIRO__ \
155 -DBUILDING_GTK__
philn@webkit.org0fe84032010-09-27 17:53:51 +0000156
mrobinson@webkit.org9bc326f2013-02-07 22:08:08 +0000157if ENABLE_WEBKIT2
158global_cppflags += \
159 -DBUILDING_WEBKIT2__
160
161endif
mrowe@apple.com84cdb082008-02-05 03:25:59 +0000162
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000163global_cxxflags += \
alp@webkit.org491d9092008-11-03 17:27:55 +0000164 -fno-rtti
alp@webkit.org278f1252007-12-27 06:05:21 +0000165
mrobinson@webkit.org3e4076e2013-02-21 16:19:47 +0000166# Read the feature defines file, that's created by generate-feature-defines-files
167# during configuration (SetupWebKitFeatures.m4).
168feature_defines := $(shell cat WebKitFeatures.txt)
169
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000170# -no-undefined required for building DLLs on Windows
171# It breaks the build on other platforms, so we use it conditionally
172if OS_WIN32
xan@webkit.org0a818012009-05-13 13:49:06 +0000173no_undefined = -no-undefined
commit-queue@webkit.org395e6c62010-09-21 17:44:31 +0000174version_script = -export-symbols-regex "^(webkit_|k?JS).*"
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000175endif
176
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000177if OS_GNU
abarth@webkit.orgc2a176a2011-01-02 02:04:41 +0000178version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000179endif
180
alp@webkit.org278f1252007-12-27 06:05:21 +0000181if ENABLE_COVERAGE
182global_cppflags += \
183 -DGCC_GENERATE_TEST_COVERAGE_FILES \
184 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
185endif
186
zandobersek@gmail.come06fe852013-05-08 07:03:55 +0000187# Default to outputting demangled symbols in case of reporting unresolved references or similar.
188# Using AM_LDFLAGS would be more appropriate here, but these are not used at all when linking installable libraries
189# like libwebkitgtk and libwebkit2gtk, so appending the linker flag to the LDFLAGS variable is done instead.
190LDFLAGS += -Wl,--no-demangle
191
kov@webkit.org30bb9182009-10-26 20:16:59 +0000192EXTRA_DIST += \
abarth@webkit.orgc2a176a2011-01-02 02:04:41 +0000193 $(srcdir)/Source/autotools/symbols.filter \
abarth@webkit.orga5db5752011-01-17 05:02:09 +0000194 $(srcdir)/Source/WebKit/LICENSE
alp@webkit.org278f1252007-12-27 06:05:21 +0000195
alp@webkit.org278f1252007-12-27 06:05:21 +0000196# Include module makefiles
kov@webkit.orge6dee6c2012-01-06 14:25:39 +0000197include Source/WTF/GNUmakefile.am
abarth@webkit.org76da8fc2011-01-02 06:22:31 +0000198include Source/JavaScriptCore/GNUmakefile.am
benjamin@webkit.orgdface952013-04-05 08:20:29 +0000199include Source/Platform/GNUmakefile.am
abarth@webkit.org8ac7e152011-01-08 09:35:14 +0000200include Source/WebCore/GNUmakefile.am
carlosgc@webkit.org4643e482011-05-03 09:53:26 +0000201include Source/WebCore/bindings/gobject/GNUmakefile.am
kov@webkit.org08382c12013-03-07 16:25:25 +0000202include Source/WebCore/platform/gtk/po/GNUmakefile.am
kov@webkit.org86b826a2013-09-13 19:06:11 +0000203include Source/WebInspectorUI/GNUmakefile.am
kov@webkit.orgb9513f72013-09-17 01:08:46 +0000204include Tools/gtk/GNUmakefile.am
205
kov@webkit.org08382c12013-03-07 16:25:25 +0000206include Source/WebKit/gtk/GNUmakefile.am
kov@webkit.orgb9513f72013-09-17 01:08:46 +0000207include Tools/GtkLauncher/GNUmakefile.am
commit-queue@webkit.org9d027e42011-06-22 13:49:45 +0000208
abarth@webkit.orgbe159d92011-01-15 20:02:03 +0000209include Source/WebKit2/GNUmakefile.am
alex@webkit.org9ead80d2011-03-31 12:53:43 +0000210include Tools/MiniBrowser/gtk/GNUmakefile.am
zandobersek@gmail.com9c5324a2013-03-20 21:26:07 +0000211include Source/ThirdParty/ANGLE/GNUmakefile.am
zandobersek@gmail.com24838de2013-03-21 19:25:41 +0000212include Source/ThirdParty/leveldb/GNUmakefile.am
kov@webkit.orgb9513f72013-09-17 01:08:46 +0000213
214if ENABLE_DEVELOPER_MODE
215include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
216include Source/WebKit/gtk/tests/GNUmakefile.am
217include Source/ThirdParty/gtest/GNUmakefile.am
218include Tools/GNUmakefile.am
carlosgc@webkit.org2f2682a2012-04-24 16:48:18 +0000219include Tools/TestWebKitAPI/GNUmakefile.am
kov@webkit.orgb9513f72013-09-17 01:08:46 +0000220include Tools/WebKitTestRunner/GNUmakefile.am
221endif
222
alex@webkit.orgb20f2982011-02-24 17:33:24 +0000223# [GTK] Refactor the translations now that we have webkit2
224# https://bugs.webkit.org/show_bug.cgi?id=55153
alp@webkit.org278f1252007-12-27 06:05:21 +0000225
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000226# Autogenerated sources
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000227BUILT_SOURCES += \
nayankk@motorola.com6c2a2792012-01-31 10:01:23 +0000228 $(javascriptcore_built_sources) \
229 $(javascriptcore_built_nosources) \
zandobersek@gmail.com39882512013-06-07 17:15:29 +0000230 $(platform_built_sources) \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000231 $(webcore_built_sources) \
232 $(webcore_built_nosources) \
kov@webkit.orge0b94072012-11-22 21:07:03 +0000233 $(webcore_svg_built_sources) \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000234 $(webkitgtk_built_sources) \
carlosgc@webkit.org8ac10222012-05-09 16:08:56 +0000235 $(webkitgtk_built_nosources) \
236 $(webkit2_built_sources) \
237 $(webkit2gtk_built_sources) \
238 $(webkit2_plugin_process_built_sources)
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000239
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000240DISTCLEANFILES += \
241 $(CLEANFILES) \
242 $(builddir)/doltcompile \
carlosgc@webkit.org6e607b32013-05-29 12:15:53 +0000243 $(builddir)/doltlibtool \
244 $(builddir)/WebKitFeatures.h \
245 $(builddir)/WebKitFeatures.txt
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000246
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000247MAINTAINERCLEANFILES += \
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000248 $(CLEANFILES) \
249 $(builddir)/doltcompile \
250 $(builddir)/doltlibtool \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000251 $(srcdir)/aconfig.h.in \
abarth@webkit.orgc2a176a2011-01-02 02:04:41 +0000252 $(srcdir)/Source/autotools/config.* \
253 $(srcdir)/Source/autotools/compile \
254 $(srcdir)/Source/autotools/depcomp \
255 $(srcdir)/Source/autotools/install-sh \
256 $(srcdir)/Source/autotools/missing \
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000257 $(srcdir)/configure \
258 $(srcdir)/GNUmakefile.in \
259 $(srcdir)/INSTALL \
260 $(srcdir)/README \
261 $(top_builddir)/config.*
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000262
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000263# Older automake versions (1.7) place Plo files in a different place so we need
264# to create the output directory manually.
christian@webkit.org01259772011-02-24 11:22:00 +0000265all-local: stamp-po
commit-queue@webkit.orgb12c4b92012-06-11 22:16:11 +0000266 $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000267
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000268# remove built sources and program directories
269clean-local:
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000270 -rm -rf $(GENPROGRAMS)
271
xan@webkit.org233d51e2009-03-14 20:22:13 +0000272maintainer-clean-local: distclean-local
xan@webkit.org233d51e2009-03-14 20:22:13 +0000273distclean-local:
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000274 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
mrobinson@webkit.org150f9cf2011-11-25 16:19:44 +0000275
276dist-hook: doc-dist-hook
277doc-dist-hook: docs-build.stamp
278 cp $(WebKit)/NEWS $(distdir)
zandobersek@gmail.com6499f572013-01-15 19:49:50 +0000279if ENABLE_WEBKIT1
mrobinson@webkit.org150f9cf2011-11-25 16:19:44 +0000280 @mkdir -p $(distdir)/Documentation/webkitgtk/html
281 @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
282 @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
283 @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
zandobersek@gmail.com6499f572013-01-15 19:49:50 +0000284endif
mrobinson@webkit.org150f9cf2011-11-25 16:19:44 +0000285if ENABLE_WEBKIT2
286 @mkdir -p $(distdir)/Documentation/webkit2gtk/html
287 @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
288 @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
289 @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html
290endif
carlosgc@webkit.orge5132af2013-10-18 10:33:26 +0000291 @mkdir -p $(distdir)/Documentation/webkitdomgtk/html
292 @mkdir -p $(distdir)/Documentation/webkitdomgtk/tmpl
293 @-cp ./Documentation/webkitdomgtk/tmpl/*.sgml $(distdir)/Documentation/webkitdomgtk/tmpl
294 @cp ./Documentation/webkitdomgtk/html/* $(distdir)/Documentation/webkitdomgtk/html