1 # Makefile for uClibc's math library
3 # Copyright (C) 2001 by Lineo, inc.
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
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.
24 include $(TOPDIR)Rules.mak
27 TARGET_CC= $(TOPDIR)/extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
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))
46 $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
49 $(TARGET_CC) $(CFLAGS) -c $< -o $@
50 $(STRIPTOOL) -x -R .note -R .comment $*.o
59 #-----------------------------------------
62 #all: mtstl lparanoi lcalc fltestl nantst testvect monotl libml.a
64 mtstl: libml.a mtstl.o $(OBJS)
65 $(CC) $(CFLAGS) -o mtstl mtstl.o libml.a $(LIBS)
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)
72 lparanoi.o: lparanoi.c
73 $(CC) $(CFLAGS) -Wno-implicit -c lparanoi.c
75 econst.o: econst.c ehead.h
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)
80 lcalc.o: lcalc.c lcalc.h ehead.h
82 ieee.o: ieee.c ehead.h
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)
90 fltestl: fltestl.c libml.a
91 $(CC) $(CFLAGS) -o fltestl fltestl.c libml.a
95 flrtstl: flrtstl.c libml.a
96 $(CC) $(CFLAGS) -o flrtstl flrtstl.c libml.a
100 nantst: nantst.c libml.a
101 $(CC) $(CFLAGS) -o nantst nantst.c libml.a
105 testvect: testvect.o libml.a
106 $(CC) $(CFLAGS) -o testvect testvect.o libml.a
108 testvect.o: testvect.c
109 $(CC) -g -c -o testvect.o testvect.c
111 monotl: monotl.o libml.a
112 $(CC) $(CFLAGS) -o monotl monotl.o libml.a
115 $(CC) -g -c -o monotl.o monotl.c
118 check: mtstl fltestl testvect monotl libml.a