#************************************************************************** #* * #* 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 GNU Lesser General Public License version 2.1, with the * #* special exception on linking described in the file LICENSE. * #* * #************************************************************************** # Targets and dependencies for compilerlibs archives # This file is meant to be included from the root Makefile, not to be # executed directly (this is why it is not simply named Makefile). # For each group of compilation units, we have a variable GROUP with # only .cmo files, and a separate variable GROUP_CMI for .cmi files # corresponding to the .mli-only modules only. These .cmi are not # linked in the archive, but they are marked as dependencies to ensure # that they are consistent with the interface digests in the archives. UTILS=utils/config.cmo utils/build_path_prefix_map.cmo utils/misc.cmo \ utils/identifiable.cmo utils/numbers.cmo utils/arg_helper.cmo \ utils/clflags.cmo utils/profile.cmo utils/local_store.cmo \ utils/load_path.cmo \ utils/terminfo.cmo utils/ccomp.cmo utils/warnings.cmo \ utils/consistbl.cmo utils/strongly_connected_components.cmo \ utils/targetint.cmo utils/int_replace_polymorphic_compare.cmo \ utils/domainstate.cmo utils/binutils.cmo UTILS_CMI= PARSING=parsing/location.cmo parsing/longident.cmo \ parsing/docstrings.cmo parsing/syntaxerr.cmo \ parsing/ast_helper.cmo \ parsing/pprintast.cmo \ parsing/camlinternalMenhirLib.cmo parsing/parser.cmo \ parsing/lexer.cmo parsing/parse.cmo parsing/printast.cmo \ parsing/ast_mapper.cmo parsing/ast_iterator.cmo parsing/attr_helper.cmo \ parsing/builtin_attributes.cmo parsing/ast_invariants.cmo parsing/depend.cmo PARSING_CMI=\ parsing/asttypes.cmi \ parsing/parsetree.cmi TYPING=typing/ident.cmo typing/path.cmo \ typing/primitive.cmo typing/type_immediacy.cmo typing/types.cmo \ typing/btype.cmo typing/oprint.cmo \ typing/subst.cmo typing/predef.cmo \ typing/datarepr.cmo file_formats/cmi_format.cmo \ typing/persistent_env.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/tast_iterator.cmo typing/tast_mapper.cmo typing/stypes.cmo \ file_formats/cmt_format.cmo typing/cmt2annot.cmo typing/untypeast.cmo \ typing/includemod.cmo typing/typetexp.cmo typing/printpat.cmo \ typing/patterns.cmo typing/parmatch.cmo \ typing/typedecl_properties.cmo typing/typedecl_variance.cmo \ typing/typedecl_unboxed.cmo typing/typedecl_immediacy.cmo \ typing/typedecl_separability.cmo \ typing/typedecl.cmo typing/typeopt.cmo \ typing/rec_check.cmo typing/typecore.cmo typing/typeclass.cmo \ typing/typemod.cmo TYPING_CMI=\ typing/annot.cmi \ typing/outcometree.cmi LAMBDA=lambda/debuginfo.cmo \ lambda/lambda.cmo lambda/printlambda.cmo \ lambda/switch.cmo lambda/matching.cmo \ lambda/translobj.cmo lambda/translattribute.cmo \ lambda/translprim.cmo lambda/translcore.cmo \ lambda/translclass.cmo lambda/translmod.cmo \ lambda/simplif.cmo lambda/runtimedef.cmo LAMBDA_CMI= COMP=\ bytecomp/meta.cmo bytecomp/opcodes.cmo \ bytecomp/bytesections.cmo bytecomp/dll.cmo \ bytecomp/symtable.cmo \ driver/pparse.cmo driver/compenv.cmo \ driver/main_args.cmo driver/compmisc.cmo \ driver/makedepend.cmo \ driver/compile_common.cmo COMP_CMI=\ file_formats/cmo_format.cmi \ file_formats/cmx_format.cmi \ file_formats/cmxs_format.cmi # All file format descriptions (including cmx{,s}) are in the # ocamlcommon library so that ocamlobjinfo can depend on them. COMMON_CMI=$(UTILS_CMI) $(PARSING_CMI) $(TYPING_CMI) $(LAMBDA_CMI) $(COMP_CMI) COMMON=$(UTILS) $(PARSING) $(TYPING) $(LAMBDA) $(COMP) BYTECOMP=bytecomp/instruct.cmo bytecomp/bytegen.cmo \ bytecomp/printinstr.cmo bytecomp/emitcode.cmo \ bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo \ driver/errors.cmo driver/compile.cmo driver/maindriver.cmo BYTECOMP_CMI= INTEL_ASM=\ asmcomp/x86_proc.cmo \ asmcomp/x86_dsl.cmo \ asmcomp/x86_gas.cmo \ asmcomp/x86_masm.cmo INTEL_ASM_CMI=\ asmcomp/x86_ast.cmi ARCH_SPECIFIC_ASMCOMP= ARCH_SPECIFIC_ASMCOMP_CMI= ifeq ($(ARCH),i386) ARCH_SPECIFIC_ASMCOMP=$(INTEL_ASM) ARCH_SPECIFIC_ASMCOMP_CMI=$(INTEL_ASM_CMI) endif ifeq ($(ARCH),amd64) ARCH_SPECIFIC_ASMCOMP=$(INTEL_ASM) ARCH_SPECIFIC_ASMCOMP_CMI=$(INTEL_ASM_CMI) endif ASMCOMP=\ $(ARCH_SPECIFIC_ASMCOMP) \ asmcomp/arch.cmo \ asmcomp/cmm.cmo asmcomp/printcmm.cmo \ asmcomp/reg.cmo asmcomp/debug/reg_with_debug_info.cmo \ asmcomp/debug/reg_availability_set.cmo \ asmcomp/mach.cmo asmcomp/proc.cmo \ asmcomp/afl_instrument.cmo \ asmcomp/strmatch.cmo \ asmcomp/cmmgen_state.cmo \ asmcomp/cmm_helpers.cmo \ asmcomp/cmmgen.cmo \ asmcomp/interval.cmo \ 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/linscan.cmo \ asmcomp/reloadgen.cmo asmcomp/reload.cmo \ asmcomp/deadcode.cmo \ asmcomp/linear.cmo asmcomp/printlinear.cmo asmcomp/linearize.cmo \ file_formats/linear_format.cmo \ asmcomp/debug/available_regs.cmo \ asmcomp/debug/compute_ranges_intf.cmo \ asmcomp/debug/compute_ranges.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 driver/optmaindriver.cmo ASMCOMP_CMI=$(ARCH_SPECIFIC_ASMCOMP_CMI) # Files under middle_end/ are not to reference files under asmcomp/. # This ensures that the middle end can be linked (e.g. for objinfo) even when # the native code compiler is not present for some particular target. MIDDLE_END_CLOSURE=\ middle_end/closure/closure.cmo \ middle_end/closure/closure_middle_end.cmo MIDDLE_END_CLOSURE_CMI= # Owing to dependencies through [Compilenv], which would be # difficult to remove, some of the lower parts of Flambda (anything that is # saved in a .cmx file) have to be included in the [MIDDLE_END] stanza, below. MIDDLE_END_FLAMBDA=\ middle_end/flambda/import_approx.cmo \ middle_end/flambda/lift_code.cmo \ middle_end/flambda/closure_conversion_aux.cmo \ middle_end/flambda/closure_conversion.cmo \ middle_end/flambda/initialize_symbol_to_let_symbol.cmo \ middle_end/flambda/lift_let_to_initialize_symbol.cmo \ middle_end/flambda/find_recursive_functions.cmo \ middle_end/flambda/invariant_params.cmo \ middle_end/flambda/inconstant_idents.cmo \ middle_end/flambda/alias_analysis.cmo \ middle_end/flambda/lift_constants.cmo \ middle_end/flambda/share_constants.cmo \ middle_end/flambda/simplify_common.cmo \ middle_end/flambda/remove_unused_arguments.cmo \ middle_end/flambda/remove_unused_closure_vars.cmo \ middle_end/flambda/remove_unused_program_constructs.cmo \ middle_end/flambda/simplify_boxed_integer_ops.cmo \ middle_end/flambda/simplify_primitives.cmo \ middle_end/flambda/inlining_stats_types.cmo \ middle_end/flambda/inlining_stats.cmo \ middle_end/flambda/inline_and_simplify_aux.cmo \ middle_end/flambda/remove_free_vars_equal_to_args.cmo \ middle_end/flambda/extract_projections.cmo \ middle_end/flambda/augment_specialised_args.cmo \ middle_end/flambda/unbox_free_vars_of_closures.cmo \ middle_end/flambda/unbox_specialised_args.cmo \ middle_end/flambda/unbox_closures.cmo \ middle_end/flambda/inlining_transforms.cmo \ middle_end/flambda/inlining_decision.cmo \ middle_end/flambda/inline_and_simplify.cmo \ middle_end/flambda/ref_to_variables.cmo \ middle_end/flambda/flambda_invariants.cmo \ middle_end/flambda/traverse_for_exported_symbols.cmo \ middle_end/flambda/build_export_info.cmo \ middle_end/flambda/closure_offsets.cmo \ middle_end/flambda/un_anf.cmo \ middle_end/flambda/flambda_to_clambda.cmo \ middle_end/flambda/flambda_middle_end.cmo MIDDLE_END_FLAMBDA_CMI=\ middle_end/flambda/inlining_decision_intf.cmi \ middle_end/flambda/simplify_boxed_integer_ops_intf.cmi MIDDLE_END=\ middle_end/internal_variable_names.cmo \ middle_end/linkage_name.cmo \ middle_end/compilation_unit.cmo \ middle_end/variable.cmo \ middle_end/flambda/base_types/closure_element.cmo \ middle_end/flambda/base_types/closure_id.cmo \ middle_end/symbol.cmo \ middle_end/backend_var.cmo \ middle_end/clambda_primitives.cmo \ middle_end/printclambda_primitives.cmo \ middle_end/clambda.cmo \ middle_end/printclambda.cmo \ middle_end/semantics_of_primitives.cmo \ middle_end/convert_primitives.cmo \ middle_end/flambda/base_types/id_types.cmo \ middle_end/flambda/base_types/export_id.cmo \ middle_end/flambda/base_types/tag.cmo \ middle_end/flambda/base_types/mutable_variable.cmo \ middle_end/flambda/base_types/set_of_closures_id.cmo \ middle_end/flambda/base_types/set_of_closures_origin.cmo \ middle_end/flambda/base_types/closure_origin.cmo \ middle_end/flambda/base_types/var_within_closure.cmo \ middle_end/flambda/base_types/static_exception.cmo \ middle_end/flambda/pass_wrapper.cmo \ middle_end/flambda/allocated_const.cmo \ middle_end/flambda/parameter.cmo \ middle_end/flambda/projection.cmo \ middle_end/flambda/flambda.cmo \ middle_end/flambda/flambda_iterators.cmo \ middle_end/flambda/flambda_utils.cmo \ middle_end/flambda/freshening.cmo \ middle_end/flambda/effect_analysis.cmo \ middle_end/flambda/inlining_cost.cmo \ middle_end/flambda/simple_value_approx.cmo \ middle_end/flambda/export_info.cmo \ middle_end/flambda/export_info_for_pack.cmo \ middle_end/compilenv.cmo \ $(MIDDLE_END_CLOSURE) \ $(MIDDLE_END_FLAMBDA) MIDDLE_END_CMI=\ middle_end/backend_intf.cmi \ $(MIDDLE_END_CLOSURE_CMI) \ $(MIDDLE_END_FLAMBDA_CMI) OPTCOMP=$(MIDDLE_END) $(ASMCOMP) OPTCOMP_CMI=$(MIDDLE_END_CMI) $(ASMCOMP_CMI) TOPLEVEL=toplevel/genprintval.cmo toplevel/toploop.cmo \ toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo TOPLEVEL_CMI= OPTTOPLEVEL=toplevel/genprintval.cmo toplevel/opttoploop.cmo \ toplevel/opttopdirs.cmo toplevel/opttopmain.cmo OPTTOPLEVEL_CMI= $(COMMON:.cmo=.cmx) $(BYTECOMP:.cmo=.cmx) $(OPTCOMP:.cmo=.cmx): ocamlopt$(EXE) $(OPTTOPLEVEL:.cmo=.cmx): ocamlopt$(EXE) compilerlibs/ocamlcommon.cma: $(COMMON_CMI) $(COMMON) $(CAMLC) -a -linkall -o $@ $(COMMON) partialclean:: rm -f compilerlibs/ocamlcommon.cma compilerlibs/ocamlcommon.cmxa: $(COMMON_CMI) $(COMMON:.cmo=.cmx) $(CAMLOPT) -a -linkall -o $@ $(COMMON:.cmo=.cmx) partialclean:: rm -f compilerlibs/ocamlcommon.cmxa \ compilerlibs/ocamlcommon.a compilerlibs/ocamlcommon.lib compilerlibs/ocamlbytecomp.cma: $(BYTECOMP_CMI) $(BYTECOMP) $(CAMLC) -a -o $@ $(BYTECOMP) partialclean:: rm -f compilerlibs/ocamlbytecomp.cma compilerlibs/ocamlbytecomp.cmxa: $(BYTECOMP_CMI) $(BYTECOMP:.cmo=.cmx) $(CAMLOPT) -a $(OCAML_NATDYNLINKOPTS) -o $@ $(BYTECOMP:.cmo=.cmx) partialclean:: rm -f compilerlibs/ocamlbytecomp.cmxa \ compilerlibs/ocamlbytecomp.a compilerlibs/ocamlbytecomp.lib compilerlibs/ocamlmiddleend.cma: $(MIDDLE_END_CMI) $(MIDDLE_END) $(CAMLC) -a -o $@ $(MIDDLE_END) compilerlibs/ocamlmiddleend.cmxa: $(MIDDLE_END_CMI) $(MIDDLE_END:%.cmo=%.cmx) $(CAMLOPT) -a -o $@ $(MIDDLE_END:%.cmo=%.cmx) partialclean:: rm -f compilerlibs/ocamlmiddleend.cma \ compilerlibs/ocamlmiddleend.cmxa \ compilerlibs/ocamlmiddleend.a \ compilerlibs/ocamlmiddleend.lib compilerlibs/ocamloptcomp.cma: $(OPTCOMP_CMI) $(OPTCOMP) $(CAMLC) -a -o $@ $(OPTCOMP) partialclean:: rm -f compilerlibs/ocamloptcomp.cma compilerlibs/ocamloptcomp.cmxa: $(OPTCOMP_CMI) $(OPTCOMP:.cmo=.cmx) $(CAMLOPT) -a -o $@ $(OPTCOMP:.cmo=.cmx) partialclean:: rm -f compilerlibs/ocamloptcomp.cmxa \ compilerlibs/ocamloptcomp.a compilerlibs/ocamloptcomp.lib compilerlibs/ocamltoplevel.cma: $(TOPLEVEL_CMI) $(TOPLEVEL) $(CAMLC) -a -o $@ $(TOPLEVEL) partialclean:: rm -f compilerlibs/ocamltoplevel.cma compilerlibs/ocamlopttoplevel.cmxa: $(OPTTOPLEVEL_CMI) $(OPTTOPLEVEL:.cmo=.cmx) $(CAMLOPT) -a -o $@ $(OPTTOPLEVEL:.cmo=.cmx) partialclean:: rm -f compilerlibs/ocamlopttoplevel.cmxa \ compilerlibs/ocamlopttoplevel.a compilerlibs/ocamlopttoplevel.lib