1999-11-17 10:59:06 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
|
|
|
# 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. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
1996-02-13 08:29:09 -08:00
|
|
|
include ../config/Makefile
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
RUNTIME=../boot/ocamlrun
|
|
|
|
COMPILER=../ocamlc
|
1995-06-18 07:45:56 -07:00
|
|
|
CAMLC=$(RUNTIME) $(COMPILER)
|
1997-02-19 08:10:57 -08:00
|
|
|
COMPFLAGS=-g
|
1996-04-30 07:53:58 -07:00
|
|
|
OPTCOMPILER=../ocamlopt
|
1995-07-10 02:48:27 -07:00
|
|
|
CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
|
1997-02-19 08:10:57 -08:00
|
|
|
OPTCOMPFLAGS=
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-04-14 03:05:33 -07:00
|
|
|
OBJS=pervasives.cmo array.cmo list.cmo char.cmo string.cmo sys.cmo \
|
1999-11-29 11:04:04 -08:00
|
|
|
hashtbl.cmo sort.cmo marshal.cmo obj.cmo \
|
1997-10-28 05:17:11 -08:00
|
|
|
lexing.cmo parsing.cmo \
|
1995-11-09 03:08:48 -08:00
|
|
|
set.cmo map.cmo stack.cmo queue.cmo stream.cmo \
|
1999-02-25 02:26:38 -08:00
|
|
|
buffer.cmo printf.cmo format.cmo arg.cmo printexc.cmo gc.cmo \
|
1997-10-31 04:59:29 -08:00
|
|
|
digest.cmo random.cmo oo.cmo genlex.cmo callback.cmo weak.cmo \
|
2000-02-11 07:09:27 -08:00
|
|
|
lazy.cmo filename.cmo int32.cmo int64.cmo nativeint.cmo
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1998-06-01 07:53:28 -07:00
|
|
|
all: stdlib.cma std_exit.cmo camlheader camlheader_ur
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1998-11-06 07:39:18 -08:00
|
|
|
allopt: stdlib.cmxa std_exit.cmx allopt-$(PROFILING)
|
|
|
|
|
|
|
|
allopt-noprof:
|
|
|
|
|
|
|
|
allopt-prof: stdlib.p.cmxa std_exit.p.cmx
|
1995-07-21 02:03:58 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
install:
|
1998-06-01 07:53:28 -07:00
|
|
|
cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1998-11-06 07:39:18 -08:00
|
|
|
installopt: installopt-default installopt-$(PROFILING)
|
|
|
|
|
|
|
|
installopt-default:
|
1995-10-26 09:25:03 -07:00
|
|
|
cp stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
|
1998-11-06 07:39:18 -08:00
|
|
|
cd $(LIBDIR); $(RANLIB) stdlib.a
|
|
|
|
|
|
|
|
installopt-noprof:
|
1999-01-27 02:53:29 -08:00
|
|
|
rm -f $(LIBDIR)/stdlib.p.cmxa; ln -s stdlib.cmxa $(LIBDIR)/stdlib.p.cmxa
|
|
|
|
rm -f $(LIBDIR)/stdlib.p.a; ln -s stdlib.a $(LIBDIR)/stdlib.p.a
|
|
|
|
rm -f $(LIBDIR)/std_exit.p.cmx; ln -s std_exit.cmx $(LIBDIR)/std_exit.p.cmx
|
|
|
|
rm -f $(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(LIBDIR)/std_exit.p.o
|
1998-11-06 07:39:18 -08:00
|
|
|
|
|
|
|
installopt-prof:
|
|
|
|
cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
|
|
|
|
cd $(LIBDIR); $(RANLIB) stdlib.p.a
|
1995-07-21 02:03:58 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
stdlib.cma: $(OBJS)
|
|
|
|
$(CAMLC) -a -o stdlib.cma $(OBJS)
|
|
|
|
|
1995-07-11 11:08:25 -07:00
|
|
|
stdlib.cmxa: $(OBJS:.cmo=.cmx)
|
|
|
|
$(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)
|
1995-07-10 02:48:27 -07:00
|
|
|
|
1998-08-06 06:27:38 -07:00
|
|
|
stdlib.p.cmxa: $(OBJS:.cmo=.p.cmx)
|
|
|
|
$(CAMLOPT) -a -o stdlib.p.cmxa $(OBJS:.cmo=.p.cmx)
|
|
|
|
|
1998-06-01 07:53:28 -07:00
|
|
|
camlheader camlheader_ur: header.c ../config/Makefile
|
|
|
|
if $(SHARPBANGSCRIPTS); then \
|
1998-09-02 11:21:28 -07:00
|
|
|
echo '#!$(BINDIR)/ocamlrun' > camlheader && \
|
|
|
|
echo '#!' | tr -d '\012' > camlheader_ur; \
|
1998-06-01 07:53:28 -07:00
|
|
|
else \
|
2000-08-10 02:58:08 -07:00
|
|
|
$(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -DRUNTIME_NAME='"$(BINDIR)/ocamlrun"' header.c -o tmpheader$(EXE) && \
|
|
|
|
strip tmpheader$(EXE) && \
|
|
|
|
mv tmpheader$(EXE) camlheader && \
|
1998-06-01 07:53:28 -07:00
|
|
|
cp camlheader camlheader_ur; \
|
1997-03-04 02:21:27 -08:00
|
|
|
fi
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-02-15 08:19:09 -08:00
|
|
|
clean::
|
1998-06-01 07:53:28 -07:00
|
|
|
rm -f camlheader camlheader_ur
|
1996-02-15 08:19:09 -08:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
pervasives.cmi: pervasives.mli
|
1995-07-18 01:43:50 -07:00
|
|
|
$(CAMLC) $(COMPFLAGS) -nopervasives -c pervasives.mli
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
pervasives.cmo: pervasives.ml
|
1995-07-18 01:43:50 -07:00
|
|
|
$(CAMLC) $(COMPFLAGS) -nopervasives -c pervasives.ml
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-07-10 02:48:27 -07:00
|
|
|
pervasives.cmx: pervasives.ml
|
1997-02-19 08:10:57 -08:00
|
|
|
$(CAMLOPT) $(OPTCOMPFLAGS) -nopervasives -c pervasives.ml
|
1995-07-10 02:48:27 -07:00
|
|
|
|
1998-08-06 06:27:38 -07:00
|
|
|
pervasives.p.cmx: pervasives.ml
|
|
|
|
@if test -f pervasives.cmx; then mv pervasives.cmx pervasives.n.cmx; else :; fi
|
|
|
|
@if test -f pervasives.o; then mv pervasives.o pervasives.n.o; else :; fi
|
|
|
|
$(CAMLOPT) $(OPTCOMPFLAGS) -p -nopervasives -c pervasives.ml
|
|
|
|
mv pervasives.cmx pervasives.p.cmx
|
|
|
|
mv pervasives.o pervasives.p.o
|
|
|
|
@if test -f pervasives.n.cmx; then mv pervasives.n.cmx pervasives.cmx; else :; fi
|
|
|
|
@if test -f pervasives.n.o; then mv pervasives.n.o pervasives.o; else :; fi
|
|
|
|
|
1997-09-30 03:15:06 -07:00
|
|
|
# oo.cmi must be compiled with -nopervasives for applets
|
|
|
|
oo.cmi: oo.mli
|
|
|
|
$(CAMLC) $(COMPFLAGS) -nopervasives -c oo.mli
|
|
|
|
|
1998-08-06 06:27:38 -07:00
|
|
|
.SUFFIXES: .mli .ml .cmi .cmo .cmx .p.cmx
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) $(COMPFLAGS) -c $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) $(COMPFLAGS) -c $<
|
|
|
|
|
1995-07-10 02:48:27 -07:00
|
|
|
.ml.cmx:
|
1997-02-19 08:10:57 -08:00
|
|
|
$(CAMLOPT) $(OPTCOMPFLAGS) -c $<
|
1995-07-10 02:48:27 -07:00
|
|
|
|
1998-08-06 06:27:38 -07:00
|
|
|
.ml.p.cmx:
|
|
|
|
@if test -f $*.cmx; then mv $*.cmx $*.n.cmx; else :; fi
|
|
|
|
@if test -f $*.o; then mv $*.o $*.n.o; else :; fi
|
|
|
|
$(CAMLOPT) $(OPTCOMPFLAGS) -p -c $<
|
|
|
|
mv $*.cmx $*.p.cmx
|
|
|
|
mv $*.o $*.p.o
|
|
|
|
@if test -f $*.n.cmx; then mv $*.n.cmx $*.cmx; else :; fi
|
|
|
|
@if test -f $*.n.o; then mv $*.n.o $*.o; else :; fi
|
|
|
|
|
|
|
|
$(OBJS) std_exit.cmo: pervasives.cmi $(COMPILER)
|
|
|
|
$(OBJS:.cmo=.cmx) std_exit.cmx: pervasives.cmi $(OPTCOMPILER)
|
|
|
|
$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: pervasives.cmi $(OPTCOMPILER)
|
1995-12-10 01:34:35 -08:00
|
|
|
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-02-15 08:19:09 -08:00
|
|
|
clean::
|
1995-11-26 12:23:16 -08:00
|
|
|
rm -f *.cm* *.o *.a
|
1995-05-04 03:15:53 -07:00
|
|
|
rm -f *~
|
|
|
|
|
|
|
|
include .depend
|
|
|
|
|
1996-11-08 06:47:14 -08:00
|
|
|
depend:
|
1995-05-04 03:15:53 -07:00
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|