diff options
Diffstat (limited to 'ocaml-binary-annot/stdlib/Makefile.shared')
| -rwxr-xr-x | ocaml-binary-annot/stdlib/Makefile.shared | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/ocaml-binary-annot/stdlib/Makefile.shared b/ocaml-binary-annot/stdlib/Makefile.shared new file mode 100755 index 0000000000..64087dc9c3 --- /dev/null +++ b/ocaml-binary-annot/stdlib/Makefile.shared @@ -0,0 +1,97 @@ +######################################################################### +# # +# Objective Caml # +# # +# Xavier Leroy, projet Cristal, 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 GNU Library General Public License, with # +# the special exception on linking described in file ../LICENSE. # +# # +######################################################################### + +# $Id$ + +include ../config/Makefile +RUNTIME=../boot/ocamlrun +COMPILER=../ocamlc +CAMLC=$(RUNTIME) $(COMPILER) +COMPFLAGS=-strict-sequence -g -warn-error A -nostdlib +OPTCOMPILER=../ocamlopt +CAMLOPT=$(RUNTIME) $(OPTCOMPILER) +OPTCOMPFLAGS=-warn-error A -nostdlib -g +CAMLDEP=../boot/ocamlrun ../tools/ocamldep + +OBJS=pervasives.cmo $(OTHERS) +OTHERS=array.cmo list.cmo char.cmo string.cmo sys.cmo \ + hashtbl.cmo sort.cmo marshal.cmo obj.cmo \ + int32.cmo int64.cmo nativeint.cmo \ + lexing.cmo parsing.cmo \ + set.cmo map.cmo stack.cmo queue.cmo \ + camlinternalLazy.cmo lazy.cmo stream.cmo \ + buffer.cmo printf.cmo format.cmo scanf.cmo \ + arg.cmo printexc.cmo gc.cmo \ + digest.cmo random.cmo callback.cmo \ + camlinternalOO.cmo oo.cmo camlinternalMod.cmo \ + genlex.cmo weak.cmo \ + filename.cmo complex.cmo \ + arrayLabels.cmo listLabels.cmo stringLabels.cmo moreLabels.cmo stdLabels.cmo + +all: stdlib.cma std_exit.cmo camlheader camlheader_ur + +install: + cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR) + +stdlib.cma: $(OBJS) + $(CAMLC) -a -o stdlib.cma $(OBJS) + +stdlib.cmxa: $(OBJS:.cmo=.cmx) + $(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx) + +sys.ml: sys.mlp ../VERSION + sed -e "s|%%VERSION%%|`sed -e 1q ../VERSION`|" sys.mlp >sys.ml + +clean:: + rm -f sys.ml + +clean:: + rm -f camlheader camlheader_ur + +.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx + +.mli.cmi: + $(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $< + +.ml.cmo: + $(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $< + +.ml.cmx: + $(CAMLOPT) $(OPTCOMPFLAGS) `./Compflags $@` -c $< + +.ml.p.cmx: + $(CAMLOPT) $(OPTCOMPFLAGS) `./Compflags $@` -p -c -o $*.p.cmx $< + +# Dependencies on the compiler +$(OBJS) std_exit.cmo: $(COMPILER) +$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER) +$(OBJS:.cmo=.cmx) std_exit.cmx: $(OPTCOMPILER) +$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: $(OPTCOMPILER) + +# Dependencies on Pervasives (not tracked by ocamldep) +$(OBJS) std_exit.cmo: pervasives.cmi +$(OTHERS:.cmo=.cmi) std_exit.cmi: pervasives.cmi +$(OBJS:.cmo=.cmx) std_exit.cmx: pervasives.cmi +$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmi +$(OTHERS:.cmo=.cmx) std_exit.cmx: pervasives.cmx +$(OTHERS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmx + +clean:: + rm -f *.cm* *.$(O) *.$(A) + rm -f *~ + +include .depend + +depend: + $(CAMLDEP) *.mli *.ml > .depend + $(CAMLDEP) *.ml | sed -e 's/\.cmx/.p.cmx/g' >>.depend |
