ocaml/tools/Makefile.Mac

107 lines
2.4 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 = ocamldep.cmo
ocamldep <EFBFBD> {CAMLDEP}
{CAMLC} {LINKFLAGS} -o ocamldep misc.cmo {CAMLDEP}
clean <EFBFBD><EFBFBD>
delete -i ocamldep
ocamldep.ml <EFBFBD> ocamldep.mll
{CAMLLEX} ocamldep.mll
clean <EFBFBD><EFBFBD>
delete -i ocamldep.ml
install <EFBFBD><EFBFBD>
duplicate -y ocamldep "{BINDIR}ocamldep"
beforedepend <EFBFBD><EFBFBD> ocamldep
# The profiler (not available on the Mac for the moment)
#
#CSLPROF = ocamlprof.cmo
#CSLPROF_IMPORTS = misc.cmo config.cmo clflags.cmo terminfo.cmo <20>
# location.cmo longident.cmo pstream.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 "{BINDIR}ocamlmktop"
duplicate -y ocamlc-custom "{BINDIR}ocamlc-custom"
# The bytecode disassembler
DUMPOBJ = opnames.cmo dumpobj.cmo
DumpCamlObj <EFBFBD> {DUMPOBJ}
{CAMLC} {LINKFLAGS} -o DumpCamlObj misc.cmo tbl.cmo config.cmo ident.cmo <20>
opcodes.cmo runtimedef.cmo {DUMPOBJ}
clean <EFBFBD><EFBFBD>
delete -i DumpCamlObj
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