xref: /original-bsd/lib/libm/Makefile (revision 3588a932)
1#	@(#)Makefile	5.6 (Berkeley) 12/31/90
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"
8# tahoe		- for the tahoe double format.
9# vax		- for the vax D_floating format
10
11LIB=	m
12CFLAGS+=-I${.CURDIR}/common_source
13
14.if (${MACHINE} == "ieee")
15
16HARDWARE=${MACHINE}
17.PATH:	${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
18# common_source
19SRCS+=	acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
20	exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \
21	log10.c log1p.c log__L.c pow.c sinh.c tanh.c
22# common
23SRCS+=	atan2.c sincos.c tan.c
24# ieee
25SRCS+=	cabs.c cbrt.c support.c
26
27.elif (${MACHINE} == "hp300")
28
29HARDWARE=mc68881
30.PATH:	${.CURDIR}/mc68881 ${.CURDIR}/common_source ${.CURDIR}/ieee
31# common_source
32SRCS+=	acosh.c asinh.c erf.c exp__E.c fmod.c lgamma.c j0.c j1.c log__L.c \
33	pow.c
34# mc68881
35SRCS+=	asincos.s atan.s atan2.c atanh.s cosh.s exp.s expm1.s floor.s \
36	log.s log10.s log1p.s sincos.s sinh.s sqrt.s support.s tan.s tanh.s
37# ieee
38SRCS+=	cabs.c cbrt.c
39
40.elif (${MACHINE} == "i386")
41
42HARDWARE=i387
43.PATH:	${.CURDIR}/common_source ${.CURDIR}/common \
44	${.CURDIR}/ieee
45CFLAGS+= -Dnational
46# common_source
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 lgamma.c j0.c j1.c jn.c log.c \
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
55.elif (${MACHINE} == "national")
56
57HARDWARE=${MACHINE}
58.PATH:	${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
59.elif (${MACHINE} == "national")
60
61HARDWARE=${MACHINE}
62.PATH:	${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
63	${.CURDIR}/ieee
64# common_source
65SRCS+=	acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
66	exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \
67	log10.c log1p.c log__L.c pow.c sinh.c tanh.c
68# common
69SRCS+=	atan2.c sincos.c tan.c
70# national
71SRCS+=	sqrt.s support.s
72# ieee
73SRCS+=	cabs.c cbrt.c
74
75.elif (${MACHINE} == "tahoe")
76
77HARDWARE=${MACHINE}
78.PATH:	${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/tahoe \
79# common_source
80SRCS+=	acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
81	exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \
82	log10.c log1p.c log__L.c pow.c sinh.c tanh.c
83# common
84SRCS+=	atan2.c sincos.c tan.c
85# tahoe
86SRCS+=	cabs.s cbrt.s sqrt.s support.s infnan.s
87
88.elif (${MACHINE} == "vax")
89
90HARDWARE=${MACHINE}
91.PATH:	${.CURDIR}/common_source ${.CURDIR}/vax
92# common_source
93SRCS+=	acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
94	exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \
95	log10.c log1p.c log__L.c pow.c sinh.c tanh.c
96# vax
97SRCS+=	atan2.s cabs.s cbrt.s sqrt.s sincos.s tan.s argred.s support.s \
98	infnan.s
99
100.endif
101
102MAN3+=	asinh.0 erf.0 exp.0 floor.0 hypot.0 ieee.0 infnan.0 j0.0 \
103	lgamma.0 math.0 sin.0 sinh.0 sqrt.0
104
105MLINKS+=asinh.3 acosh.3 asinh.3 atanh.3
106MLINKS+=erf.3 erfc.3
107MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3
108MLINKS+=floor.3 fabs.3 floor.3 ceil.3 floor.3 rint.3
109MLINKS+=hypot.3 cabs.3
110MLINKS+=ieee.3 copysign.3 ieee.3 drem.3 ieee.3 finite.3 ieee.3 logb.3 \
111	ieee.3 scalb.3
112MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 yn.3
113MLINKS+=lgamma.3 gamma.3
114MLINKS+=sin.3 tan.3 sin.3 acos.3 sin.3 asin.3 sin.3 atan.3 sin.3 atan2.3 \
115	sin.3 cos.3
116MLINKS+=sinh.3 cosh.3
117
118# can't use the standard mkdep, because there are some .s files that
119# are using '#' as a comment indicator and cpp thinks it's an undefined
120# control.
121
122depend: .depend
123.depend: ${SRCS}
124	mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c}
125
126.include <bsd.lib.mk>
127
128.s.o:
129	${AS} -o ${.TARGET} ${.IMPSRC}
130	@${LD} -x -r ${.TARGET}
131	@mv a.out ${.TARGET}
132
133.s.po:
134	sed -f ${.CURDIR}/${HARDWARE}/mcount.sed ${.IMPSRC} | \
135	    ${AS} -o ${.TARGET}
136	@${LD} -X -r ${.TARGET}
137	@mv a.out ${.TARGET}
138