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)
|
|
|
|
|
|
|
|
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver \
|
|
|
|
-I toplevel
|
|
|
|
|
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 \
|
|
|
|
asmcomp/clambda.cmo asmcomp/printclambda.cmo asmcomp/compilenv.cmo \
|
|
|
|
asmcomp/closure.cmo asmcomp/strmatch.cmo asmcomp/cmmgen.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/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
|
|
|
|
|
|
|
|
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
|