1995-11-06 02:34:19 -08:00
|
|
|
# Makefile for the "num" (exact rational arithmetic) library
|
|
|
|
|
1996-02-13 08:29:09 -08:00
|
|
|
include ../../config/Makefile
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
# Compilation options
|
|
|
|
CC=$(BYTECC)
|
|
|
|
CFLAGS=-O -I./bignum/h -I../../byterun $(BYTECCCOMPOPTS)
|
1996-06-04 08:13:13 -07:00
|
|
|
CAMLC=../../boot/ocamlrun ../../boot/ocamlc -I ../../stdlib
|
1996-04-30 07:53:58 -07:00
|
|
|
CAMLOPT=../../boot/ocamlrun ../../ocamlopt -I ../../stdlib
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
CAMLOBJS=int_misc.cmo string_misc.cmo nat.cmo big_int.cmo arith_flags.cmo \
|
|
|
|
ratio.cmo num.cmo arith_status.cmo
|
|
|
|
|
1996-10-09 02:41:21 -07:00
|
|
|
CMIFILES=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
COBJS=nat_stubs.o
|
|
|
|
|
|
|
|
all: libnums.a nums.cma $(CMIFILES)
|
|
|
|
|
|
|
|
allopt: libnums.a nums.cmxa $(CMIFILES)
|
|
|
|
|
|
|
|
nums.cma: $(CAMLOBJS)
|
|
|
|
$(CAMLC) -a -o nums.cma $(CAMLOBJS)
|
|
|
|
|
|
|
|
nums.cmxa: $(CAMLOBJS:.cmo=.cmx)
|
|
|
|
$(CAMLOPT) -a -o nums.cmxa $(CAMLOBJS:.cmo=.cmx)
|
1995-11-26 12:23:16 -08:00
|
|
|
|
1995-11-06 02:34:19 -08:00
|
|
|
libnums.a: bignum/libbignum.a $(COBJS)
|
|
|
|
cp bignum/libbignum.a libnums.a
|
|
|
|
ar r libnums.a $(COBJS)
|
|
|
|
$(RANLIB) libnums.a
|
|
|
|
|
|
|
|
bignum/libbignum.a:
|
1995-12-05 05:09:02 -08:00
|
|
|
cd bignum; $(MAKE) $(BIGNUM_ARCH) CC="$(CC)"
|
1995-11-06 02:34:19 -08:00
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
$(CAMLOBJS:.cmo=.cmx): ../../ocamlopt
|
1995-11-26 12:23:16 -08:00
|
|
|
|
1995-11-06 02:34:19 -08:00
|
|
|
install:
|
|
|
|
cp libnums.a $(LIBDIR)/libnums.a
|
|
|
|
cd $(LIBDIR); $(RANLIB) libnums.a
|
1997-07-30 05:29:46 -07:00
|
|
|
cp nums.cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
installopt:
|
1995-11-09 05:23:22 -08:00
|
|
|
cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.a $(LIBDIR)
|
1995-11-06 02:34:19 -08:00
|
|
|
cd $(LIBDIR); $(RANLIB) nums.a
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.cm*
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
clean: partialclean
|
1995-11-06 03:09:03 -08:00
|
|
|
rm -f *.a *.o
|
1995-12-05 05:09:02 -08:00
|
|
|
cd bignum; $(MAKE) scratch
|
|
|
|
cd test; $(MAKE) clean
|
1995-11-06 02:34:19 -08:00
|
|
|
|
1996-10-07 07:03:20 -07:00
|
|
|
.SUFFIXES: .ml .mli .cmi .cmo .cmx
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
nat_stubs.o: nat.h
|
|
|
|
|
1996-10-07 07:03:20 -07:00
|
|
|
depend:
|
1995-11-06 02:34:19 -08:00
|
|
|
gcc -MM $(CFLAGS) *.c > .depend
|
1998-04-21 09:09:03 -07:00
|
|
|
../../boot/ocamlrun ../../tools/ocamldep *.mli *.ml >> .depend
|
1995-11-06 02:34:19 -08:00
|
|
|
|
|
|
|
include .depend
|