OSDN Git Service

uClibc now has a math library. muahahahaha!
[uclinux-h8/uclibc-ng.git] / libm / ldouble / Makefile
1 # Makefile for uClibc's math library
2 #
3 # Copyright (C) 2001 by Lineo, inc.
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 # Derived in part from the Linux-8086 C library, the GNU C Library, and several
20 # other sundry sources.  Files within this library are copyright by their
21 # respective copyright holders.
22
23 TOPDIR=../../
24 include $(TOPDIR)Rules.mak
25
26 LIBM=../libm.a
27 TARGET_CC= $(TOPDIR)/extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
28
29 CSRC=acoshl.c asinhl.c asinl.c atanhl.c atanl.c bdtrl.c btdtrl.c cbrtl.c \
30         chdtrl.c coshl.c ellpel.c ellpkl.c elliel.c ellikl.c ellpjl.c \
31         exp10l.c exp2l.c expl.c fdtrl.c gammal.c gdtrl.c igamil.c igaml.c \
32         incbetl.c incbil.c isnanl.c j0l.c j1l.c jnl.c ldrand.c log10l.c log2l.c \
33         logl.c nbdtrl.c ndtril.c ndtrl.c pdtrl.c powl.c powil.c sinhl.c sinl.c \
34         sqrtl.c stdtrl.c tanhl.c tanl.c unityl.c ynl.c \
35         floorl.c polevll.c mtherr.c #cmplxl.c clogl.c
36 COBJS=$(patsubst %.c,%.o, $(CSRC))
37
38
39 OBJS=$(COBJS)
40
41 all: $(OBJS) $(LIBM)
42
43 $(LIBM): ar-target
44
45 ar-target: $(OBJS)
46         $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
47
48 $(COBJS): %.o : %.c
49         $(TARGET_CC) $(CFLAGS) -c $< -o $@
50         $(STRIPTOOL) -x -R .note -R .comment $*.o
51
52 $(OBJ): Makefile
53
54 clean:
55         rm -f *.[oa] *~ core
56
57
58
59 #-----------------------------------------
60
61
62 #all: mtstl lparanoi lcalc fltestl nantst testvect monotl libml.a
63
64 mtstl: libml.a mtstl.o $(OBJS)
65         $(CC) $(CFLAGS) -o mtstl mtstl.o libml.a $(LIBS)
66
67 mtstl.o: mtstl.c
68
69 lparanoi: libml.a lparanoi.o setprec.o ieee.o econst.o $(OBJS)
70         $(CC) $(CFLAGS) -o lparanoi lparanoi.o setprec.o ieee.o econst.o libml.a $(LIBS)
71
72 lparanoi.o: lparanoi.c
73         $(CC) $(CFLAGS) -Wno-implicit -c lparanoi.c
74
75 econst.o: econst.c ehead.h
76
77 lcalc: libml.a lcalc.o ieee.o econst.o $(OBJS)
78         $(CC) $(CFLAGS) -o lcalc lcalc.o ieee.o econst.o libml.a $(LIBS)
79
80 lcalc.o: lcalc.c lcalc.h ehead.h
81
82 ieee.o: ieee.c ehead.h
83
84 # Use $(OBJS) in ar command for libml.a if possible; else *.o
85 libml.a: $(OBJS) mconf.h
86         ar -rv libml.a $(OBJS)
87         ranlib libml.a
88
89
90 fltestl: fltestl.c libml.a
91         $(CC) $(CFLAGS) -o fltestl fltestl.c libml.a
92
93 fltestl.o: fltestl.c
94
95 flrtstl: flrtstl.c libml.a
96         $(CC) $(CFLAGS) -o flrtstl flrtstl.c libml.a
97
98 flrtstl.o: flrtstl.c
99
100 nantst: nantst.c libml.a
101         $(CC) $(CFLAGS) -o nantst nantst.c libml.a
102
103 nantst.o: nantst.c
104
105 testvect: testvect.o libml.a
106         $(CC) $(CFLAGS) -o testvect testvect.o libml.a
107
108 testvect.o: testvect.c
109         $(CC) -g -c -o testvect.o testvect.c
110
111 monotl: monotl.o libml.a
112         $(CC) $(CFLAGS) -o monotl monotl.o libml.a
113
114 monotl.o: monotl.c
115         $(CC) -g -c -o monotl.o monotl.c
116
117 # Run test programs
118 check: mtstl fltestl testvect monotl libml.a
119         -mtstl
120         -fltestl
121         -testvect
122         -monotl
123