1 # from: @(#)Makefile 5.11 (Berkeley) 12/2/92 2 # $Id: Makefile,v 1.3 1993/08/14 13:42:09 mycroft Exp $ 3 # 4 # ieee - for most IEEE machines, we hope. 5 # mc68881 - the, ahem, mc68881. 6 # national - for those ieee machines whose floating point implementation 7 # has similar byte ordering as the NATIONAL 32016 with 32081. 8 # i386 - i387 NPX, currently the same as "national" 9 # mips - for MIPS achitecture machines 10 # tahoe - for the tahoe double format. 11 # vax - for the vax D_floating format 12 13 LIB= m 14 CFLAGS+=-I${.CURDIR}/common_source 15 16 .if (${MACHINE} == "ieee") 17 18 HARDWARE=${MACHINE} 19 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee 20 # common_source 21 SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 22 exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c \ 23 jn.c log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c 24 # common 25 SRCS+= atan2.c sincos.c tan.c 26 # ieee 27 SRCS+= cabs.c cbrt.c support.c 28 29 .elif (${MACHINE} == "hp300" || ${MACHINE} == "luna68k") 30 31 HARDWARE=mc68881 32 .PATH: ${.CURDIR}/mc68881 ${.CURDIR}/common_source ${.CURDIR}/ieee 33 # common_source 34 SRCS+= acosh.c asinh.c erf.c exp__E.c fmod.c lgamma.c j0.c j1.c log__L.c \ 35 pow.c 36 # mc68881 37 SRCS+= 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 40 SRCS+= cabs.c cbrt.c 41 42 .elif (${MACHINE} == "i386") 43 44 HARDWARE=i387 45 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee 46 CFLAGS+= -Dnational 47 # common_source 48 SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 49 exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \ 50 log10.c log1p.c log__L.c pow.c sinh.c tanh.c 51 # common 52 SRCS+= atan2.c sincos.c tan.c 53 # ieee 54 SRCS+= cabs.c cbrt.c support.c 55 56 .elif (${MACHINE} == "mips") 57 58 HARDWARE=${MACHINE} 59 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee 60 CFLAGS+= -Dnational 61 # common_source 62 SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 63 exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \ 64 log10.c log1p.c log__L.c pow.c sinh.c tanh.c 65 # common 66 SRCS+= atan2.c sincos.c tan.c 67 # ieee 68 SRCS+= cabs.c cbrt.c support.c 69 70 .elif (${MACHINE} == "national") 71 72 HARDWARE=${MACHINE} 73 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \ 74 .elif (${MACHINE} == "national") 75 76 HARDWARE=${MACHINE} 77 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \ 78 ${.CURDIR}/ieee 79 # common_source 80 SRCS+= 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 84 SRCS+= atan2.c sincos.c tan.c 85 # national 86 SRCS+= sqrt.s support.s 87 # ieee 88 SRCS+= cabs.c cbrt.c 89 90 .elif (${MACHINE} == "sparc") 91 92 HARDWARE=${MACHINE} 93 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee 94 # common_source 95 SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 96 exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \ 97 log10.c log1p.c log__L.c pow.c sinh.c tanh.c 98 # XXX should do sqrt & support functions in assembly 99 # common 100 SRCS+= atan2.c sincos.c tan.c 101 # ieee 102 SRCS+= cabs.c cbrt.c support.c 103 104 .elif (${MACHINE} == "tahoe") 105 106 HARDWARE=${MACHINE} 107 .PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/tahoe \ 108 # common_source 109 SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 110 exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \ 111 log10.c log1p.c log__L.c pow.c sinh.c tanh.c 112 # common 113 SRCS+= atan2.c sincos.c tan.c 114 # tahoe 115 SRCS+= cabs.s cbrt.s sqrt.s support.s infnan.s 116 117 .elif (${MACHINE} == "vax") 118 119 HARDWARE=${MACHINE} 120 .PATH: ${.CURDIR}/common_source ${.CURDIR}/vax 121 # common_source 122 SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \ 123 exp__E.c expm1.c floor.c fmod.c lgamma.c j0.c j1.c jn.c log.c \ 124 log10.c log1p.c log__L.c pow.c sinh.c tanh.c 125 # vax 126 SRCS+= atan2.s cabs.s cbrt.s sqrt.s sincos.s tan.s argred.s support.s \ 127 infnan.s 128 129 .endif 130 131 MAN3+= acos.0 acosh.0 asin.0 asinh.0 atan.0 atan2.0 atanh.0 ceil.0 \ 132 cos.0 cosh.0 erf.0 exp.0 fabs.0 floor.0 fmod.0 hypot.0 ieee.0 \ 133 infnan.0 j0.0 lgamma.0 math.0 rint.0 sin.0 sinh.0 sqrt.0 \ 134 tan.0 tanh.0 135 136 MLINKS+=erf.3 erfc.3 137 MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3 138 MLINKS+=hypot.3 cabs.3 139 MLINKS+=ieee.3 copysign.3 ieee.3 drem.3 ieee.3 finite.3 ieee.3 logb.3 \ 140 ieee.3 scalb.3 141 MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 yn.3 142 MLINKS+=lgamma.3 gamma.3 143 144 # can't use the standard mkdep, because there are some .s files that 145 # are using '#' as a comment indicator and cpp thinks it's an undefined 146 # control. 147 148 depend: .depend 149 .depend: ${SRCS} 150 mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c} 151 152 .include <bsd.lib.mk> 153 154 .s.o: 155 ${AS} -o ${.TARGET} ${.IMPSRC} 156 @${LD} -x -r ${.TARGET} 157 @mv a.out ${.TARGET} 158 159 .s.po: 160 sed -f ${.CURDIR}/${HARDWARE}/mcount.sed ${.IMPSRC} | \ 161 ${AS} -o ${.TARGET} 162 @${LD} -X -r ${.TARGET} 163 @mv a.out ${.TARGET} 164