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 #
|
2001-12-07 05:41:02 -08:00
|
|
|
# under the terms of the GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../LICENSE. #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
2002-06-07 02:49:45 -07:00
|
|
|
include ../config/Makefile
|
1996-02-15 08:25:44 -08:00
|
|
|
|
2002-06-07 02:49:45 -07:00
|
|
|
RUNTIME=../boot/ocamlrun
|
|
|
|
COMPILER=../ocamlc
|
1996-02-15 08:25:44 -08:00
|
|
|
CAMLC=$(RUNTIME) $(COMPILER)
|
2004-06-14 05:23:40 -07:00
|
|
|
COMPFLAGS=-warn-error A -nostdlib
|
2002-06-07 02:49:45 -07:00
|
|
|
OPTCOMPILER=../ocamlopt
|
1996-02-15 08:25:44 -08:00
|
|
|
CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
|
2004-06-14 05:23:40 -07:00
|
|
|
OPTCOMPFLAGS=-warn-error A -nostdlib
|
2002-06-07 02:49:45 -07:00
|
|
|
CAMLDEP=../boot/ocamlrun ../tools/ocamldep
|
1996-02-15 08:25:44 -08:00
|
|
|
|
2004-06-13 05:47:32 -07:00
|
|
|
OBJS=pervasives.cmo $(OTHERS)
|
|
|
|
OTHERS=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 \
|
2003-06-24 01:21:40 -07:00
|
|
|
int32.cmo int64.cmo nativeint.cmo \
|
1997-10-28 05:17:11 -08:00
|
|
|
lexing.cmo parsing.cmo \
|
2002-07-14 18:10:33 -07:00
|
|
|
set.cmo map.cmo stack.cmo queue.cmo stream.cmo buffer.cmo \
|
|
|
|
printf.cmo format.cmo scanf.cmo \
|
|
|
|
arg.cmo printexc.cmo gc.cmo \
|
2005-02-03 02:03:03 -08:00
|
|
|
digest.cmo random.cmo callback.cmo camlinternalOO.cmo oo.cmo \
|
2004-06-13 05:47:32 -07:00
|
|
|
genlex.cmo weak.cmo \
|
|
|
|
lazy.cmo filename.cmo complex.cmo \
|
|
|
|
arrayLabels.cmo listLabels.cmo stringLabels.cmo moreLabels.cmo stdLabels.cmo
|
1996-02-15 08:25:44 -08:00
|
|
|
|
1998-06-01 07:53:28 -07:00
|
|
|
all: stdlib.cma std_exit.cmo camlheader camlheader_ur
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
allopt: stdlib.cmxa std_exit.cmx
|
|
|
|
|
|
|
|
install:
|
2000-01-31 21:42:25 -08:00
|
|
|
cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
installopt:
|
2002-06-07 02:49:45 -07:00
|
|
|
cp stdlib.cmxa stdlib.$(A) std_exit.$(O) *.cmx $(LIBDIR)
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
stdlib.cma: $(OBJS)
|
2004-06-13 05:47:32 -07:00
|
|
|
$(CAMLC) -a -o stdlib.cma $(OBJS)
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
stdlib.cmxa: $(OBJS:.cmo=.cmx)
|
2004-06-13 05:47:32 -07:00
|
|
|
$(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)
|
1996-02-15 08:25:44 -08:00
|
|
|
|
2002-06-07 02:49:45 -07:00
|
|
|
camlheader camlheader_ur: headernt.c ../config/Makefile
|
2005-02-03 02:03:03 -08:00
|
|
|
$(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o tmpheader.exe headernt.c
|
|
|
|
rm -f camlheader.exe
|
|
|
|
mv tmpheader.exe camlheader
|
1998-06-01 07:53:28 -07:00
|
|
|
cp camlheader camlheader_ur
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
clean::
|
1998-06-01 07:53:28 -07:00
|
|
|
rm -f camlheader camlheader_ur
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
.SUFFIXES: .mli .ml .cmi .cmo .cmx
|
|
|
|
|
|
|
|
.mli.cmi:
|
2004-06-13 05:47:32 -07:00
|
|
|
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $<
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
.ml.cmo:
|
2004-06-13 05:47:32 -07:00
|
|
|
$(CAMLC) $(COMPFLAGS) `./Compflags $@` -c $<
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
.ml.cmx:
|
2004-06-13 05:47:32 -07:00
|
|
|
$(CAMLOPT) $(OPTCOMPFLAGS) `./Compflags $@` -c $<
|
|
|
|
|
|
|
|
# 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
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
clean::
|
2002-06-07 02:49:45 -07:00
|
|
|
rm -f *.cm* *.$(O) *.$(A)
|
1996-02-15 08:25:44 -08:00
|
|
|
rm -f *~
|
|
|
|
|
2002-06-07 02:49:45 -07:00
|
|
|
include .depend
|
1996-02-15 08:25:44 -08:00
|
|
|
|
|
|
|
depend: beforedepend
|
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|