1996-02-13 08:29:09 -08:00
|
|
|
include ../config/Makefile
|
1995-10-24 08:46:19 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLRUN=../boot/ocamlrun
|
|
|
|
CAMLC=$(CAMLRUN) ../boot/ocamlc -I ../boot
|
|
|
|
CAMLLEX=$(CAMLRUN) ../boot/ocamllex
|
1995-07-02 09:47:48 -07:00
|
|
|
INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp
|
1995-05-04 03:15:53 -07:00
|
|
|
COMPFLAGS=$(INCLUDES)
|
|
|
|
LINKFLAGS=$(INCLUDES)
|
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
all: ocamldep ocamlprof
|
1995-10-24 08:46:19 -07:00
|
|
|
|
|
|
|
# The dependency generator
|
1995-08-25 06:54:58 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLDEP=ocamldep.cmo
|
1995-08-25 06:54:58 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamldep: $(CAMLDEP)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o ocamldep misc.cmo $(CAMLDEP)
|
1995-08-25 06:54:58 -07:00
|
|
|
|
|
|
|
clean::
|
1996-04-30 07:53:58 -07:00
|
|
|
rm -f ocamldep
|
1995-08-25 06:54:58 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamldep.ml: ocamldep.mll
|
|
|
|
$(CAMLLEX) ocamldep.mll
|
1995-08-25 06:54:58 -07:00
|
|
|
|
|
|
|
clean::
|
1996-04-30 07:53:58 -07:00
|
|
|
rm -f ocamldep.ml
|
1995-08-25 06:54:58 -07:00
|
|
|
|
1995-10-24 08:46:19 -07:00
|
|
|
install::
|
1996-04-30 07:53:58 -07:00
|
|
|
cp ocamldep $(BINDIR)/ocamldep
|
1995-10-24 08:46:19 -07:00
|
|
|
|
1996-10-07 06:20:28 -07:00
|
|
|
beforedepend:: ocamldep.ml
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-10-24 08:46:19 -07:00
|
|
|
# The profiler
|
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
CSLPROF=ocamlprof.cmo
|
1995-10-24 08:46:19 -07:00
|
|
|
CSLPROF_IMPORTS=misc.cmo config.cmo clflags.cmo terminfo.cmo \
|
1995-11-09 03:08:48 -08:00
|
|
|
location.cmo longident.cmo pstream.cmo parser.cmo lexer.cmo parse.cmo
|
1995-10-24 08:46:19 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamlprof: $(CSLPROF) profiling.cmo
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o ocamlprof $(CSLPROF_IMPORTS) $(CSLPROF)
|
1995-10-24 08:46:19 -07:00
|
|
|
|
|
|
|
install::
|
1996-04-30 07:53:58 -07:00
|
|
|
cp ocamlprof $(BINDIR)/ocamlprof
|
|
|
|
cp ocamlcp $(BINDIR)/ocamlcp
|
1995-11-13 06:25:17 -08:00
|
|
|
cp profiling.cmi profiling.cmo $(LIBDIR)
|
1995-10-24 08:46:19 -07:00
|
|
|
|
|
|
|
clean::
|
1996-04-30 07:53:58 -07:00
|
|
|
rm -f ocamlprof
|
1995-10-24 08:46:19 -07:00
|
|
|
|
|
|
|
# To make custom toplevels
|
|
|
|
|
|
|
|
install::
|
1996-04-30 07:53:58 -07:00
|
|
|
cp ocamlmktop $(BINDIR)/ocamlmktop
|
1995-10-24 08:46:19 -07:00
|
|
|
|
1996-10-07 06:20:28 -07:00
|
|
|
# The preprocessor for asm generators
|
|
|
|
|
|
|
|
CVT_EMIT=cvt_emit.cmo
|
|
|
|
|
|
|
|
cvt_emit: $(CVT_EMIT)
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o cvt_emit $(CVT_EMIT)
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f cvt_emit
|
|
|
|
|
|
|
|
cvt_emit.ml: cvt_emit.mll
|
|
|
|
$(CAMLLEX) cvt_emit.mll
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f cvt_emit.ml
|
|
|
|
|
|
|
|
beforedepend:: cvt_emit.ml
|
|
|
|
|
1995-10-24 08:46:19 -07:00
|
|
|
# The bytecode disassembler
|
|
|
|
|
1995-05-22 08:43:44 -07:00
|
|
|
DUMPOBJ=opnames.cmo dumpobj.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
dumpobj: $(DUMPOBJ)
|
1995-05-22 08:43:44 -07:00
|
|
|
$(CAMLC) $(LINKFLAGS) -o dumpobj misc.cmo tbl.cmo config.cmo ident.cmo opcodes.cmo runtimedef.cmo $(DUMPOBJ)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f dumpobj
|
|
|
|
|
|
|
|
opnames.ml: ../byterun/instruct.h
|
|
|
|
sed -e '/\/\*/d' \
|
|
|
|
-e 's/enum \(.*\) {/let names_of_\1 = [|/' \
|
|
|
|
-e 's/};$$/ |]/' \
|
|
|
|
-e 's/\([A-Z][A-Z_0-9a-z]*\)/"\1"/g' \
|
|
|
|
-e 's/,/;/g' \
|
|
|
|
../byterun/instruct.h > opnames.ml
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f opnames.ml
|
|
|
|
|
|
|
|
beforedepend:: opnames.ml
|
|
|
|
|
1995-10-24 08:46:19 -07:00
|
|
|
# Dump .cmx files
|
|
|
|
|
1995-07-02 09:47:48 -07:00
|
|
|
dumpapprox: dumpapprox.cmo
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o dumpapprox config.cmo dumpapprox.cmo
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f dumpapprox
|
|
|
|
|
1995-10-24 08:46:19 -07:00
|
|
|
# Print imported interfaces for .cmo files
|
|
|
|
|
1995-10-09 06:37:11 -07:00
|
|
|
objinfo: objinfo.cmo
|
|
|
|
$(CAMLC) $(LINKFLAGS) -o objinfo config.cmo objinfo.cmo
|
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f objinfo
|
|
|
|
|
1995-10-24 08:46:19 -07:00
|
|
|
# Common stuff
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
.SUFFIXES:
|
1995-05-22 08:43:44 -07:00
|
|
|
.SUFFIXES: .ml .cmo .mli .cmi
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-05-22 08:43:44 -07:00
|
|
|
.ml.cmo:
|
1995-05-04 03:15:53 -07:00
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
1995-05-22 08:43:44 -07:00
|
|
|
.mli.cmi:
|
1995-05-04 03:15:53 -07:00
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
clean::
|
1995-05-22 08:43:44 -07:00
|
|
|
rm -f *.cmo *.cmi
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
depend: beforedepend
|
1996-04-30 07:53:58 -07:00
|
|
|
$(CAMLRUN) ./ocamldep $(INCLUDES) *.mli *.ml > .depend
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
include .depend
|