This commit was manufactured by cvs2svn to create tag 'FreeBSD-
[unix-history] / lib / libm / Makefile
CommitLineData
3332440a 1# @(#)Makefile 5.11 (Berkeley) 12/2/92
15637ed4
RG
2#
3# ieee - for most IEEE machines, we hope.
4# mc68881 - the, ahem, mc68881.
5# national - for those ieee machines whose floating point implementation
6# has similar byte ordering as the NATIONAL 32016 with 32081.
7# i386 - i387 NPX, currently the same as "national"
3332440a 8# mips - for MIPS achitecture machines
15637ed4
RG
9# tahoe - for the tahoe double format.
10# vax - for the vax D_floating format
11
15637ed4
RG
12LIB= m
13CFLAGS+=-I${.CURDIR}/common_source
14
3332440a
AM
15.if (${MACHINE} == "ieee")
16
17HARDWARE=${MACHINE}
18.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
19# common_source
20SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
21 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c \
22 jn.c log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
23# common
24SRCS+= atan2.c sincos.c tan.c
25# ieee
26SRCS+= cabs.c cbrt.c support.c
27
28.elif (${MACHINE} == "hp300" || ${MACHINE} == "luna68k")
29
30HARDWARE=mc68881
31.PATH: ${.CURDIR}/mc68881 ${.CURDIR}/common_source ${.CURDIR}/ieee
32# common_source
33SRCS+= acosh.c asinh.c erf.c exp__E.c fmod.c gamma.c lgamma.c j0.c j1.c log__L.c \
34 pow.c
35# mc68881
36SRCS+= asincos.s atan.s atan2.c atanh.s cosh.s exp.s expm1.s floor.s \
37 log.s log10.s log1p.s sincos.s sinh.s sqrt.s support.s tan.s tanh.s
38# ieee
39SRCS+= cabs.c cbrt.c
40
41.elif (${MACHINE} == "i386")
42
15637ed4 43HARDWARE=i387
3332440a 44.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
15637ed4
RG
45CFLAGS+= -Dnational
46# common_source
3332440a
AM
47SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
48 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c log.c \
15637ed4
RG
49 log10.c log1p.c log__L.c pow.c sinh.c tanh.c
50# common
51SRCS+= atan2.c sincos.c tan.c
52# ieee
53SRCS+= cabs.c cbrt.c support.c
54
3332440a
AM
55.elif (${MACHINE} == "mips")
56
57HARDWARE=${MACHINE}
58.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
59CFLAGS+= -Dnational
60# common_source
61SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
62 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c log.c \
63 log10.c log1p.c log__L.c pow.c sinh.c tanh.c
64# common
65SRCS+= atan2.c sincos.c tan.c
66# ieee
67SRCS+= cabs.c cbrt.c support.c
68
69.elif (${MACHINE} == "national")
70
71HARDWARE=${MACHINE}
72.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
73.elif (${MACHINE} == "national")
74
75HARDWARE=${MACHINE}
76.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
77 ${.CURDIR}/ieee
78# common_source
79SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
80 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c log.c \
81 log10.c log1p.c log__L.c pow.c sinh.c tanh.c
82# common
83SRCS+= atan2.c sincos.c tan.c
84# national
85SRCS+= sqrt.s support.s
86# ieee
87SRCS+= cabs.c cbrt.c
88
89.elif (${MACHINE} == "sparc")
90
91HARDWARE=${MACHINE}
92.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
93# common_source
94SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
95 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c log.c \
96 log10.c log1p.c log__L.c pow.c sinh.c tanh.c
97# XXX should do sqrt & support functions in assembly
98# common
99SRCS+= atan2.c sincos.c tan.c
100# ieee
101SRCS+= cabs.c cbrt.c support.c
102
103.elif (${MACHINE} == "tahoe")
104
105HARDWARE=${MACHINE}
106.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/tahoe \
107# common_source
108SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
109 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c log.c \
110 log10.c log1p.c log__L.c pow.c sinh.c tanh.c
111# common
112SRCS+= atan2.c sincos.c tan.c
113# tahoe
114SRCS+= cabs.s cbrt.s sqrt.s support.s infnan.s
115
116.elif (${MACHINE} == "vax")
117
118HARDWARE=${MACHINE}
119.PATH: ${.CURDIR}/common_source ${.CURDIR}/vax
120# common_source
121SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
122 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c log.c \
123 log10.c log1p.c log__L.c pow.c sinh.c tanh.c
124# vax
125SRCS+= atan2.s cabs.s cbrt.s sqrt.s sincos.s tan.s argred.s support.s \
126 infnan.s
127
128.endif
129
4db4d4b7
RM
130MANSRC= ${.CURDIR}/common_source
131
132MAN3+= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \
133 cos.3 cosh.3 erf.3 exp.3 fabs.3 floor.3 fmod.3 hypot.3 ieee.3 \
134 infnan.3 j0.3 lgamma.3 math.3 rint.3 sin.3 sinh.3 sqrt.3 \
135 tan.3 tanh.3
15637ed4
RG
136
137MLINKS+=erf.3 erfc.3
138MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3
139MLINKS+=hypot.3 cabs.3
140MLINKS+=ieee.3 copysign.3 ieee.3 drem.3 ieee.3 finite.3 ieee.3 logb.3 \
141 ieee.3 scalb.3
142MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 yn.3
143MLINKS+=lgamma.3 gamma.3
144
145# can't use the standard mkdep, because there are some .s files that
146# are using '#' as a comment indicator and cpp thinks it's an undefined
147# control.
148
149depend: .depend
150.depend: ${SRCS}
151 mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c}
152
153.include <bsd.lib.mk>
154
155.s.o:
156 ${AS} -o ${.TARGET} ${.IMPSRC}
5406a6bf
JH
157 @${LD} -x -r ${.TARGET}
158 @mv a.out ${.TARGET}
15637ed4
RG
159
160.s.po:
161 sed -f ${.CURDIR}/${HARDWARE}/mcount.sed ${.IMPSRC} | \
162 ${AS} -o ${.TARGET}
5406a6bf
JH
163 @${LD} -X -r ${.TARGET}
164 @mv a.out ${.TARGET}