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