OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [test/] [math/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
# Makefile for uClibc
2
#
3
# Copyright (C) 2000,2001 Erik Andersen 
4
#
5
# This program is free software; you can redistribute it and/or modify it under
6
# the terms of the GNU Library General Public License as published by the Free
7
# Software Foundation; either version 2 of the License, or (at your option) any
8
# later version.
9
#
10
# This program is distributed in the hope that it will be useful, but WITHOUT
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
13
# details.
14
#
15
# You should have received a copy of the GNU Library General Public License
16
# along with this program; if not, write to the Free Software Foundation, Inc.,
17
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
 
19
 
20
 
21
TESTDIR=../
22
include $(TESTDIR)/Rules.mak
23
CFLAGS+=-D_GNU_SOURCE -DNO_LONG_DOUBLE
24
EXTRA_LIBS=-lm
25
PERL=/usr/bin/perl
26
 
27
TARGETS:=
28
libm-tests=libm-test.c
29
libm-tests+= test-double test-idouble
30
libm-tests+= diff
31
#libm-tests+= test-float test-ifloat
32
#libm-tests+= test-ldouble test-ildouble
33
libm-tests.o = $(addsuffix .o,$(libm-tests))
34
 
35
libm-tests-generated = libm-test-ulps.h libm-test.c
36
generated += $(libm-tests-generated) libm-test.stmp
37
TARGETS += $(libm-tests) #$(libm-tests-generated)
38
 
39
all: $(TARGETS)
40
 
41
test-double: test-double.o
42
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
43
        -./$@
44
test-idouble: test-idouble.o
45
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
46
        -./$@
47
test-float: test-float.o
48
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
49
        -./$@
50
test-ifloat: test-ifloat.o
51
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
52
        -./$@
53
test-ldouble: test-ldouble.o
54
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
55
        -./$@
56
test-ildouble: test-ildoubl.o
57
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
58
        -./$@
59
 
60
rint: rint.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
61
        -@ echo "-------"
62
        -@ echo " "
63
        -@ echo "Compiling vs uClibc: "
64
        -@ echo " "
65
        $(CC) $(CFLAGS) -c $< -o $@.o
66
        $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
67
        $(STRIPTOOL) -x -R .note -R .comment $@
68
        -./$@ > $@.out 2>&1
69
        -@ echo " "
70
 
71
rint_glibc: rint.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
72
        -@ echo "-------"
73
        -@ echo " "
74
        -@ echo "Compiling vs glibc: "
75
        -@ echo " "
76
        $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
77
        $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
78
        $(STRIPTOOL) -x -R .note -R .comment $@
79
        -./$@ > $@.out 2>&1
80
        -@ echo " "
81
 
82
diff: rint_glibc rint
83
        -@ echo "-------"
84
        -@ echo " "
85
        -@ echo "Diffing output: "
86
        -@ echo " "
87
        -diff -u rint_glibc.out rint.out
88
        -@ echo " "
89
 
90
test-float.o: libm-test.c
91
test-ifloat.o: libm-test.c
92
test-double.o: libm-test.c
93
test-idouble.o: libm-test.c
94
test-ldouble.o: libm-test.c
95
test-ildoubl.o: libm-test.c
96
 
97
ulps-file = $(firstword $(wildcard $(config-sysdirs:%=$(..)%/libm-test-ulps)))
98
 
99
libm-test.c: $(ulps-file) libm-test.inc gen-libm-test.pl
100
        $(PERL) ./gen-libm-test.pl -u $< ./libm-test.inc -o "." 2>&1 > /dev/null
101
 
102
clean:
103
        $(RM) *.[oa] *~ core $(TARGETS) $(generated) rint_glibc.out rint.out
104
 
105
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.