1# @(#)Makefile 5.7 (Berkeley) 05/02/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 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+= acos.0 acosh.0 asin.0 asinh.0 atan.0 atan2.0 atanh.0 ceil.0 \ 103 cos.0 cosh.0 erf.0 exp.0 fabs.0 floor.0 fmod.0 hypot.0 ieee.0 \ 104 infnan.0 j0.0 lgamma.0 math.0 rint.0 sin.0 sinh.0 sqrt.0 \ 105 tan.0 tanh.0 106 107MLINKS+=erf.3 erfc.3 108MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.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 114 115# can't use the standard mkdep, because there are some .s files that 116# are using '#' as a comment indicator and cpp thinks it's an undefined 117# control. 118 119depend: .depend 120.depend: ${SRCS} 121 mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c} 122 123.include <bsd.lib.mk> 124 125.s.o: 126 ${AS} -o ${.TARGET} ${.IMPSRC} 127 @${LD} -x -r ${.TARGET} 128 @mv a.out ${.TARGET} 129 130.s.po: 131 sed -f ${.CURDIR}/${HARDWARE}/mcount.sed ${.IMPSRC} | \ 132 ${AS} -o ${.TARGET} 133 @${LD} -X -r ${.TARGET} 134 @mv a.out ${.TARGET} 135