ocaml/tools/Makefile.Mac

138 lines
3.7 KiB
Makefile
Raw Normal View History

#########################################################################
# #
# Objective Caml #
# #
# Damien Doligez, projet Para, 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. #
# #
#########################################################################
# $Id$
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 ocamldumpobj objinfo primreq keywords
# The dependency generator
CAMLDEP_IMPORTS = misc.cmo config.cmo clflags.cmo terminfo.cmo <20>
linenum.cmo warnings.cmo location.cmo longident.cmo <20>
syntaxerr.cmo parser.cmo lexer.cmo parse.cmo
CAMLDEP = depend.cmo ocamldep.cmo
ocamldep <EFBFBD> depend.cmi {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 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"
# The bytecode disassembler
DUMPOBJ = opnames.cmo dumpobj.cmo
ocamldumpobj <EFBFBD> {DUMPOBJ}
{CAMLC} {LINKFLAGS} -o ocamldumpobj <20>
misc.cmo tbl.cmo config.cmo ident.cmo opcodes.cmo <20>
bytesections.cmo {DUMPOBJ}
clean <EFBFBD><EFBFBD>
delete -i ocamldumpobj
install <EFBFBD><EFBFBD>
duplicate -y ocamldumpobj "{BINDIR}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 <20> dumpapprox.cmo
# {CAMLC} {LINKFLAGS} -o dumpapprox config.cmo dumpapprox.cmo
#
#clean <20><>
# 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} {depdir}{default}.ml
.cmi <EFBFBD> .mli
{CAMLC} -c {COMPFLAGS} {depdir}{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 <EFBFBD> primreq.cmo
{CAMLC} {LINKFLAGS} -o primreq config.cmo primreq.cmo
clean <EFBFBD><EFBFBD>
delete -i primreq
# Resources for keyword-coloring for MPW Shell
keywords <EFBFBD> keywords.r
rez -t rsrc -c RSED -o keywords keywords.r
clean <EFBFBD><EFBFBD>
delete -i keywords