ocaml/tools/Makefile.Mac

115 lines
2.7 KiB
Makefile
Raw Normal View History

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}
all <EFBFBD> ocamldep
# The dependency generator
CAMLDEP_IMPORTS = misc.cmo formatmsg.cmo config.cmo clflags.cmo terminfo.cmo <20>
linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo <20>
syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
CAMLDEP = ocamldep.cmo
ocamldep <EFBFBD> {CAMLDEP}
{CAMLC} {LINKFLAGS} -o ocamldep {CAMLDEP_IMPORTS} {CAMLDEP}
clean <EFBFBD><EFBFBD>
delete -i ocamldep
install <EFBFBD><EFBFBD>
duplicate -y ocamldep "{BINDIR}ocamldep"
# The profiler (not available on MacOS for the moment)
#
#CSLPROF = ocamlprof.cmo
#CSLPROF_IMPORTS = misc.cmo formatmsg.cmo config.cmo clflags.cmo terminfo.cmo <20>
# linenum.cmo warnings.cmo location.cmo longident.cmo pstream.cmo <20>
# syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
#
#ocamlprof <20> {CSLPROF} profiling.cmo
# {CAMLC} {LINKFLAGS} -o ocamlprof {CSLPROF_IMPORTS} {CSLPROF}
#
#install <20><>
# duplicate -y ocamlprof "{BINDIR}ocamlprof"
# duplicate -y ocamlcp "{BINDIR}ocamlcp"
# duplicate -y profiling.cmi profiling.cmo "{LIBDIR}"
#
#clean <20><>
# delete -i ocamlprof
# To make custom toplevels
install <EFBFBD><EFBFBD>
duplicate -y ocamlmktop.tpl "{BINDIR}ocamlmktop"
duplicate -y ocamlc-custom "{BINDIR}ocamlc-custom"
# The bytecode disassembler
DUMPOBJ = opnames.cmo dumpobj.cmo
OCamlDumpObj <EFBFBD> {DUMPOBJ}
{CAMLC} {LINKFLAGS} -o OCamlDumpObj <20>
misc.cmo formatmsg.cmo tbl.cmo config.cmo ident.cmo opcodes.cmo <20>
{DUMPOBJ}
clean <EFBFBD><EFBFBD>
delete -i OCamlDumpObj
opnames.ml <20> ::byterun:instruct.h
streamedit -e '/<2F>/<2F>*/ delete' <20>
-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
clean <EFBFBD><EFBFBD>
delete -i opnames.ml
beforedepend <EFBFBD><EFBFBD> opnames.ml
# Dump .cmx files
dumpapprox <EFBFBD> dumpapprox.cmo
{CAMLC} {LINKFLAGS} -o dumpapprox config.cmo dumpapprox.cmo
clean <EFBFBD><EFBFBD>
delete -i dumpapprox
# Print imported interfaces for .cmo files
objinfo <EFBFBD> objinfo.cmo
{CAMLC} {LINKFLAGS} -o objinfo config.cmo objinfo.cmo
clean <EFBFBD><EFBFBD>
delete -i objinfo
# Common stuff
.cmo <EFBFBD> .ml
{CAMLC} -c {COMPFLAGS} {default}.ml
.cmi <EFBFBD> .mli
{CAMLC} -c {COMPFLAGS} {default}.mli
clean <EFBFBD><EFBFBD>
delete -i <20>.cm[io] || set status 0
depend <EFBFBD> beforedepend
{CAMLRUN} :ocamldep {INCLUDES} <20>.mli <20>.ml > Makefile.Mac.depend
# 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