GNUmakefile.am 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. # _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
  16. # 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.
  19. # Global Variables Reference
  20. # global_cppflags = CPPFLAGS that apply to all C/C++ files that are built for any project.
  21. # global_cflags = CFLAGS that apply to all C files that are built for any project.
  22. # global_cxxflags = CXXFLAGS that apply to all C++ files that are bult for any project.
  23. srcdir = @srcdir@
  24. VPATH = @srcdir@
  25. DISTCHECK_CONFIGURE_FLAGS = \
  26. --enable-introspection \
  27. --enable-gtk-doc \
  28. --enable-webkit2
  29. # Directory for autogenerated sources
  30. GENSOURCES := $(top_builddir)/DerivedSources
  31. GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
  32. GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
  33. GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
  34. GENSOURCES_WEBKIT2 := $(top_builddir)/DerivedSources/WebKit2
  35. GENSOURCES_WEBKITDOM := $(top_builddir)/DerivedSources/webkitdom
  36. GENSOURCES_PLATFORM := $(top_builddir)/DerivedSources/Platform
  37. GENPROGRAMS := $(top_builddir)/Programs
  38. GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
  39. WebCore := $(srcdir)/Source/WebCore
  40. WebKit := $(srcdir)/Source/WebKit/gtk
  41. WebKit2 := $(srcdir)/Source/WebKit2
  42. pkgconfigdir := $(libdir)/pkgconfig
  43. libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
  44. # Libraries and support components
  45. bin_PROGRAMS :=
  46. noinst_PROGRAMS :=
  47. libexec_PROGRAMS :=
  48. noinst_DATA :=
  49. noinst_HEADERS :=
  50. noinst_LTLIBRARIES :=
  51. lib_LTLIBRARIES :=
  52. IDL_BINDINGS :=
  53. TEST_PROGS :=
  54. POFILES :=
  55. PO_LINGUAS :=
  56. USER_LINGUAS :=
  57. USE_LINGUAS :=
  58. MOFILES :=
  59. ALL_MOFILES :=
  60. dom_binding_idls :=
  61. wtf_sources :=
  62. javascriptcore_h_api :=
  63. javascriptcore_cppflags:=
  64. javascriptcore_cflags :=
  65. javascriptcore_sources :=
  66. javascriptcore_built_sources :=
  67. javascriptcore_built_nosources :=
  68. llint_nosources :=
  69. offlineasm_nosources :=
  70. platform_webcore_cppflags :=
  71. platform_cppflags :=
  72. platform_built_sources :=
  73. platform_sources :=
  74. platformgtk_cppflags :=
  75. platformgtk_sources :=
  76. webcore_platform_sources :=
  77. webcore_modules_sources :=
  78. webcore_svg_built_sources :=
  79. webcore_svg_sources :=
  80. webcore_cppflags :=
  81. webcore_sources :=
  82. webcore_libadd :=
  83. webcore_built_sources :=
  84. webcore_built_nosources :=
  85. webcoregtk_sources :=
  86. webcoregtk_cppflags :=
  87. webkitgtk_built_h_api :=
  88. webkitgtk_static_h_api :=
  89. webkitgtk_h_api :=
  90. webkitgtk_sources :=
  91. webkitgtk_cppflags :=
  92. webkitgtk_gdom_built_h_api :=
  93. webkitgtk_gdom_built_sources :=
  94. webkitgtk_built_sources :=
  95. webkitgtk_built_nosources :=
  96. webkit2_h_api :=
  97. webkit2_sources :=
  98. webkit2_built_sources :=
  99. webkit2platform_sources :=
  100. webkit2gtk_h_api :=
  101. webkit2gtk_built_sources :=
  102. webkit2_web_extension_h_api :=
  103. webkit2_plugin_process_sources :=
  104. webkit2_plugin_process_built_sources :=
  105. webkittestrunner_built_sources :=
  106. libwebcoreinternals_built_sources :=
  107. minibrowser_built_sources :=
  108. global_cppflags :=
  109. global_cflags :=
  110. global_cxxflags :=
  111. EXTRA_DIST :=
  112. BUILT_SOURCES :=
  113. CLEANFILES :=
  114. DOMAIN :=
  115. DISTCLEANFILES :=
  116. MAINTAINERCLEANFILES :=
  117. pkgconfig_DATA :=
  118. if ENABLE_INTROSPECTION
  119. gir_DATA :=
  120. typelibs_DATA :=
  121. girdir := $(datadir)/gir-1.0
  122. typelibsdir := $(libdir)/girepository-1.0
  123. endif
  124. # We do not care at all about this implicit built-in make rules,
  125. # disable them to save some build time
  126. %: %.c
  127. %: %.cpp
  128. %: %.o
  129. (%): %
  130. %.out: %
  131. %.c: %.w %.ch
  132. %.tex: %.w %.ch
  133. %:: %,v
  134. %:: RCS/%,v
  135. %:: RCS/%
  136. %:: s.%
  137. %:: SCCS/s.%
  138. global_cppflags += \
  139. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
  140. -Wformat -Wformat-security -Wno-format-y2k -Wundef \
  141. -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
  142. -Wno-unused-parameter -Wno-parentheses -fno-exceptions \
  143. -DBUILDING_CAIRO__ \
  144. -DBUILDING_GTK__
  145. if ENABLE_WEBKIT2
  146. global_cppflags += \
  147. -DBUILDING_WEBKIT2__
  148. endif
  149. global_cxxflags += \
  150. -fno-rtti
  151. # Read the feature defines file, that's created by generate-feature-defines-files
  152. # during configuration (SetupWebKitFeatures.m4).
  153. feature_defines := $(shell cat WebKitFeatures.txt)
  154. # -no-undefined required for building DLLs on Windows
  155. # It breaks the build on other platforms, so we use it conditionally
  156. if OS_WIN32
  157. no_undefined = -no-undefined
  158. version_script = -export-symbols-regex "^(webkit_|k?JS).*"
  159. endif
  160. if OS_GNU
  161. version_script = -Wl,--version-script,$(srcdir)/Source/autotools/symbols.filter
  162. endif
  163. if ENABLE_COVERAGE
  164. global_cppflags += \
  165. -DGCC_GENERATE_TEST_COVERAGE_FILES \
  166. -DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
  167. endif
  168. # Default to outputting demangled symbols in case of reporting unresolved references or similar.
  169. # Using AM_LDFLAGS would be more appropriate here, but these are not used at all when linking installable libraries
  170. # like libwebkitgtk and libwebkit2gtk, so appending the linker flag to the LDFLAGS variable is done instead.
  171. LDFLAGS += -Wl,--no-demangle
  172. EXTRA_DIST += \
  173. $(srcdir)/Source/autotools/symbols.filter \
  174. $(srcdir)/Source/WebKit/LICENSE
  175. # Include module makefiles
  176. include Source/WTF/GNUmakefile.am
  177. include Source/JavaScriptCore/GNUmakefile.am
  178. include Source/Platform/GNUmakefile.am
  179. include Source/WebCore/GNUmakefile.am
  180. include Source/WebCore/bindings/gobject/GNUmakefile.am
  181. include Source/WebCore/platform/gtk/po/GNUmakefile.am
  182. include Source/WebKit/gtk/GNUmakefile.am
  183. include Tools/GNUmakefile.am
  184. include Source/WebKit2/GNUmakefile.am
  185. include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
  186. include Tools/MiniBrowser/gtk/GNUmakefile.am
  187. include Tools/WebKitTestRunner/GNUmakefile.am
  188. include Source/ThirdParty/ANGLE/GNUmakefile.am
  189. include Source/ThirdParty/gtest/GNUmakefile.am
  190. include Source/ThirdParty/leveldb/GNUmakefile.am
  191. include Tools/TestWebKitAPI/GNUmakefile.am
  192. # [GTK] Refactor the translations now that we have webkit2
  193. # https://bugs.webkit.org/show_bug.cgi?id=55153
  194. # Autogenerated sources
  195. BUILT_SOURCES += \
  196. $(javascriptcore_built_sources) \
  197. $(javascriptcore_built_nosources) \
  198. $(platform_built_sources) \
  199. $(webcore_built_sources) \
  200. $(webcore_built_nosources) \
  201. $(webcore_svg_built_sources) \
  202. $(webkitgtk_built_sources) \
  203. $(webkitgtk_built_nosources) \
  204. $(webkit2_built_sources) \
  205. $(webkit2gtk_built_sources) \
  206. $(webkit2_plugin_process_built_sources)
  207. DISTCLEANFILES += \
  208. $(CLEANFILES) \
  209. $(builddir)/doltcompile \
  210. $(builddir)/doltlibtool \
  211. $(builddir)/WebKitFeatures.h \
  212. $(builddir)/WebKitFeatures.txt
  213. MAINTAINERCLEANFILES += \
  214. $(CLEANFILES) \
  215. $(builddir)/doltcompile \
  216. $(builddir)/doltlibtool \
  217. $(srcdir)/aconfig.h.in \
  218. $(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 \
  223. $(srcdir)/configure \
  224. $(srcdir)/GNUmakefile.in \
  225. $(srcdir)/INSTALL \
  226. $(srcdir)/README \
  227. $(top_builddir)/config.*
  228. # Older automake versions (1.7) place Plo files in a different place so we need
  229. # to create the output directory manually.
  230. all-local: stamp-po
  231. $(MKDIR_P) $(top_builddir)/$(DEPDIR)/DerivedSources
  232. # remove built sources and program directories
  233. clean-local:
  234. -rm -rf $(GENPROGRAMS)
  235. maintainer-clean-local: distclean-local
  236. distclean-local:
  237. -rm -rf $(GENSOURCES) $(GENPROGRAMS)
  238. dist-hook: doc-dist-hook
  239. doc-dist-hook: docs-build.stamp
  240. cp $(WebKit)/NEWS $(distdir)
  241. if ENABLE_WEBKIT1
  242. @mkdir -p $(distdir)/Documentation/webkitgtk/html
  243. @mkdir -p $(distdir)/Documentation/webkitgtk/tmpl
  244. @-cp ./Documentation/webkitgtk/tmpl/*.sgml $(distdir)/Documentation/webkitgtk/tmpl
  245. @cp ./Documentation/webkitgtk/html/* $(distdir)/Documentation/webkitgtk/html
  246. endif
  247. if ENABLE_WEBKIT2
  248. @mkdir -p $(distdir)/Documentation/webkit2gtk/html
  249. @mkdir -p $(distdir)/Documentation/webkit2gtk/tmpl
  250. @-cp ./Documentation/webkit2gtk/tmpl/*.sgml $(distdir)/Documentation/webkit2gtk/tmpl
  251. @cp ./Documentation/webkit2gtk/html/* $(distdir)/Documentation/webkit2gtk/html
  252. endif