ocaml/otherlibs/num/bignum/Makefile.Mac

103 lines
2.8 KiB
Makefile
Raw Normal View History

# Copyright Digital Equipment Corporation & INRIA 1988, 1989, 1992
C = sc
COptions = -model far -i :h: -d CAML_LIGHT -w 30 {cdbgflag}
LinkOptions = -state nouse -compact -model far
Libs = "{libraries}IntEnv.far.o" "{libraries}MacRuntime.o" <20>
"{clibraries}StdCLib.far.o" "{libraries}MathLib.far.o" <20>
"{libraries}ToolLibs.o" "{libraries}Interface.o"
PPCC = mrc
PPCCOptions = -i :h: -d CAML_LIGHT -w 30 {cdbgflag}
PPCLinkOptions = {ldbgflag}
PPCLibs = "{sharedlibraries}MathLib" "{ppclibraries}PPCCRuntime.o" <20>
"{ppclibraries}PPCToolLibs.o" "{sharedlibraries}StdCLib" <20>
"{ppclibraries}StdCRuntime.o" "{sharedlibraries}InterfaceLib"
LIB = libbignum.o
OBJECT = :o:KerN.o :o:bnInit.o :o:bnMult.o :o:bnDivide.o :o:bnCmp.o :o:bzf.o <20>
:o:bz.o
PPCLIB = libbignum.x
PPCOBJECT = :o:KerN.x :o:bnInit.x :o:bnMult.x :o:bnDivide.x :o:bnCmp.x <20>
:o:bzf.x :o:bz.x
KERNH = :h:BigNum.h
# extra entries:
# all - make all the stuff
# tidy - cleanup directories
# scratch - start from scratch
default <EFBFBD>
echo "Usage: make <version>"
echo "see README for valid versions."
#all <20> testKerN bztest
# echo All is done
all <EFBFBD> {LIB} {PPCLIB}
echo
scratch <EFBFBD>
delete -i :o:<3A>.[ox] || set status 0
delete -i libbignum.o libbignum.x
delete -i bztest testKerN
# build the BigNum library
{LIB} <EFBFBD> {OBJECT}
lib -o {LIB} {OBJECT}
{PPCLIB} <EFBFBD> {PPCOBJECT}
ppclink {ldbgflag} -xm library -o {PPCLIB} {PPCOBJECT}
# How to choose the machine dependent version. All produce KerN.o
:o:KerN.o <20> :c:KerN.c
echo "The Default is KerN written in C with digits on long"
domake C -d C="{C}" -d COptions="{COptions}"
C <EFBFBD> scratch
{C} {COptions} :c:KerN.c -o :o:KerN.o
{PPCC} {PPCCOptions} :c:KerN.c -o :o:KerN.x
domake all
.o <EFBFBD> .c {KERNH}
{C} {COptions} {depdir}{default}.c -o {targdir}{default}.o
.x <EFBFBD> .c {KERNH}
{PPCC} {PPCCOptions} {depdir}{default}.c -o {targdir}{default}.x
:o: <20> :c: :c:bn:
# Level N
:o:bnInit.o :o:bnInit.x <20> {KERNH}
:o:bnMult.o :o:bnMult.x <20> {KERNH}
:o:bnDivide.o :o:bnDivide.x <20> {KERNH}
:o:bnCmp.o :o:bnCmp.x <20> {KERNH}
# Level Z
:o:bz.o :o:bz.x <20> :h:BigZ.h {KERNH}
# Some functions built with BigZ
:o:bzf.o :o:bzf.x <20> :h:BigZ.h {KERNH}
# Tests Of KerN
testKerN <20><> :o:testKerN.o {LIB}
ilink -c 'MPS ' -t MPST :o:testKerN.o {LIB} {LinkOptions} -o testKerN {Libs}
testKerN <20><> :o:testKerN.x {PPCLIB}
ppclink -c 'MPS ' -t MPST :o:testKerN.x {PPCLIB} {PPCLinkOptions} <20>
-o testKerN {PPCLibs}
:o:testKerN.o :o:testKerN.x <20> {KERNH}
# Tests Of BigZ
bztest <20><> :o:bztest.o {LIB}
ilink -c 'MPS ' -t MPST :o:bztest.o {LIB} {LinkOptions} -o bztest {Libs}
bztest <20><> :o:bztest.x {PPCLIB}
ppclink -c 'MPS ' -t MPST :o:bztest.x {PPCLIB} {PPCLinkOptions} <20>
-o bztest {PPCLibs}
:o:bztest.o :o:bztest.x <20> :h:BigZ.h {KERNH}