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$
|
|
|
|
|
1998-02-23 04:42:23 -08:00
|
|
|
# Makefile for the ndbm library
|
|
|
|
|
|
|
|
include ../../config/Makefile
|
|
|
|
|
|
|
|
# Compilation optiosn
|
|
|
|
CC=$(BYTECC) -g
|
2002-04-27 07:45:33 -07:00
|
|
|
CAMLC=../../ocamlcomp.sh
|
|
|
|
CAMLOPT=../../ocamlcompopt.sh
|
2002-07-17 16:28:02 -07:00
|
|
|
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
|
2002-01-20 07:12:32 -08:00
|
|
|
COMPFLAGS=-warn-error A
|
2002-07-17 16:28:02 -07:00
|
|
|
|
|
|
|
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
|
1998-02-23 04:42:23 -08:00
|
|
|
COBJS=dbstubs.o
|
|
|
|
|
|
|
|
all: libmldb.a db.cmi db.cma
|
|
|
|
|
|
|
|
allopt: libmldb.a db.cmi db.cmxa
|
|
|
|
|
|
|
|
libmldb.a: $(COBJS)
|
2002-07-17 16:28:02 -07:00
|
|
|
$(MKLIB) -oc mldb $(COBJS) $(DB_LINK)
|
1998-02-23 04:42:23 -08:00
|
|
|
|
|
|
|
db.cma: db.cmo
|
2002-07-17 16:28:02 -07:00
|
|
|
$(MKLIB) -ocamlc '$(CAMLC)' -o db -oc mldb db.cmo $(DB_LINK)
|
1998-02-23 04:42:23 -08:00
|
|
|
|
|
|
|
db.cmxa: db.cmx
|
2002-07-17 16:28:02 -07:00
|
|
|
$(MKLIB) -ocamlopt '$(CAMLOPT)' -o db -oc mldb db.cmx $(DB_LINK)
|
1998-02-23 04:42:23 -08:00
|
|
|
|
|
|
|
partialclean:
|
|
|
|
rm -f *.cm*
|
|
|
|
|
|
|
|
clean: partialclean
|
2002-07-17 16:28:02 -07:00
|
|
|
rm -f *.a *.o *.so
|
1998-02-23 04:42:23 -08:00
|
|
|
|
|
|
|
install:
|
2002-07-17 16:28:02 -07:00
|
|
|
if test -f dllmldb.so; then cp dllmldb.so $(STUBLIBDIR)/dllmldb.so; fi
|
1998-02-23 04:42:23 -08:00
|
|
|
cp libmldb.a $(LIBDIR)/libmldb.a
|
|
|
|
cd $(LIBDIR); $(RANLIB) libmldb.a
|
|
|
|
cp db.cma db.cmi db.mli $(LIBDIR)
|
|
|
|
|
|
|
|
installopt:
|
|
|
|
cp db.cmx db.cmxa db.a $(LIBDIR)
|
|
|
|
cd $(LIBDIR); $(RANLIB) db.a
|
|
|
|
|
|
|
|
.SUFFIXES: .ml .mli .cmo .cmi .cmx
|
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
depend:
|
|
|
|
../../tools/ocamldep *.mli *.ml > .depend
|
|
|
|
|
|
|
|
include .depend
|