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