# @configure_input@ #************************************************************************** #* * #* OCaml * #* * #* David Allsopp, OCaml Labs, Cambridge. * #* * #* Copyright 2020 MetaStack Solutions Ltd. * #* * #* All rights reserved. This file is distributed under the terms of * #* the GNU Lesser General Public License version 2.1, with the * #* special exception on linking described in the file LICENSE. * #* * #************************************************************************** # This Makefile contains configuration gleaned by configure but which should not # be installed in Makefile.config. The file is designed to be included in # OCaml's build system and so itself includes Makefile.config. It assumes that # $(ROOTDIR) has been defined. # This variable is added to prevent double-inclusion of this Makefile by # Makefile.config_if_required. override is used as this has highest $(origin ) # priority (including over make BUILD_CONFIG_INCLUDED) override BUILD_CONFIG_INCLUDED = include $(ROOTDIR)/Makefile.config INSTALL ?= @INSTALL@ -p INSTALL_DATA ?= @INSTALL_DATA@ INSTALL_PROG ?= @INSTALL_PROGRAM@ # Whether to build certain libraries and tools build_ocamldebug = @build_ocamldebug@ build_ocamldoc = @build_ocamldoc@ build_ocamltex = @build_ocamltex@ lib_dynlink = @lib_dynlink@ lib_runtime_events = @lib_runtime_events@ lib_str = @lib_str@ lib_systhreads = @lib_systhreads@ lib_unix = @lib_unix@ # Whether to install the native toplevel (ocamlnat) INSTALL_OCAMLNAT = @install_ocamlnat@ # The command to generate C dependency information DEP_CC=@DEP_CC@ -MM COMPUTE_DEPS=@compute_deps@ # Build-system flags to use to compile C files OC_CFLAGS=@oc_cflags@ OC_CPPFLAGS=-I$(ROOTDIR)/runtime @oc_cppflags@ # The following variable defines flags to be passed to the C preprocessor # when compiling C files to be linked with native code. This includes # the native runtime itself and can also include the stub code around # C libraries when it needs to be different from the one used to # link with bytecode. # These flags should be passed *in addition* to those in OC_CPPFLAGS, they # should not replace them. OC_NATIVE_CPPFLAGS=-DNATIVE_CODE @native_cppflags@ # Same as above, for CFLAGS OC_NATIVE_CFLAGS=@native_cflags@ # Additional link-time options # To support dynamic loading of shared libraries (they need to look at # our own symbols): OC_LDFLAGS=@oc_ldflags@ OC_DLL_LDFLAGS=@oc_dll_ldflags@ OC_EXE_LDFLAGS=@oc_exe_ldflags@ MKEXE_VIA_CC=\ $(CC) $(OC_EXE_LDFLAGS) $(OC_CFLAGS) $(CFLAGS) @mkexe_via_cc_ldflags@ # Which tool to use to display differences between files DIFF=@DIFF@ # Which flags to pass to the diff tool DIFF_FLAGS=@DIFF_FLAGS@ # The rlwrap command (for the *runtop targets) RLWRAP=@rlwrap@ # The best sed which is available (GNU sed if available) SED=@SED@ # Which document generator: odoc or ocamldoc? DOCUMENTATION_TOOL=@documentation_tool@ DOCUMENTATION_TOOL_CMD=@documentation_tool_cmd@ # The location of the FlexDLL sources to use (usually provided as the flexdll # Git submodule) FLEXDLL_SOURCES=@flexdir@ BOOTSTRAPPING_FLEXDLL=@bootstrapping_flexdll@ ### Where to install documentation PACKAGE_TARNAME = @PACKAGE_TARNAME@ datarootdir = @datarootdir@ DOCDIR=@docdir@ ocamltest_unix_impl = @ocamltest_unix_impl@ ocamltest_unix_name = @ocamltest_unix_name@ ocamltest_unix_path = @ocamltest_unix_path@ ocamltest_unix_include = @ocamltest_unix_include@$(EMPTY) # Which make target to build, depending on whether the native compiler # has been enabled or not during the configuration stage DEFAULT_BUILD_TARGET = @default_build_target@ # Flags to use when compiling and linking OCaml programs # The names of the variables below take the form XXX_YYY_ZZZ where # # XXX is one of OC, OCAML or the lower-case name of a module. The OC prefix # is for private variables (i.e. reserved by the compiler's build system), # the OCAML prefix is used for variables users can define to add their # own flags and the module-name prefix is for flags that apply only # to one module. # # YYY refers to the backend. At the moment, it can take the values # COMMON for the flags shared by all the backends, BYTECODE or NATIVE # (other backends may be added in the future). # # ZZZ is either COMPFLAGS (compile-time flags) or LINKFLAGS (link-time flags). # Countrary to the C convention wrt. CFLAGS and LDFLAGS, the flags in the # COMPFLAGS category are not passed at link time, so if a flag is needed # at both stages, like e.g. -g, it should be added to both # XXX_YYY_COMPFLAGS and XXX_YYY_LINKFLAGS. OC_COMMON_COMPFLAGS = -g -strict-sequence -principal -absname \ -w +a-4-9-40-41-42-44-45-48 -warn-error +a -bin-annot \ -strict-formats OC_COMMON_LINKFLAGS = $(INCLUDES) OC_BYTECODE_LINKFLAGS = OC_NATIVE_COMPFLAGS = @oc_native_compflags@ OC_NATIVE_LINKFLAGS = -g # Platform-dependent command to create symbolic links LN = @ln@ # Platform-dependent assembler files to use to build the runtime runtime_ASM_OBJECTS = $(addprefix runtime/,@runtime_asm_objects@) # Platform-dependent module for ocamlyacc ocamlyacc_WSTR_MODULE = @ocamlyacc_wstr_module@