blob: ecd305f6ab45df5d92a89ec74598644aeb9a1eb4 [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
37GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
mrobinson@webkit.org59b9ac12010-12-29 23:46:42 +000038GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
commit-queue@webkit.org029d84f2012-12-11 17:58:03 +000039GENSOURCES_WEBKITDOM := $(top_builddir)/DerivedSources/webkitdom
alp@webkit.orgc04fee22008-04-19 05:16:00 +000040GENPROGRAMS := $(top_builddir)/Programs
loislo@chromium.orga47f6722010-08-18 14:36:58 +000041GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
abarth@webkit.org8ac7e152011-01-08 09:35:14 +000042WebCore := $(srcdir)/Source/WebCore
abarth@webkit.orga5db5752011-01-17 05:02:09 +000043WebKit := $(srcdir)/Source/WebKit/gtk
abarth@webkit.orgbe159d92011-01-15 20:02:03 +000044WebKit2 := $(srcdir)/Source/WebKit2
carlosgc@webkit.orgeedf25e2011-08-03 07:43:44 +000045pkgconfigdir := $(libdir)/pkgconfig
carlosgc@webkit.org28f29832011-09-27 09:35:55 +000046libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
jmalonzo@webkit.orgc9b4de42009-05-18 11:30:53 +000047
alp@webkit.org278f1252007-12-27 06:05:21 +000048# Libraries and support components
alp@webkit.org643f3ef2008-06-15 11:46:18 +000049bin_PROGRAMS :=
alp@webkit.org278f1252007-12-27 06:05:21 +000050noinst_PROGRAMS :=
carlosgc@webkit.org4e17b162011-08-03 12:20:12 +000051libexec_PROGRAMS :=
alp@webkit.org9388fc82008-08-10 18:21:21 +000052noinst_HEADERS :=
kov@webkit.org478f5952010-01-05 19:08:10 +000053noinst_LTLIBRARIES :=
xan@webkit.orgceeb8492010-06-28 13:58:42 +000054lib_LTLIBRARIES :=
alp@webkit.org278f1252007-12-27 06:05:21 +000055IDL_BINDINGS :=
jmalonzo@webkit.org27bbbab2009-03-20 19:45:05 +000056TEST_PROGS :=
kov@webkit.org774c23b2009-04-06 19:39:14 +000057POFILES :=
commit-queue@webkit.orga43130b2012-03-02 23:10:32 +000058PO_LINGUAS :=
59USER_LINGUAS :=
60USE_LINGUAS :=
kov@webkit.org774c23b2009-04-06 19:39:14 +000061MOFILES :=
carlosgc@webkit.org7ecc61f2012-04-30 11:18:14 +000062ALL_MOFILES :=
haraken@chromium.org5f99f4f2011-12-27 22:31:45 +000063dom_binding_idls :=
kov@webkit.orge6dee6c2012-01-06 14:25:39 +000064wtf_sources :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000065javascriptcore_h_api :=
66javascriptcore_cppflags:=
carlosgc@webkit.org2a591002011-06-06 07:57:26 +000067javascriptcore_cflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000068javascriptcore_sources :=
69javascriptcore_built_sources :=
70javascriptcore_built_nosources :=
carlosgc@webkit.orgf4fbe002012-06-11 15:31:19 +000071llint_nosources :=
72offlineasm_nosources :=
kov@webkit.org64545a32012-11-16 01:05:18 +000073webcore_platform_sources :=
kov@webkit.orgc34e0ed2012-03-20 03:22:34 +000074webcore_modules_sources :=
kov@webkit.orge0b94072012-11-22 21:07:03 +000075webcore_svg_built_sources :=
76webcore_svg_sources :=
77webcore_cppflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000078webcore_sources :=
79webcore_libadd :=
80webcore_built_sources :=
81webcore_built_nosources :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000082webcoregtk_sources :=
mrobinson@webkit.org27bbef32010-08-26 16:16:10 +000083webcoregtk_cppflags :=
mrobinson@webkit.org65b62452010-07-26 21:32:18 +000084webkitgtk_built_h_api :=
85webkitgtk_static_h_api :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000086webkitgtk_h_api :=
87webkitgtk_sources :=
88webkitgtk_cppflags :=
commit-queue@webkit.org029d84f2012-12-11 17:58:03 +000089webkitgtk_gdom_built_h_api :=
mrobinson@webkit.org65b62452010-07-26 21:32:18 +000090webkitgtk_gdom_built_sources :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +000091webkitgtk_built_sources :=
92webkitgtk_built_nosources :=
carlosgc@webkit.org8ac10222012-05-09 16:08:56 +000093webkit2_h_api :=
mrobinson@webkit.org20bd7d42012-02-22 18:56:40 +000094webkit2_sources :=
mrobinson@webkit.org59b9ac12010-12-29 23:46:42 +000095webkit2_built_sources :=
carlosgc@webkit.org8ac10222012-05-09 16:08:56 +000096webkit2gtk_h_api :=
97webkit2gtk_built_sources :=
commit-queue@webkit.orgd1278702013-01-10 11:27:49 +000098webkit2_web_extension_h_api :=
mrobinson@webkit.org20bd7d42012-02-22 18:56:40 +000099webkit2_plugin_process_sources :=
mrobinson@webkit.org26c1c9a2011-07-15 18:11:24 +0000100webkit2_plugin_process_built_sources :=
101webkittestrunner_built_sources :=
mrobinson@webkit.orgae9b2b82011-06-06 20:18:58 +0000102libwebcoreinternals_built_sources :=
carlosgc@webkit.orgcccb615e2012-01-02 14:56:35 +0000103minibrowser_built_sources :=
alp@webkit.org040ad8b2008-02-04 11:00:43 +0000104global_cppflags :=
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000105global_cflags :=
106global_cxxflags :=
kov@webkit.org60affd12009-11-30 15:13:44 +0000107JSCORE_GIRSOURCES :=
kov@webkit.org2a1f73c2009-11-30 19:27:53 +0000108WEBKIT_GIRSOURCES :=
109typelibsdir :=
110typelibs_DATA :=
kov@webkit.org30bb9182009-10-26 20:16:59 +0000111EXTRA_DIST :=
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000112BUILT_SOURCES :=
113CLEANFILES :=
alex@webkit.orga3615432011-09-26 21:44:11 +0000114DOMAIN :=
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000115DISTCLEANFILES :=
116MAINTAINERCLEANFILES :=
carlosgc@webkit.orgeedf25e2011-08-03 07:43:44 +0000117pkgconfig_DATA :=
alp@webkit.org278f1252007-12-27 06:05:21 +0000118
xan@webkit.orga0e3f5f2011-01-03 18:26:12 +0000119# We do not care at all about this implicit built-in make rules,
120# disable them to save some build time
121%: %.c
122%: %.cpp
123%: %.o
124(%): %
125%.out: %
126%.c: %.w %.ch
127%.tex: %.w %.ch
128%:: %,v
129%:: RCS/%,v
130%:: RCS/%
131%:: s.%
132%:: SCCS/s.%
133
mrobinson@webkit.org27bbef32010-08-26 16:16:10 +0000134global_cppflags += \
alp@webkit.org278f1252007-12-27 06:05:21 +0000135 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
136 -Wformat -Wformat-security -Wno-format-y2k -Wundef \
137 -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
mrobinson@webkit.org9bc326f2013-02-07 22:08:08 +0000138 -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
139 -DBUILDING_CAIRO__ \
140 -DBUILDING_GTK__
philn@webkit.org0fe84032010-09-27 17:53:51 +0000141
mrobinson@webkit.org9bc326f2013-02-07 22:08:08 +0000142if ENABLE_WEBKIT2
143global_cppflags += \
144 -DBUILDING_WEBKIT2__
145
146endif
mrowe@apple.com84cdb082008-02-05 03:25:59 +0000147
jmalonzo@webkit.orga3327562009-05-18 11:30:06 +0000148global_cxxflags += \
alp@webkit.org491d9092008-11-03 17:27:55 +0000149 -fno-rtti
alp@webkit.org278f1252007-12-27 06:05:21 +0000150
mrobinson@webkit.org3e4076e2013-02-21 16:19:47 +0000151# Read the feature defines file, that's created by generate-feature-defines-files
152# during configuration (SetupWebKitFeatures.m4).
153feature_defines := $(shell cat WebKitFeatures.txt)
154
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000155# -no-undefined required for building DLLs on Windows
156# It breaks the build on other platforms, so we use it conditionally
157if OS_WIN32
xan@webkit.org0a818012009-05-13 13:49:06 +0000158no_undefined = -no-undefined
commit-queue@webkit.org395e6c62010-09-21 17:44:31 +0000159version_script = -export-symbols-regex "^(webkit_|k?JS).*"
alp@webkit.org15ef3c42008-06-03 00:30:19 +0000160endif
161
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000162if OS_GNU
abarth@webkit.orgc2a176a2011-01-02 02:04:41 +0000163version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
jmalonzo@webkit.orga897fea2008-09-24 07:42:51 +0000164endif
165
alp@webkit.org278f1252007-12-27 06:05:21 +0000166if ENABLE_COVERAGE
167global_cppflags += \
168 -DGCC_GENERATE_TEST_COVERAGE_FILES \
169 -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
170endif
171
kov@webkit.org30bb9182009-10-26 20:16:59 +0000172EXTRA_DIST += \
abarth@webkit.orgc2a176a2011-01-02 02:04:41 +0000173 $(srcdir)/Source/autotools/symbols.filter \
mrobinson@webkit.org3e4076e2013-02-21 16:19:47 +0000174 $(srcdir)/Tools/generate-feature-defines-files \
abarth@webkit.orga5db5752011-01-17 05:02:09 +0000175 $(srcdir)/Source/WebKit/LICENSE
alp@webkit.org278f1252007-12-27 06:05:21 +0000176
alp@webkit.org278f1252007-12-27 06:05:21 +0000177# Include module makefiles
kov@webkit.orge6dee6c2012-01-06 14:25:39 +0000178include Source/WTF/GNUmakefile.am
abarth@webkit.org76da8fc2011-01-02 06:22:31 +0000179include Source/JavaScriptCore/GNUmakefile.am
abarth@webkit.org8ac7e152011-01-08 09:35:14 +0000180include Source/WebCore/GNUmakefile.am
carlosgc@webkit.org4643e482011-05-03 09:53:26 +0000181include Source/WebKit/gtk/GNUmakefile.am
182include Source/WebCore/bindings/gobject/GNUmakefile.am
183include Tools/GNUmakefile.am
184include Source/WebKit/gtk/po/GNUmakefile.am
commit-queue@webkit.org9d027e42011-06-22 13:49:45 +0000185
abarth@webkit.orgbe159d92011-01-15 20:02:03 +0000186include Source/WebKit2/GNUmakefile.am
mrobinson@webkit.orgf9bfed42011-10-12 04:21:06 +0000187include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
alex@webkit.org9ead80d2011-03-31 12:53:43 +0000188include Tools/MiniBrowser/gtk/GNUmakefile.am
mrobinson@webkit.org094d66e2011-05-31 23:35:34 +0000189include Tools/WebKitTestRunner/GNUmakefile.am
carlosgc@webkit.org2f2682a2012-04-24 16:48:18 +0000190include Source/ThirdParty/gtest/GNUmakefile.am
191include Tools/TestWebKitAPI/GNUmakefile.am
alex@webkit.orgb20f2982011-02-24 17:33:24 +0000192# [GTK] Refactor the translations now that we have webkit2
193# https://bugs.webkit.org/show_bug.cgi?id=55153
alp@webkit.org278f1252007-12-27 06:05:21 +0000194
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000195# Autogenerated sources
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000196BUILT_SOURCES += \
nayankk@motorola.com6c2a2792012-01-31 10:01:23 +0000197 $(javascriptcore_built_sources) \
198 $(javascriptcore_built_nosources) \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000199 $(webcore_built_sources) \
200 $(webcore_built_nosources) \
kov@webkit.orge0b94072012-11-22 21:07:03 +0000201 $(webcore_svg_built_sources) \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000202 $(webkitgtk_built_sources) \
carlosgc@webkit.org8ac10222012-05-09 16:08:56 +0000203 $(webkitgtk_built_nosources) \
204 $(webkit2_built_sources) \
205 $(webkit2gtk_built_sources) \
206 $(webkit2_plugin_process_built_sources)
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000207
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000208DISTCLEANFILES += \
209 $(CLEANFILES) \
210 $(builddir)/doltcompile \
mrobinson@webkit.orgb6756222010-11-18 06:32:43 +0000211 $(builddir)/doltlibtool
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000212
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000213MAINTAINERCLEANFILES += \
jmalonzo@webkit.orgeff81ec2009-10-15 23:17:59 +0000214 $(CLEANFILES) \
215 $(builddir)/doltcompile \
216 $(builddir)/doltlibtool \
alp@webkit.orgf93619a2007-12-30 03:33:44 +0000217 $(srcdir)/aconfig.h.in \
abarth@webkit.orgc2a176a2011-01-02 02:04:41 +0000218 $(srcdir)/Source/autotools/config.* \
219 $(srcdir)/Source/autotools/compile \
220 $(srcdir)/Source/autotools/depcomp \
221 $(srcdir)/Source/autotools/install-sh \
222 $(srcdir)/Source/autotools/missing \
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000223 $(srcdir)/configure \
224 $(srcdir)/GNUmakefile.in \
225 $(srcdir)/INSTALL \
226 $(srcdir)/README \
227 $(top_builddir)/config.*
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000228
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000229# Older automake versions (1.7) place Plo files in a different place so we need
230# to create the output directory manually.
christian@webkit.org01259772011-02-24 11:22:00 +0000231all-local: stamp-po
commit-queue@webkit.orgb12c4b92012-06-11 22:16:11 +0000232 $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
alp@webkit.org76e7f9a2008-10-08 00:42:37 +0000233
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000234# remove built sources and program directories
235clean-local:
jmalonzo@webkit.org15d83302009-03-11 11:57:43 +0000236 -rm -rf $(GENPROGRAMS)
237
xan@webkit.org233d51e2009-03-14 20:22:13 +0000238maintainer-clean-local: distclean-local
xan@webkit.org233d51e2009-03-14 20:22:13 +0000239distclean-local:
alp@webkit.orgc04fee22008-04-19 05:16:00 +0000240 -rm -rf $(GENSOURCES) $(GENPROGRAMS)
mrobinson@webkit.org150f9cf2011-11-25 16:19:44 +0000241
242dist-hook: doc-dist-hook
243doc-dist-hook: docs-build.stamp
244 cp $(WebKit)/NEWS $(distdir)
zandobersek@gmail.com6499f572013-01-15 19:49:50 +0000245if ENABLE_WEBKIT1
mrobinson@webkit.org150f9cf2011-11-25 16:19:44 +0000246 @mkdir -p $(distdir)/Documentation/webkitgtk/html
247 @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
248 @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
249 @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
zandobersek@gmail.com6499f572013-01-15 19:49:50 +0000250endif
mrobinson@webkit.org150f9cf2011-11-25 16:19:44 +0000251if ENABLE_WEBKIT2
252 @mkdir -p $(distdir)/Documentation/webkit2gtk/html
253 @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
254 @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
255 @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html
256endif