Makefile revision 130775
1139825Simp# @(#)Makefile 5.1beta 93/09/24 21541Srgrimes# $FreeBSD: head/lib/msun/Makefile 130775 2004-06-20 10:42:23Z stefanf $ 31541Srgrimes# 41541Srgrimes# ==================================================== 51541Srgrimes# Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 61541Srgrimes# 71541Srgrimes# Developed at SunPro, a Sun Microsystems, Inc. business. 81541Srgrimes# Permission to use, copy, modify, and distribute this 91541Srgrimes# software is freely granted, provided that this notice 101541Srgrimes# is preserved. 111541Srgrimes# ==================================================== 121541Srgrimes# 131541Srgrimes# 141541Srgrimes 151541Srgrimes# 161541Srgrimes# There are two options in making libm at fdlibm compile time: 171541Srgrimes# _IEEE_LIBM --- IEEE libm; smaller, and somewhat faster 181541Srgrimes# _MULTI_LIBM --- Support multi-standard at runtime by 191541Srgrimes# imposing wrapper functions defined in 201541Srgrimes# math.h: 211541Srgrimes# _IEEE_MODE -- IEEE 221541Srgrimes# _XOPEN_MODE -- X/OPEN 231541Srgrimes# _POSIX_MODE -- POSIX/ANSI 241541Srgrimes# _SVID3_MODE -- SVID 251541Srgrimes# 261541Srgrimes# Here is how to set up CFLAGS to create the desired libm at 271541Srgrimes# compile time: 281541Srgrimes# 291541Srgrimes# CFLAGS = -D_IEEE_LIBM ... IEEE libm (recommended) 3050477Speter# CFLAGS = -D_SVID3_MODE ... Multi-standard supported 311541Srgrimes# libm with SVID as the 321541Srgrimes# default standard 332165Spaul# CFLAGS = -D_XOPEN_MODE ... Multi-standard supported 3459774Sbde# libm with XOPEN as the 352165Spaul# default standard 36255219Spjd# CFLAGS = -D_POSIX_MODE ... Multi-standard supported 37126590Sbde# libm with POSIX as the 38133741Sjmg# default standard 39168355Srwatson# CFLAGS = ... Multi-standard supported 40137804Sphk# libm with IEEE as the 41168355Srwatson# default standard 4241086Struckman# 43126593Sbde 44126593Sbde.if ${MACHINE_ARCH} == "alpha" 45247602SpjdARCH_SRCS = s_copysign.S s_copysignf.S 46247602Spjd# XXX Comment from NetBSD/Alpha: 47247602Spjd# XXX LINT SIGFPEs in e_exp.c's strtod(). FP underflow/denorm software 48247602Spjd# handling is broken (doesn't exist!) on the Alpha port. 49254479Spjd# Stock gcc 2.7.2.1 doesn't understand these options. 50247602Spjd#CFLAGS += -mtrap-precision=i -mfp-trap-mode=su 51247602Spjd.elif ${MACHINE_ARCH} == "i386" 52247602SpjdARCH= i387 53247602SpjdARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \ 54247602Spjd e_remainder.S e_scalb.S e_sqrt.S s_atan.S s_ceil.S s_copysign.S \ 55247602Spjd s_cos.S s_finite.S s_floor.S s_logb.S \ 56247602Spjd s_rint.S s_scalbn.S s_significand.S s_sin.S s_tan.S 57247602Spjd# Broken: 58247602Spjd# ARCH_SRCS+= s_log1p.S 59247602Spjd.endif 60247602Spjd 61247602SpjdARCH?= ${MACHINE_ARCH} 621541Srgrimes 631541Srgrimes.PATH: ${.CURDIR}/bsdsrc 641541Srgrimes.PATH: ${.CURDIR}/man 651541Srgrimes.PATH: ${.CURDIR}/src 66126591Sbde 671541SrgrimesCFLAGS+= -D_IEEE_LIBM 681541Srgrimes 69247602SpjdLIB= m 701541SrgrimesSHLIBDIR?= /lib 711541SrgrimesCOMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ 7251649Sphk e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \ 731541Srgrimes e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \ 74126591Sbde e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \ 7589306Salfred e_gammaf_r.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \ 7689306Salfred e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \ 771541Srgrimes e_log.c e_log10.c e_log10f.c e_logf.c e_pow.c e_powf.c e_rem_pio2.c \ 78138838Sphk e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \ 79138838Sphk e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c fenv.c \ 80168355Srwatson k_cos.c k_cosf.c k_rem_pio2.c k_rem_pio2f.c k_sin.c k_sinf.c \ 81133741Sjmg k_standard.c k_tan.c k_tanf.c \ 82115702Stegge s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_cbrt.c s_cbrtf.c s_ceil.c \ 83115702Stegge s_ceilf.c s_copysign.c s_copysignf.c s_cos.c s_cosf.c s_erf.c s_erff.c \ 841541Srgrimes s_expm1.c s_expm1f.c s_fabsf.c s_finite.c s_finitef.c \ 851541Srgrimes s_floor.c s_floorf.c s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ 861541Srgrimes s_isnanf.c s_ldexpf.c s_lib_version.c s_log1p.c \ 87115702Stegge s_log1pf.c s_logb.c s_logbf.c s_matherr.c s_modff.c \ 88115702Stegge s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_round.c s_roundf.c \ 89126591Sbde s_scalbln.c s_scalbn.c s_scalbnf.c \ 90115702Stegge s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c s_tan.c \ 91115702Stegge s_tanf.c s_tanh.c s_tanhf.c s_trunc.c s_truncf.c \ 92115702Stegge w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_asin.c w_asinf.c w_atan2.c \ 93115702Stegge w_atan2f.c w_atanh.c w_atanhf.c w_cabs.c w_cabsf.c w_cosh.c w_coshf.c \ 94115702Stegge w_drem.c w_dremf.c w_exp.c w_expf.c w_fmod.c w_fmodf.c w_gamma.c \ 95115702Stegge w_gamma_r.c w_gammaf.c w_gammaf_r.c w_hypot.c w_hypotf.c w_j0.c \ 96115702Stegge w_j0f.c w_j1.c w_j1f.c w_jn.c w_jnf.c w_lgamma.c w_lgamma_r.c \ 97115702Stegge w_lgammaf.c w_lgammaf_r.c w_log.c w_log10.c w_log10f.c w_logf.c \ 98115702Stegge w_pow.c w_powf.c w_remainder.c w_remainderf.c w_scalb.c w_scalbf.c \ 99115702Stegge w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c \ 100126591Sbde w_y0.c w_y0f.c w_y1.c w_y1f.c w_yn.c w_ynf.c 101115702Stegge 102115702Stegge# Location of fpmath.h and _fpmath.h 103115702SteggeLIBCDIR= ${.CURDIR}/../libc 104115702SteggeCFLAGS+= -I${LIBCDIR}/include -I${LIBCDIR}/${MACHINE_ARCH} 105115702Stegge 1061541Srgrimes# C99 long double functions 1071541SrgrimesCOMMON_SRCS+= s_copysignl.c s_fabsl.c 108246912Spjd 1091541Srgrimes# C99 complex functions 11055205SpeterCOMMON_SRCS+= s_cimag.c s_cimagf.c s_cimagl.c s_conj.c s_conjf.c s_conjl.c \ 11189306Salfred s_creal.c s_crealf.c s_creall.c 112247602Spjd 113247602Spjd# FreeBSD's C library supplies these functions: 114247602Spjd#COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c 115247602Spjd 116247602Spjd# Exclude the generic versions of what we provide in the MD area. 11789306Salfred.PATH: ${.CURDIR}/${ARCH} 118168355Srwatson.if defined(ARCH_SRCS) 119168355Srwatson.for i in ${ARCH_SRCS} 120168355SrwatsonCOMMON_SRCS:= ${COMMON_SRCS:N${i:R}.c} 121168355Srwatson.endfor 122168355Srwatson.endif 123168355Srwatson 124168355SrwatsonSRCS= ${COMMON_SRCS} ${ARCH_SRCS} 125137804Sphk 126168355SrwatsonINCS= fenv.h math.h 127168355Srwatson 128168355SrwatsonMAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \ 129168355Srwatson cos.3 cosh.3 erf.3 exp.3 fabs.3 feclearexcept.3 fegetenv.3 \ 130237072Spjd fegetround.3 fenv.3 floor.3 fmod.3 hypot.3 ieee.3 \ 131137804Sphk ieee_test.3 j0.3 lgamma.3 math.3 rint.3 round.3 sin.3 sinh.3 sqrt.3 \ 132122514Sjhb tan.3 tanh.3 trunc.3 133122514Sjhb 134247602SpjdMLINKS+=acos.3 acosf.3 135247602SpjdMLINKS+=acosh.3 acoshf.3 136247736SpjdMLINKS+=asin.3 asinf.3 137247602SpjdMLINKS+=asinh.3 asinhf.3 138247602SpjdMLINKS+=atan.3 atanf.3 139126591SbdeMLINKS+=atanh.3 atanhf.3 140247602SpjdMLINKS+=atan2.3 atan2f.3 141247602SpjdMLINKS+=ceil.3 ceilf.3 142237033SpjdMLINKS+=cos.3 cosf.3 143237033SpjdMLINKS+=cosh.3 coshf.3 144220245SkibMLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3 145219999SkibMLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3 \ 146223694Sjonathan exp.3 expf.3 exp.3 exp10.3 exp.3 exp10f.3 \ 147247602Spjd exp.3 expm1f.3 exp.3 logf.3 exp.3 powf.3 \ 148247602Spjd exp.3 log10f.3 exp.3 log1pf.3 149126591SbdeMLINKS+=fabs.3 fabsf.3 fabs.3 fabsl.3 150249480SmjgMLINKS+=feclearexcept.3 fegetexceptflag.3 feclearexcept.3 feraiseexcept.3 \ 15192719Salfred feclearexcept.3 fesetexceptflag.3 feclearexcept.3 fetestexcept.3 152126590SbdeMLINKS+=fegetenv.3 feholdexcept.3 fegetenv.3 fesetenv.3 \ 153137355Sphk fegetenv.3 feupdateenv.3 15492719SalfredMLINKS+=fegetround.3 fesetround.3 155108522SalfredMLINKS+=floor.3 floorf.3 156268345SmjgMLINKS+=fmod.3 fmodf.3 157247602SpjdMLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 hypotf.3 158108520SalfredMLINKS+=ieee.3 copysign.3 ieee.3 copysignf.3 ieee.3 copysignl.3 \ 159108520Salfred ieee.3 finite.3 ieee.3 finitef.3 \ 160115702Stegge ieee.3 ilogb.3 ieee.3 ilogbf.3 ieee.3 nextafter.3 ieee.3 nextafterf.3 \ 161126591Sbde ieee.3 remainder.3 ieee.3 remainderf.3 \ 162126591Sbde ieee.3 scalbln.3 ieee.3 scalblnf.3 ieee.3 scalbn.3 ieee.3 scalbnf.3 163255219SpjdMLINKS+=ieee_test.3 logb.3 ieee_test.3 logbf.3 164224778SrwatsonMLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3 165138835SphkMLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3 166126590SbdeMLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 167115702SteggeMLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3 168192080SjeffMLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 lgamma.3 tgamma.3 169255219SpjdMLINKS+=rint.3 rintf.3 170247602SpjdMLINKS+=round.3 roundf.3 171192080SjeffMLINKS+=sin.3 sinf.3 172192080SjeffMLINKS+=sinh.3 sinhf.3 17389969SalfredMLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3 174100072SmarkmMLINKS+=tan.3 tanf.3 17589969SalfredMLINKS+=tanh.3 tanhf.3 17689969SalfredMLINKS+=trunc.3 truncf.3 177237081Spjd 178237081Spjd.include <bsd.lib.mk> 179268338Smjg