1 # /****************************************************************
2 # Copyright (C) 1998, 2000 by Lucent Technologies
5 # Permission to use, copy, modify, and distribute this software and
6 # its documentation for any purpose and without fee is hereby
7 # granted, provided that the above copyright notice appear in all
8 # copies and that both that the copyright notice and this
9 # permission notice and warranty disclaimer appear in supporting
10 # documentation, and that the name of Lucent or any of its entities
11 # not be used in advertising or publicity pertaining to
12 # distribution of the software without specific, written prior
15 # LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17 # IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18 # SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20 # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21 # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24 # ****************************************************************/
32 $(CC) -c $(CFLAGS) $*.c
34 all: dt dItest ddtest dtest ftest Qtest xLtest xtest ddtestsi dItestsi tests
40 dItest = dItest.o getround.o $A
42 $(CC) -o dItest $(dItest)
44 ddtest = ddtest.o getround.o $A
46 $(CC) -o ddtest $(ddtest)
48 dtest = dtest.o getround.o $A
50 $(CC) -o dtest $(dtest)
52 ftest = ftest.o getround.o $A
54 $(CC) -o ftest $(ftest)
56 Qtest = Qtest.o getround.o $A
58 $(CC) -o Qtest $(Qtest)
60 xtest = xtest.o getround.o $A
62 $(CC) -o xtest $(xtest)
64 xLtest = xLtest.o getround.o $A
66 $(CC) -o xLtest $(xLtest)
68 strtopddSI.o: strtopddSI.c ../strtopdd.c
70 strtorddSI.o: strtorddSI.c ../strtordd.c
72 strtodISI.o: strtodISI.c ../strtodI.c
74 strtoIddSI.o: strtoIddSI.c ../strtoIdd.c
76 strtoIdSI.o: strtoIdSI.c ../strtoId.c
78 ddtestsi = ddtest.o strtopddSI.o strtorddSI.o strtoIddSI.o getround.o $A
80 $(CC) -o ddtestsi $(ddtestsi)
82 dItestsi = dItest.o strtodISI.o strtoIdSI.o getround.o $A
84 $(CC) -o dItestsi $(dItestsi)
86 strtodt = strtodt.o $A
88 $(CC) -o strtodt $(strtodt)
90 # xQtest generates cp commands that depend on sizeof(long double).
91 # See the source for details. If you know better, create Q.out,
92 # x.out and xL.out by copying the relevant *.ou0 or *.ou1 files
93 # to the corresponding .out files. In short, the *.ou0 files are
94 # for long double == double; x.ou1 and xL.ou1 are for
95 # long double == extended (a la 80x87 and MC680x0), and Q.ou1 is
96 # for long double == quad.
99 $(CC) -o xQtest xQtest.c
101 rm -f xQtest xQtest.o
103 ## The rmdir below will fail if any test results differ.
105 tests: Q.out x.out xL.out dt dItest ddtest dtest ftest Qtest xLtest xtest ddtestsi dItestsi strtodt
107 cat testnos testnos1 | ./dt >zap 2>&1
108 cmp dtst.out zap || mv zap bad/dtst.out
109 ./dItest <testnos >zap 2>&1
110 cmp dI.out zap || mv zap bad/dI.out
111 ./dItestsi <testnos >zap 2>&1
112 cmp dIsi.out zap || mv zap bad/dIsi.out
113 ./ddtestsi <testnos >zap 2>&1
114 cmp ddsi.out zap || mv zap bad/ddsi.out
115 for i in dd d f x xL Q; do cat testnos rtestnos | \
116 ./"$$i"test >zap 2>&1;\
117 cmp $$i.out zap || mv zap bad/$$i.out; done
118 ./strtodt testnos3 >bad/strtodt.out && rm bad/strtodt.out || \
123 xs0 = README Qtest.c dItest.c ddtest.c dtest.c dt.c ftest.c getround.c \
124 strtoIdSI.c strtoIddSI.c strtodISI.c strtodt.c strtopddSI.c \
125 strtorddSI.c xLtest.c xQtest.c xtest.c rtestnos testnos testnos1 \
126 testnos3 dI.out dIsi.out ddsi.out dd.out dtst.out d.out f.out \
127 x.ou0 xL.ou0 x.ou1 xL.ou1 Q.ou0 Q.ou1 makefile
129 xsum.out: xsum0.out $(xs0)
130 xsum $(xs0) >xsum1.out
131 cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out
134 rm -f *.[ao] dt *test *testsi strtodt xsum.out xsum1.out tests zap x.out xL.out Q.out