1#**************************************************************************
2#*                                                                        *
3#*                                 OCaml                                  *
4#*                                                                        *
5#*            Xavier Leroy, projet Cristal, INRIA Rocquencourt            *
6#*                                                                        *
7#*   Copyright 1999 Institut National de Recherche en Informatique et     *
8#*     en Automatique.                                                    *
9#*                                                                        *
10#*   All rights reserved.  This file is distributed under the terms of    *
11#*   the GNU Lesser General Public License version 2.1, with the          *
12#*   special exception on linking described in the file LICENSE.          *
13#*                                                                        *
14#**************************************************************************
15
16# Makefile for the "num" (exact rational arithmetic) library
17
18LIBNAME=nums
19EXTRACFLAGS=-DBNG_ARCH_$(BNG_ARCH) -DBNG_ASM_LEVEL=$(BNG_ASM_LEVEL)
20CAMLOBJS=int_misc.cmo nat.cmo big_int.cmo arith_flags.cmo \
21  ratio.cmo num.cmo arith_status.cmo
22CMIFILES=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi
23COBJS=bng.$(O) nat_stubs.$(O)
24
25include ../Makefile
26
27clean::
28	rm -f *~
29
30bng.$(O): bng.h bng_digit.c \
31       bng_amd64.c bng_ia32.c bng_ppc.c bng_sparc.c
32
33# At the moment, the following rule only works with gcc
34# It is not a big deal since the .depend file it produces is stored
35# in the repository
36depend:
37	$(CC) -MM $(CFLAGS) *.c > .depend
38	$(CAMLRUN) $(ROOTDIR)/tools/ocamldep -slash *.mli *.ml >> .depend
39
40ifeq "$(TOOLCHAIN)" "msvc"
41
42.depend.nt: .depend
43	sed -e 's/\.o/.$(O)/g' $< > $@
44
45include .depend.nt
46else
47include .depend
48endif
49