summaryrefslogtreecommitdiff
path: root/otherlibs/num/Makefile.nt
blob: 8613a553e52cbc2ce325c372956b96535501ab87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#########################################################################
#                                                                       #
#                            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$

# Makefile for the "num" (exact rational arithmetic) library

!include ..\..\config\Makefile.nt

# Compilation options
CC=$(BYTECC)
CFLAGS=-O -I.\bignum\h -I..\..\byterun $(BYTECCCOMPOPTS)
CAMLC=..\..\boot\ocamlrun ..\..\boot\ocamlc -I ..\..\boot -w s
CAMLOPT=..\..\boot\ocamlrun ..\..\ocamlopt -I ..\..\stdlib -w s

CAMLOBJS=int_misc.cmo string_misc.cmo nat.cmo big_int.cmo arith_flags.cmo \
  ratio.cmo num.cmo arith_status.cmo

CMIFILES=big_int.cmi nat.cmi num.cmi ratio.cmi arith_status.cmi

COBJS=nat_stubs.obj

all: libnums.lib nums.cma $(CMIFILES)

allopt: libnums.lib 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)

libnums.lib: bignum\libbignum.lib $(COBJS)
	$(MKLIB)libnums.lib bignum\libbignum.lib $(COBJS)

bignum\libbignum.lib:
	cd bignum & $(MAKEREC)

$(CAMLOBJS:.cmo=.cmx): ..\..\ocamlopt

install:
	cp libnums.lib $(LIBDIR)\libnums.lib
	cp nums.cma $(CMIFILES) $(LIBDIR)

installopt:
	cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.lib $(LIBDIR)

partialclean:
	rm -f *.cm*

clean: partialclean
	rm -f *.lib *.obj
	cd bignum & $(MAKEREC) scratch
	cd test & $(MAKEREC) clean

.SUFFIXES: .ml .mli .cmi .cmo .cmx

.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