]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/gdtoa/test/makefile
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / contrib / gdtoa / test / makefile
1 # /****************************************************************
2 # Copyright (C) 1998, 2000 by Lucent Technologies
3 # All Rights Reserved
4 #
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
13 # permission.
14 #
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
22 # THIS SOFTWARE.
23 #
24 # ****************************************************************/
25
26 .SUFFIXES: .c .o
27 CC = cc
28 CFLAGS = -g -I..
29 A = ../gdtoa.a
30
31 .c.o:
32         $(CC) -c $(CFLAGS) $*.c
33
34 all: dt dItest ddtest dtest ftest Qtest xLtest xtest ddtestsi dItestsi tests
35
36 dt = dt.o $A
37 dt: $(dt)
38         $(CC) -o dt $(dt)
39
40 dItest = dItest.o getround.o $A
41 dItest: $(dItest)
42         $(CC) -o dItest $(dItest)
43
44 ddtest = ddtest.o getround.o $A
45 ddtest: $(ddtest)
46         $(CC) -o ddtest $(ddtest)
47
48 dtest = dtest.o getround.o $A
49 dtest: $(dtest)
50         $(CC) -o dtest $(dtest)
51
52 ftest = ftest.o getround.o $A
53 ftest: $(ftest)
54         $(CC) -o ftest $(ftest)
55
56 Qtest = Qtest.o getround.o $A
57 Qtest: $(Qtest)
58         $(CC) -o Qtest $(Qtest)
59
60 xtest = xtest.o getround.o $A
61 xtest: $(xtest)
62         $(CC) -o xtest $(xtest)
63
64 xLtest = xLtest.o getround.o $A
65 xLtest: $(xLtest)
66         $(CC) -o xLtest $(xLtest)
67
68 strtopddSI.o: strtopddSI.c ../strtopdd.c
69
70 strtorddSI.o: strtorddSI.c ../strtordd.c
71
72 strtodISI.o: strtodISI.c ../strtodI.c
73
74 strtoIddSI.o: strtoIddSI.c ../strtoIdd.c
75
76 strtoIdSI.o: strtoIdSI.c ../strtoId.c
77
78 ddtestsi = ddtest.o strtopddSI.o strtorddSI.o strtoIddSI.o getround.o $A
79 ddtestsi: $(ddtestsi)
80         $(CC) -o ddtestsi $(ddtestsi)
81
82 dItestsi = dItest.o strtodISI.o strtoIdSI.o getround.o $A
83 dItestsi: $(dItestsi)
84         $(CC) -o dItestsi $(dItestsi)
85
86 strtodt = strtodt.o $A
87 strtodt: $(strtodt)
88         $(CC) -o strtodt $(strtodt)
89
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.
97
98 Q.out x.out xL.out:
99         $(CC) -o xQtest xQtest.c
100         ./xQtest | sh
101         rm -f xQtest xQtest.o
102
103 ## The rmdir below will fail if any test results differ.
104
105 tests: Q.out x.out xL.out dt dItest ddtest dtest ftest Qtest xLtest xtest ddtestsi dItestsi strtodt
106         mkdir bad
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 || \
119                 cat bad/strtodt.out
120         rmdir bad
121         touch tests
122
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
128
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
132
133 clean:
134         rm -f *.[ao] dt *test *testsi strtodt xsum.out xsum1.out tests zap x.out xL.out Q.out
135         rm -rf bad