# Makefile.build_config. Generated from Makefile.build_config.in by configure. #************************************************************************** #* * #* 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 ?= /usr/bin/install -c -p INSTALL_DATA ?= ${INSTALL} -m 644 INSTALL_PROG ?= ${INSTALL} # Whether to build certain libraries and tools build_ocamldebug = true build_ocamldoc = true build_libraries_manpages = true OCAMLDOC_TARGET = ocamldoc OCAMLTEST_TARGET = ocamltest OCAMLDOC_OPT_TARGET = ocamldoc.opt OCAMLTEST_OPT_TARGET = ocamltest.opt build_ocamlobjinfo = true build_ocamltest = true build_ocamltex = true lib_dynlink = true lib_runtime_events = true lib_str = true lib_systhreads = true lib_unix = true # The following variable is added to keep track of which other libraries # have to be built by the recursive makefiles (not to be confused with # the OTHERLIBRARIES variable defined in Makefile.config.in and which # lists all the other libraries that get built, no matter how). # This variable is expected to disappear once all the makefiles under # otherlibs/ have been merged into the root Makefile OTHERLIBS = runtime_events unix str systhreads OPTIONAL_LIBRARIES = ocamldoc/odoc_info otherlibs/dynlink/dynlink testsuite/lib/testing OPTIONAL_BYTECODE_TOOLS = debugger/ocamldebug testsuite/tools/codegen testsuite/tools/expect OPTIONAL_NATIVE_TOOLS = # Whether to install the native toplevel (ocamlnat) INSTALL_OCAMLNAT = false # The command to generate C dependency information DEP_CC=gcc -MM COMPUTE_DEPS=true # Default flags to use to compile C files OC_CFLAGS = -O2 -fno-strict-aliasing -fwrapv -g -Wall -Wint-conversion -Wstrict-prototypes -Wold-style-definition -Wundef -Wold-style-declaration -Wimplicit-fallthrough=5 -Werror -fno-common -fexcess-precision=standard -Wvla -fno-tree-vrp # Flags to use when compiling C files to be linked with bytecode OC_BYTECODE_CFLAGS = -O2 -fno-strict-aliasing -fwrapv -g -Wall -Wint-conversion -Wstrict-prototypes -Wold-style-definition -Wundef -Wold-style-declaration -Wimplicit-fallthrough=5 -Werror -fno-common -fexcess-precision=standard -Wvla -fno-tree-vrp # Flags to use when compiling C files to be linked with native code OC_NATIVE_CFLAGS = -O2 -fno-strict-aliasing -fwrapv -g -Wall -Wint-conversion -Wstrict-prototypes -Wold-style-definition -Wundef -Wold-style-declaration -Wimplicit-fallthrough=5 -Werror -fno-common -fexcess-precision=standard -Wvla -fno-tree-vrp # The submodules should be searched *before* any other external -I paths OC_INCLUDES = $(addprefix -I $(ROOTDIR)/, \ runtime ) OC_CPPFLAGS = $(OC_INCLUDES) -D_FILE_OFFSET_BITS=64 OC_BYTECODE_CPPFLAGS = $(OC_INCLUDES) -D_FILE_OFFSET_BITS=64 OC_NATIVE_CPPFLAGS = $(OC_INCLUDES) -D_FILE_OFFSET_BITS=64 -DNATIVE_CODE -DTARGET_i386 -DMODEL_default -DSYS_linux # Additional link-time options # To support dynamic loading of shared libraries (they need to look at # our own symbols): OC_LDFLAGS= -Wl,-E OC_DLL_LDFLAGS= MKEXE_VIA_CC=$(CC) $(OC_LDFLAGS) $(LDFLAGS) $(OUTPUTEXE)$(1) $(2) # How to build sak SAK_BUILD=$(MKEXE_VIA_CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS) # How to invoke sak SAK=$(ROOTDIR)/runtime/sak # sak command to encode C literals ENCODE_C_LITERAL=encode-C-utf8-literal # Which tool to use to display differences between files DIFF=diff # Which flags to pass to the diff tool DIFF_FLAGS= --strip-trailing-cr -u # The rlwrap command (for the *runtop targets) RLWRAP= # The best sed which is available (GNU sed if available) SED=/bin/sed # Which document generator: odoc or ocamldoc? DOCUMENTATION_TOOL=ocamldoc DOCUMENTATION_TOOL_CMD=ocamldoc # The location of the FlexDLL sources to use (usually provided as the flexdll # Git submodule) FLEXDLL_SOURCE_DIR= BOOTSTRAPPING_FLEXDLL=false # The location of the Winpthreads sources to use (usually provided as the # winpthreads Git submodule) WINPTHREADS_SOURCE_DIR= ### Where to install documentation PACKAGE_TARNAME = ocaml datarootdir = ${prefix}/share DOCDIR=${datarootdir}/doc/${PACKAGE_TARNAME} ### Where to look for the standard library on target TARGET_LIBDIR=${exec_prefix}/lib/ocaml unix_directory = otherlibs/unix unix_library = otherlibs/unix/unix # Which make target to build, depending on whether the native compiler # has been enabled or not during the configuration stage DEFAULT_BUILD_TARGET = world # 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). # 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_LINKFLAGS = -g BUILD_TRIPLET = i686-pc-linux-gnu # Platform-dependent command to create symbolic links LN = ln -sf # Platform-dependent assembler files to use to build the runtime runtime_ASM_OBJECTS = $(addprefix runtime/,i386.o) # Platform-dependent module for ocamlyacc ocamlyacc_WSTR_MODULE = # Architecture-specific modules, if any arch_specific_SOURCES = # ThreadSanitizer support enabled TSAN=false # Contains TSan-specific runtime files, or nothing if TSan support is # disabled TSAN_NATIVE_RUNTIME_C_SOURCES =