3 # Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
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
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
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
22 include $(TESTDIR)/Rules.mak
23 CFLAGS+=-D_GNU_SOURCE -DNO_LONG_DOUBLE
29 libm-tests+= test-double test-idouble
30 #libm-tests+= test-float test-ifloat
31 #libm-tests+= test-ldouble test-ildouble
32 libm-tests.o = $(addsuffix .o,$(libm-tests))
34 libm-tests-generated = libm-test-ulps.h libm-test.c
35 generated += $(libm-tests-generated) libm-test.stmp
36 TARGETS += $(libm-tests) #$(libm-tests-generated)
38 all: libm-test.c $(TARGETS)
40 test-double: test-double.o
41 $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
43 test-idouble: test-idouble.o
44 $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
46 test-float: test-float.o
47 $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
49 test-ifloat: test-ifloat.o
50 $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
52 test-ldouble: test-ldouble.o
53 $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
55 test-ildouble: test-ildoubl.o
56 $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
59 test-float.o: libm-test.c
60 test-ifloat.o: libm-test.c
61 test-double.o: libm-test.c
62 test-idouble.o: libm-test.c
63 test-ldouble.o: libm-test.c
64 test-ildoubl.o: libm-test.c
66 ulps-file = $(firstword $(wildcard $(config-sysdirs:%=$(..)%/libm-test-ulps)))
68 libm-test.c: $(ulps-file) libm-test.inc gen-libm-test.pl
69 $(PERL) ./gen-libm-test.pl -u $< ./libm-test.inc -o "." 2>&1 > /dev/null
72 rm -f *.[oa] *~ core $(TARGETS) $(generated)