1996-11-02 10:05:24 -08:00
|
|
|
|
CAMLRUN = ::boot:ocamlrun
|
|
|
|
|
CAMLC = {CAMLRUN} ::boot:ocamlc -I ::boot:
|
|
|
|
|
CAMLLEX = {CAMLRUN} ::boot:ocamllex
|
|
|
|
|
INCLUDES = -I ::utils: -I ::parsing: -I ::typing: -I ::bytecomp: -I ::asmcomp:
|
|
|
|
|
COMPFLAGS = {INCLUDES}
|
|
|
|
|
LINKFLAGS = {INCLUDES}
|
|
|
|
|
|
1999-11-17 07:06:24 -08:00
|
|
|
|
all <EFBFBD> ocamldep ocamldumpobj
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# The dependency generator
|
|
|
|
|
|
1999-11-08 09:06:33 -08:00
|
|
|
|
CAMLDEP_IMPORTS = misc.cmo formatmsg.cmo config.cmo clflags.cmo terminfo.cmo <20>
|
1999-02-13 15:28:06 -08:00
|
|
|
|
linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo <20>
|
|
|
|
|
syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
|
|
|
|
|
|
1996-11-02 10:05:24 -08:00
|
|
|
|
CAMLDEP = ocamldep.cmo
|
|
|
|
|
|
|
|
|
|
ocamldep <EFBFBD> {CAMLDEP}
|
1999-02-13 15:28:06 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o ocamldep {CAMLDEP_IMPORTS} {CAMLDEP}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i ocamldep
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
install <EFBFBD><EFBFBD>
|
1999-11-17 07:06:24 -08:00
|
|
|
|
duplicate -y OCamlDep "{BINDIR}OCamlDep"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
1999-11-08 11:03:57 -08:00
|
|
|
|
# The profiler (not available on MacOS for the moment)
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#CSLPROF = ocamlprof.cmo
|
1999-11-08 09:06:33 -08:00
|
|
|
|
#CSLPROF_IMPORTS = misc.cmo formatmsg.cmo config.cmo clflags.cmo terminfo.cmo <20>
|
1999-02-13 15:28:06 -08:00
|
|
|
|
# linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo <20>
|
1997-08-22 01:55:41 -07:00
|
|
|
|
# syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#ocamlprof <20> {CSLPROF} profiling.cmo
|
1997-05-19 08:42:21 -07:00
|
|
|
|
# {CAMLC} {LINKFLAGS} -o ocamlprof {CSLPROF_IMPORTS} {CSLPROF}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#install <20><>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
# duplicate -y ocamlprof "{BINDIR}ocamlprof"
|
|
|
|
|
# duplicate -y ocamlcp "{BINDIR}ocamlcp"
|
|
|
|
|
# duplicate -y profiling.cmi profiling.cmo "{LIBDIR}"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
#
|
|
|
|
|
#clean <20><>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
# delete -i ocamlprof
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# To make custom toplevels
|
|
|
|
|
|
|
|
|
|
install <EFBFBD><EFBFBD>
|
1998-11-06 07:10:29 -08:00
|
|
|
|
duplicate -y ocamlmktop.tpl "{BINDIR}ocamlmktop"
|
1996-11-06 08:55:35 -08:00
|
|
|
|
duplicate -y ocamlc-custom "{BINDIR}ocamlc-custom"
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# The bytecode disassembler
|
|
|
|
|
|
|
|
|
|
DUMPOBJ = opnames.cmo dumpobj.cmo
|
|
|
|
|
|
1999-11-17 07:06:24 -08:00
|
|
|
|
ocamldumpobj <EFBFBD> {DUMPOBJ}
|
|
|
|
|
{CAMLC} {LINKFLAGS} -o ocamldumpobj <20>
|
1999-11-15 08:51:05 -08:00
|
|
|
|
misc.cmo formatmsg.cmo tbl.cmo config.cmo ident.cmo opcodes.cmo <20>
|
|
|
|
|
{DUMPOBJ}
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1999-11-08 11:03:57 -08:00
|
|
|
|
delete -i OCamlDumpObj
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
opnames.ml <20> ::byterun:instruct.h
|
1996-11-06 08:55:35 -08:00
|
|
|
|
streamedit -e '/<2F>/<2F>*/ delete' <20>
|
1997-05-19 08:42:21 -07:00
|
|
|
|
-e '/enum (<28>)<29>0 {/ replace // "let names_of_" <20>0 "= [|"' <20>
|
|
|
|
|
-e '/};<3B>/ replace // "|]"' <20>
|
|
|
|
|
-e '/<2F>([A-Z][A-Z_0-9a-z]*)<29>0/ replace // "<22>"" <20>0 "<22>"" -c <20>' <20>
|
|
|
|
|
-e '/,/ replace // ";" -c <20>' <20>
|
|
|
|
|
::byterun:instruct.h > opnames.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i opnames.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
beforedepend <EFBFBD><EFBFBD> opnames.ml
|
|
|
|
|
|
|
|
|
|
# Dump .cmx files
|
|
|
|
|
|
|
|
|
|
dumpapprox <EFBFBD> dumpapprox.cmo
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o dumpapprox config.cmo dumpapprox.cmo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i dumpapprox
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# Print imported interfaces for .cmo files
|
|
|
|
|
|
|
|
|
|
objinfo <EFBFBD> objinfo.cmo
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} {LINKFLAGS} -o objinfo config.cmo objinfo.cmo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i objinfo
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
# Common stuff
|
|
|
|
|
|
|
|
|
|
.cmo <EFBFBD> .ml
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} -c {COMPFLAGS} {default}.ml
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
.cmi <EFBFBD> .mli
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLC} -c {COMPFLAGS} {default}.mli
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
1996-11-06 08:55:35 -08:00
|
|
|
|
delete -i <20>.cm[io] || set status 0
|
1996-11-02 10:05:24 -08:00
|
|
|
|
|
|
|
|
|
depend <EFBFBD> beforedepend
|
1996-11-06 08:55:35 -08:00
|
|
|
|
{CAMLRUN} :ocamldep {INCLUDES} <20>.mli <20>.ml > Makefile.Mac.depend
|
1999-11-08 11:03:57 -08:00
|
|
|
|
|
|
|
|
|
# Scan object files for required primitives
|
|
|
|
|
|
|
|
|
|
PRIMREQ=primreq.cmo
|
|
|
|
|
|
|
|
|
|
primreq <EFBFBD> {PRIMREQ}
|
|
|
|
|
{CAMLC} {LINKFLAGS} -o primreq config.cmo {PRIMREQ}
|
|
|
|
|
|
|
|
|
|
clean <EFBFBD><EFBFBD>
|
|
|
|
|
delete -i primreq
|