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