home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / lib / libm / Makefile next >
Encoding:
Makefile  |  1992-12-02  |  4.8 KB  |  163 lines

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