2015-12-02 05:51:59 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
|
|
|
# OCaml #
|
|
|
|
# #
|
|
|
|
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
# under the terms of the Q Public License version 1.0. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# The main Makefile, fragments shared between Makefile and Makefile.nt
|
|
|
|
|
|
|
|
include config/Makefile
|
|
|
|
CAMLRUN ?= boot/ocamlrun
|
|
|
|
CAMLYACC ?= boot/ocamlyacc
|
|
|
|
include stdlib/StdlibModules
|
|
|
|
|
|
|
|
CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot
|
|
|
|
CAMLOPT=$(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
|
2016-01-14 06:29:41 -08:00
|
|
|
COMPFLAGS=-strict-sequence -principal -w +33..39+48+50 -warn-error A -bin-annot \
|
2016-01-15 07:52:23 -08:00
|
|
|
-safe-string -strict-formats $(INCLUDES)
|
2015-12-02 05:51:59 -08:00
|
|
|
LINKFLAGS=
|
|
|
|
|
|
|
|
YACCFLAGS=-v
|
|
|
|
CAMLLEX=$(CAMLRUN) boot/ocamllex
|
|
|
|
CAMLDEP=$(CAMLRUN) tools/ocamldep
|
|
|
|
DEPFLAGS=$(INCLUDES)
|
|
|
|
|
|
|
|
OCAMLBUILDBYTE=$(WITH_OCAMLBUILD:=.byte)
|
|
|
|
OCAMLBUILDNATIVE=$(WITH_OCAMLBUILD:=.native)
|
|
|
|
|
|
|
|
OCAMLDOC_OPT=$(WITH_OCAMLDOC:=.opt)
|
|
|
|
|
2016-01-21 15:30:27 -08:00
|
|
|
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I middle_end \
|
|
|
|
-I middle_end/base_types -I asmcomp -I driver -I toplevel
|
2015-12-02 05:51:59 -08:00
|
|
|
|
2016-01-14 03:27:30 -08:00
|
|
|
UTILS=utils/config.cmo utils/misc.cmo \
|
|
|
|
utils/identifiable.cmo utils/numbers.cmo utils/arg_helper.cmo \
|
|
|
|
utils/clflags.cmo utils/tbl.cmo utils/timings.cmo \
|
2015-12-02 05:51:59 -08:00
|
|
|
utils/terminfo.cmo utils/ccomp.cmo utils/warnings.cmo \
|
2016-01-12 09:01:45 -08:00
|
|
|
utils/consistbl.cmo \
|
|
|
|
utils/strongly_connected_components.cmo
|
2015-12-02 05:51:59 -08:00
|
|
|
|
|
|
|
PARSING=parsing/location.cmo parsing/longident.cmo \
|
|
|
|
parsing/docstrings.cmo parsing/ast_helper.cmo \
|
|
|
|
parsing/syntaxerr.cmo parsing/parser.cmo \
|
|
|
|
parsing/lexer.cmo parsing/parse.cmo parsing/printast.cmo \
|
|
|
|
parsing/pprintast.cmo \
|
|
|
|
parsing/ast_mapper.cmo parsing/attr_helper.cmo \
|
|
|
|
parsing/builtin_attributes.cmo
|
|
|
|
|
|
|
|
TYPING=typing/ident.cmo typing/path.cmo \
|
|
|
|
typing/primitive.cmo typing/types.cmo \
|
|
|
|
typing/btype.cmo typing/oprint.cmo \
|
|
|
|
typing/subst.cmo typing/predef.cmo \
|
|
|
|
typing/datarepr.cmo typing/cmi_format.cmo typing/env.cmo \
|
|
|
|
typing/typedtree.cmo typing/printtyped.cmo typing/ctype.cmo \
|
|
|
|
typing/printtyp.cmo typing/includeclass.cmo \
|
|
|
|
typing/mtype.cmo typing/envaux.cmo typing/includecore.cmo \
|
|
|
|
typing/typedtreeIter.cmo typing/typedtreeMap.cmo \
|
|
|
|
typing/tast_mapper.cmo \
|
2015-04-18 20:07:32 -07:00
|
|
|
typing/cmt_format.cmo typing/untypeast.cmo \
|
2015-12-02 05:51:59 -08:00
|
|
|
typing/includemod.cmo typing/typetexp.cmo typing/parmatch.cmo \
|
|
|
|
typing/stypes.cmo typing/typecore.cmo \
|
|
|
|
typing/typedecl.cmo typing/typeclass.cmo \
|
2015-04-18 20:07:32 -07:00
|
|
|
typing/typemod.cmo
|
2015-12-02 05:51:59 -08:00
|
|
|
|
|
|
|
COMP=bytecomp/lambda.cmo bytecomp/printlambda.cmo \
|
|
|
|
bytecomp/typeopt.cmo bytecomp/switch.cmo bytecomp/matching.cmo \
|
|
|
|
bytecomp/translobj.cmo bytecomp/translattribute.cmo \
|
|
|
|
bytecomp/translcore.cmo \
|
|
|
|
bytecomp/translclass.cmo bytecomp/translmod.cmo \
|
|
|
|
bytecomp/simplif.cmo bytecomp/runtimedef.cmo \
|
2015-12-18 08:26:30 -08:00
|
|
|
bytecomp/debuginfo.cmo \
|
2015-12-02 05:51:59 -08:00
|
|
|
driver/pparse.cmo driver/main_args.cmo \
|
|
|
|
driver/compenv.cmo driver/compmisc.cmo
|
|
|
|
|
|
|
|
COMMON=$(UTILS) $(PARSING) $(TYPING) $(COMP)
|
|
|
|
|
|
|
|
BYTECOMP=bytecomp/meta.cmo bytecomp/instruct.cmo bytecomp/bytegen.cmo \
|
|
|
|
bytecomp/printinstr.cmo bytecomp/opcodes.cmo bytecomp/emitcode.cmo \
|
|
|
|
bytecomp/bytesections.cmo bytecomp/dll.cmo bytecomp/symtable.cmo \
|
|
|
|
bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo \
|
|
|
|
driver/errors.cmo driver/compile.cmo
|
|
|
|
|
|
|
|
INTEL_ASM=\
|
|
|
|
asmcomp/x86_proc.cmo \
|
|
|
|
asmcomp/x86_dsl.cmo \
|
|
|
|
asmcomp/x86_gas.cmo \
|
|
|
|
asmcomp/x86_masm.cmo
|
|
|
|
|
|
|
|
ARCH_SPECIFIC_ASMCOMP=
|
|
|
|
ifeq ($(ARCH),i386)
|
|
|
|
ARCH_SPECIFIC_ASMCOMP=$(INTEL_ASM)
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCH),amd64)
|
|
|
|
ARCH_SPECIFIC_ASMCOMP=$(INTEL_ASM)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ASMCOMP=\
|
|
|
|
$(ARCH_SPECIFIC_ASMCOMP) \
|
2015-12-18 08:26:30 -08:00
|
|
|
asmcomp/arch.cmo \
|
2015-12-02 05:51:59 -08:00
|
|
|
asmcomp/cmm.cmo asmcomp/printcmm.cmo \
|
|
|
|
asmcomp/reg.cmo asmcomp/mach.cmo asmcomp/proc.cmo \
|
2016-01-21 15:30:27 -08:00
|
|
|
asmcomp/clambda.cmo asmcomp/printclambda.cmo \
|
|
|
|
asmcomp/export_info.cmo \
|
|
|
|
asmcomp/export_info_for_pack.cmo \
|
|
|
|
asmcomp/compilenv.cmo \
|
|
|
|
asmcomp/closure.cmo \
|
|
|
|
asmcomp/build_export_info.cmo \
|
|
|
|
asmcomp/closure_offsets.cmo \
|
|
|
|
asmcomp/flambda_to_clambda.cmo \
|
|
|
|
asmcomp/import_approx.cmo \
|
|
|
|
asmcomp/un_anf.cmo \
|
|
|
|
asmcomp/strmatch.cmo asmcomp/cmmgen.cmo \
|
2015-12-02 05:51:59 -08:00
|
|
|
asmcomp/printmach.cmo asmcomp/selectgen.cmo asmcomp/selection.cmo \
|
|
|
|
asmcomp/comballoc.cmo \
|
|
|
|
asmcomp/CSEgen.cmo asmcomp/CSE.cmo \
|
|
|
|
asmcomp/liveness.cmo \
|
|
|
|
asmcomp/spill.cmo asmcomp/split.cmo \
|
|
|
|
asmcomp/interf.cmo asmcomp/coloring.cmo \
|
|
|
|
asmcomp/reloadgen.cmo asmcomp/reload.cmo \
|
|
|
|
asmcomp/deadcode.cmo \
|
|
|
|
asmcomp/printlinear.cmo asmcomp/linearize.cmo \
|
|
|
|
asmcomp/schedgen.cmo asmcomp/scheduling.cmo \
|
|
|
|
asmcomp/branch_relaxation_intf.cmo \
|
|
|
|
asmcomp/branch_relaxation.cmo \
|
|
|
|
asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \
|
|
|
|
asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo \
|
|
|
|
driver/opterrors.cmo driver/optcompile.cmo
|
|
|
|
|
2016-01-21 15:30:27 -08:00
|
|
|
MIDDLE_END=\
|
|
|
|
middle_end/base_types/tag.cmo \
|
|
|
|
middle_end/base_types/linkage_name.cmo \
|
|
|
|
middle_end/base_types/compilation_unit.cmo \
|
|
|
|
middle_end/base_types/variable.cmo \
|
|
|
|
middle_end/base_types/mutable_variable.cmo \
|
|
|
|
middle_end/base_types/id_types.cmo \
|
|
|
|
middle_end/base_types/set_of_closures_id.cmo \
|
|
|
|
middle_end/base_types/closure_element.cmo \
|
|
|
|
middle_end/base_types/closure_id.cmo \
|
|
|
|
middle_end/base_types/var_within_closure.cmo \
|
|
|
|
middle_end/base_types/static_exception.cmo \
|
|
|
|
middle_end/base_types/export_id.cmo \
|
|
|
|
middle_end/base_types/symbol.cmo \
|
|
|
|
middle_end/semantics_of_primitives.cmo \
|
|
|
|
middle_end/allocated_const.cmo \
|
|
|
|
middle_end/flambda.cmo \
|
|
|
|
middle_end/flambda_iterators.cmo \
|
|
|
|
middle_end/flambda_utils.cmo \
|
|
|
|
middle_end/inlining_cost.cmo \
|
|
|
|
middle_end/effect_analysis.cmo \
|
|
|
|
middle_end/freshening.cmo \
|
|
|
|
middle_end/simple_value_approx.cmo \
|
|
|
|
middle_end/lift_code.cmo \
|
|
|
|
middle_end/closure_conversion_aux.cmo \
|
|
|
|
middle_end/closure_conversion.cmo \
|
|
|
|
middle_end/initialize_symbol_to_let_symbol.cmo \
|
|
|
|
middle_end/lift_let_to_initialize_symbol.cmo \
|
|
|
|
middle_end/find_recursive_functions.cmo \
|
|
|
|
middle_end/invariant_params.cmo \
|
|
|
|
middle_end/inconstant_idents.cmo \
|
|
|
|
middle_end/alias_analysis.cmo \
|
|
|
|
middle_end/lift_constants.cmo \
|
|
|
|
middle_end/share_constants.cmo \
|
|
|
|
middle_end/simplify_common.cmo \
|
|
|
|
middle_end/remove_unused_arguments.cmo \
|
|
|
|
middle_end/remove_unused_closure_vars.cmo \
|
|
|
|
middle_end/remove_unused_program_constructs.cmo \
|
|
|
|
middle_end/simplify_boxed_integer_ops.cmo \
|
|
|
|
middle_end/simplify_primitives.cmo \
|
|
|
|
middle_end/inlining_stats_types.cmo \
|
|
|
|
middle_end/inlining_stats.cmo \
|
|
|
|
middle_end/inline_and_simplify_aux.cmo \
|
|
|
|
middle_end/augment_closures.cmo \
|
|
|
|
middle_end/unbox_closures.cmo \
|
|
|
|
middle_end/inlining_transforms.cmo \
|
|
|
|
middle_end/inlining_decision.cmo \
|
|
|
|
middle_end/inline_and_simplify.cmo \
|
|
|
|
middle_end/ref_to_variables.cmo \
|
|
|
|
middle_end/flambda_invariants.cmo \
|
|
|
|
middle_end/middle_end.cmo
|
|
|
|
|
2015-12-02 05:51:59 -08:00
|
|
|
TOPLEVEL=toplevel/genprintval.cmo toplevel/toploop.cmo \
|
|
|
|
toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo
|
|
|
|
|
2015-03-25 08:42:12 -07:00
|
|
|
OPTTOPLEVEL=toplevel/genprintval.cmo toplevel/opttoploop.cmo \
|
|
|
|
toplevel/opttopdirs.cmo toplevel/opttopmain.cmo
|
2015-12-02 05:51:59 -08:00
|
|
|
BYTESTART=driver/main.cmo
|
|
|
|
|
|
|
|
OPTSTART=driver/optmain.cmo
|
|
|
|
|
|
|
|
TOPLEVELSTART=toplevel/topstart.cmo
|
|
|
|
|
2015-03-25 08:42:12 -07:00
|
|
|
OPTTOPLEVELSTART=toplevel/opttopstart.cmo
|
2015-12-02 05:51:59 -08:00
|
|
|
|
|
|
|
PERVASIVES=$(STDLIB_MODULES) outcometree topdirs toploop
|