# 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 # 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 GENPROGRAMS := $(top_builddir)/Programs GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector WebCore := $(srcdir)/WebCore WebKit := $(srcdir)/WebKit/gtk # Libraries and support components bin_PROGRAMS := noinst_PROGRAMS := noinst_HEADERS := noinst_LTLIBRARIES := lib_LTLIBRARIES := IDL_BINDINGS := TEST_PROGS := POFILES := MOFILES := javascriptcore_h_api := javascriptcore_cppflags:= javascriptcore_sources := javascriptcore_built_sources := javascriptcore_built_nosources := 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 := global_cppflags := global_cflags := global_cxxflags := JSCORE_GIRSOURCES := WEBKIT_GIRSOURCES := FEATURE_DEFINES := typelibsdir := typelibs_DATA := EXTRA_DIST := BUILT_SOURCES := CLEANFILES := DISTCLEANFILES := MAINTAINERCLEANFILES := 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 += \ $(SYMBOL_VISIBILITY_INLINES) \ -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)/autotools/symbols.filter endif # Convenience libraries noinst_LTLIBRARIES += \ libJavaScriptCore.la nodist_EXTRA_libJavaScriptCore_la_SOURCES = \ $(javascriptcore_built_nosources) nodist_libJavaScriptCore_la_SOURCES = \ $(javascriptcore_built_sources) libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api) libJavaScriptCore_la_SOURCES = \ $(javascriptcore_sources) libJavaScriptCore_la_LIBADD = \ $(UNICODE_LIBS) \ $(GLIB_LIBS) \ -lpthread libJavaScriptCore_la_CXXFLAGS = \ $(global_cxxflags) \ $(libJavaScriptCore_la_CFLAGS) libJavaScriptCore_la_CFLAGS = \ -fstrict-aliasing \ -O3 \ $(global_cflags) \ $(GLIB_CFLAGS) \ $(UNICODE_CFLAGS) libJavaScriptCore_la_CPPFLAGS = \ $(global_cppflags) \ $(javascriptcore_cppflags) # Extra checks and flags global_cppflags += \ -DBUILDING_CAIRO__=1 \ -DBUILDING_GTK__=1 \ -DWTF_CHANGES 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 # ---- # 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 global_cflags += $(SYMBOL_VISIBILITY) else global_cppflags += \ -DG_DISABLE_DEPRECATED \ -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)/autotools/symbols.filter \ $(srcdir)/gtk-doc.make \ $(srcdir)/WebKit/LICENSE # Include module makefiles include JavaScriptCore/GNUmakefile.am include WebCore/GNUmakefile.am include WebKit/gtk/GNUmakefile.am include WebCore/bindings/gobject/GNUmakefile.am include WebKitTools/GNUmakefile.am include WebKit/gtk/po/GNUmakefile.am # Autogenerated sources BUILT_SOURCES += \ $(javascriptcore_built_sources) \ $(javascriptcore_built_nosources) \ $(webcore_built_sources) \ $(webcore_built_nosources) \ $(webkitgtk_built_sources) \ $(webkitgtk_built_nosources) DISTCLEANFILES += \ $(CLEANFILES) \ $(builddir)/doltcompile \ $(builddir)/doltlibtool MAINTAINERCLEANFILES += \ $(CLEANFILES) \ $(builddir)/doltcompile \ $(builddir)/doltlibtool \ $(srcdir)/aconfig.h.in \ $(srcdir)/autotools/config.* \ $(srcdir)/autotools/compile \ $(srcdir)/autotools/depcomp \ $(srcdir)/autotools/install-sh \ $(srcdir)/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: $(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)