1# @(#)Makefile 5.9 (Berkeley) 06/04/92 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# mips - for MIPS achitecture machines 9# tahoe - for the tahoe double format. 10# vax - for the vax D_floating format 11 12LIB= m 13CFLAGS+=-I${.CURDIR}/common_source 14 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 lgamma.c j0.c j1.c jn.c log.c \ 22 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 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 43HARDWARE=i387 44.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.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} == "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 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 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} == "tahoe") 90 91HARDWARE=${MACHINE} 92.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/tahoe \ 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 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# common 98SRCS+= atan2.c sincos.c tan.c 99# tahoe 100SRCS+= cabs.s cbrt.s sqrt.s support.s infnan.s 101 102.elif (${MACHINE} == "vax") 103 104HARDWARE=${MACHINE} 105.PATH: ${.CURDIR}/common_source ${.CURDIR}/vax 106# common_source 107SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 108 exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \ 109 log10.c log1p.c log__L.c pow.c sinh.c tanh.c 110# vax 111SRCS+= atan2.s cabs.s cbrt.s sqrt.s sincos.s tan.s argred.s support.s \ 112 infnan.s 113 114.endif 115 116MAN3+= acos.0 acosh.0 asin.0 asinh.0 atan.0 atan2.0 atanh.0 ceil.0 \ 117 cos.0 cosh.0 erf.0 exp.0 fabs.0 floor.0 fmod.0 hypot.0 ieee.0 \ 118 infnan.0 j0.0 lgamma.0 math.0 rint.0 sin.0 sinh.0 sqrt.0 \ 119 tan.0 tanh.0 120 121MLINKS+=erf.3 erfc.3 122MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3 123MLINKS+=hypot.3 cabs.3 124MLINKS+=ieee.3 copysign.3 ieee.3 drem.3 ieee.3 finite.3 ieee.3 logb.3 \ 125 ieee.3 scalb.3 126MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 yn.3 127MLINKS+=lgamma.3 gamma.3 128 129# can't use the standard mkdep, because there are some .s files that 130# are using '#' as a comment indicator and cpp thinks it's an undefined 131# control. 132 133depend: .depend 134.depend: ${SRCS} 135 mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c} 136 137.include <bsd.lib.mk> 138 139.s.o: 140 ${AS} -o ${.TARGET} ${.IMPSRC} 141 @${LD} -x -r ${.TARGET} 142 @mv a.out ${.TARGET} 143 144.s.po: 145 sed -f ${.CURDIR}/${HARDWARE}/mcount.sed ${.IMPSRC} | \ 146 ${AS} -o ${.TARGET} 147 @${LD} -X -r ${.TARGET} 148 @mv a.out ${.TARGET} 149