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-22 04:52:45 -08:00
|
|
|
# Makefile for the "num" (exact rational arithmetic) library
|
|
|
|
|
|
|
|
!include ..\..\config\Makefile.nt
|
|
|
|
|
|
|
|
# Compilation options
|
|
|
|
CC=$(BYTECC)
|
|
|
|
CFLAGS=-O -I.\bignum\h -I..\..\byterun $(BYTECCCOMPOPTS)
|
2000-02-05 04:16:09 -08:00
|
|
|
CAMLC=..\..\boot\ocamlrun ..\..\ocamlc -I ..\..\boot -w s
|
1999-02-12 08:28:16 -08:00
|
|
|
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -w s
|
1996-02-22 04:52:45 -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
|
1996-02-22 04:52:45 -08:00
|
|
|
|
|
|
|
COBJS=nat_stubs.obj
|
|
|
|
|
|
|
|
all: libnums.lib nums.cma $(CMIFILES)
|
|
|
|
|
|
|
|
allopt: libnums.lib nums.cmxa $(CMIFILES)
|
|
|
|
|
|
|
|
nums.cma: $(CAMLOBJS)
|
2000-03-16 05:35:20 -08:00
|
|
|
$(CAMLC) -a -o nums.cma -custom $(CAMLOBJS) -cclib -lnums
|
1996-02-22 04:52:45 -08:00
|
|
|
|
|
|
|
nums.cmxa: $(CAMLOBJS:.cmo=.cmx)
|
2000-03-16 05:35:20 -08:00
|
|
|
$(CAMLOPT) -a -o nums.cmxa $(CAMLOBJS:.cmo=.cmx) -cclib -lnums
|
1996-02-22 04:52:45 -08:00
|
|
|
|
|
|
|
libnums.lib: bignum\libbignum.lib $(COBJS)
|
|
|
|
$(MKLIB)libnums.lib bignum\libbignum.lib $(COBJS)
|
|
|
|
|
|
|
|
bignum\libbignum.lib:
|
|
|
|
cd bignum & $(MAKEREC)
|
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
$(CAMLOBJS:.cmo=.cmx): ..\..\ocamlopt
|
1996-02-22 04:52:45 -08:00
|
|
|
|
|
|
|
install:
|
|
|
|
cp libnums.lib $(LIBDIR)\libnums.lib
|
1996-10-09 02:41:21 -07:00
|
|
|
cp nums.cma $(CMIFILES) $(LIBDIR)
|
1996-02-22 04:52:45 -08:00
|
|
|
|
|
|
|
installopt:
|
|
|
|
cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.lib $(LIBDIR)
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
partialclean:
|
1996-02-22 04:52:45 -08:00
|
|
|
rm -f *.cm*
|
|
|
|
|
1997-02-16 05:36:42 -08:00
|
|
|
clean: partialclean
|
1996-02-22 04:52:45 -08:00
|
|
|
rm -f *.lib *.obj
|
1997-03-11 02:58:27 -08:00
|
|
|
cd bignum & $(MAKEREC) scratch
|
1996-02-22 04:52:45 -08:00
|
|
|
cd test & $(MAKEREC) clean
|
|
|
|
|
1996-10-07 07:03:20 -07:00
|
|
|
.SUFFIXES: .ml .mli .cmi .cmo .cmx
|
1996-02-22 04:52:45 -08:00
|
|
|
|
|
|
|
.mli.cmi:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmo:
|
|
|
|
$(CAMLC) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
.ml.cmx:
|
|
|
|
$(CAMLOPT) -c $(COMPFLAGS) $<
|
|
|
|
|
|
|
|
nat_stubs.obj: nat.h
|
|
|
|
|
|
|
|
depend:
|
|
|
|
sed -e "s/\.o/.obj/g" .depend > .depend.nt
|
|
|
|
|
|
|
|
!include .depend.nt
|