summaryrefslogtreecommitdiff
path: root/libm/ldouble/Makefile
blob: dad448840d61f7ea51dc600bf3ddefb551504421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Makefile for uClibc's math library
# Copyright (C) 2001 by Lineo, inc.
#
# This math library is derived primarily from the Cephes Math Library,
# copyright by Stephen L. Moshier <moshier@world.std.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
# details.
#
# You should have received a copy of the GNU Library General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

TOPDIR=../../
include $(TOPDIR)Rules.mak

LIBM=../libm.a
TARGET_CC= $(TOPDIR)/extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc

CSRC=acoshl.c asinhl.c asinl.c atanhl.c atanl.c bdtrl.c btdtrl.c cbrtl.c \
	chdtrl.c coshl.c ellpel.c ellpkl.c elliel.c ellikl.c ellpjl.c \
	exp10l.c exp2l.c expl.c fdtrl.c gammal.c gdtrl.c igamil.c igaml.c \
	incbetl.c incbil.c isnanl.c j0l.c j1l.c jnl.c ldrand.c log10l.c log2l.c \
	logl.c nbdtrl.c ndtril.c ndtrl.c pdtrl.c powl.c powil.c sinhl.c sinl.c \
	sqrtl.c stdtrl.c tanhl.c tanl.c unityl.c ynl.c \
	floorl.c polevll.c mtherr.c #cmplxl.c clogl.c
COBJS=$(patsubst %.c,%.o, $(CSRC))


OBJS=$(COBJS)

all: $(OBJS) $(LIBM)

$(LIBM): ar-target

ar-target: $(OBJS)
	$(AR) $(ARFLAGS) $(LIBM) $(OBJS)

$(COBJS): %.o : %.c
	$(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@
	$(STRIPTOOL) -x -R .note -R .comment $*.o

$(OBJ): Makefile

clean:
	rm -f *.[oa] *~ core



#-----------------------------------------


#all: mtstl lparanoi lcalc fltestl nantst testvect monotl libml.a

mtstl: libml.a mtstl.o $(OBJS)
	$(TARGET_CC) $(TARGET_CFLAGS) -o mtstl mtstl.o libml.a $(LIBS)

mtstl.o: mtstl.c

lparanoi: libml.a lparanoi.o setprec.o ieee.o econst.o $(OBJS)
	$(TARGET_CC) $(TARGET_CFLAGS) -o lparanoi lparanoi.o setprec.o ieee.o econst.o libml.a $(LIBS)

lparanoi.o: lparanoi.c
	$(TARGET_CC) $(TARGET_CFLAGS) -Wno-implicit -c lparanoi.c

econst.o: econst.c ehead.h

lcalc: libml.a lcalc.o ieee.o econst.o $(OBJS)
	$(TARGET_CC) $(TARGET_CFLAGS) -o lcalc lcalc.o ieee.o econst.o libml.a $(LIBS)

lcalc.o: lcalc.c lcalc.h ehead.h

ieee.o: ieee.c ehead.h

# Use $(OBJS) in ar command for libml.a if possible; else *.o
libml.a: $(OBJS) mconf.h
	ar -rv libml.a $(OBJS)
	ranlib libml.a


fltestl: fltestl.c libml.a
	$(TARGET_CC) $(TARGET_CFLAGS) -o fltestl fltestl.c libml.a

fltestl.o: fltestl.c

flrtstl: flrtstl.c libml.a
	$(TARGET_CC) $(TARGET_CFLAGS) -o flrtstl flrtstl.c libml.a

flrtstl.o: flrtstl.c

nantst: nantst.c libml.a
	$(TARGET_CC) $(TARGET_CFLAGS) -o nantst nantst.c libml.a

nantst.o: nantst.c

testvect: testvect.o libml.a
	$(TARGET_CC) $(TARGET_CFLAGS) -o testvect testvect.o libml.a

testvect.o: testvect.c
	$(TARGET_CC) -g -c -o testvect.o testvect.c

monotl: monotl.o libml.a
	$(TARGET_CC) $(TARGET_CFLAGS) -o monotl monotl.o libml.a

monotl.o: monotl.c
	$(TARGET_CC) -g -c -o monotl.o monotl.c

# Run test programs
check: mtstl fltestl testvect monotl libml.a
	-mtstl
	-fltestl
	-testvect
	-monotl