Home | History | Annotate | Download | only in libm
      1 LOCAL_PATH:= $(call my-dir)
      2 
      3 # TODO: these come from from upstream's libc, not libm!
      4 libm_common_src_files := \
      5     digittoint.c  \
      6     fpclassify.c \
      7     isinf.c  \
      8 
      9 # TODO: this is not in the BSDs.
     10 libm_common_src_files += \
     11     sincos.c \
     12 
     13 libm_common_src_files += \
     14     upstream-freebsd/lib/msun/bsdsrc/b_exp.c \
     15     upstream-freebsd/lib/msun/bsdsrc/b_log.c \
     16     upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \
     17     upstream-freebsd/lib/msun/src/e_acos.c \
     18     upstream-freebsd/lib/msun/src/e_acosf.c \
     19     upstream-freebsd/lib/msun/src/e_acosh.c \
     20     upstream-freebsd/lib/msun/src/e_acoshf.c \
     21     upstream-freebsd/lib/msun/src/e_asin.c \
     22     upstream-freebsd/lib/msun/src/e_asinf.c \
     23     upstream-freebsd/lib/msun/src/e_atan2.c \
     24     upstream-freebsd/lib/msun/src/e_atan2f.c \
     25     upstream-freebsd/lib/msun/src/e_atanh.c \
     26     upstream-freebsd/lib/msun/src/e_atanhf.c \
     27     upstream-freebsd/lib/msun/src/e_cosh.c \
     28     upstream-freebsd/lib/msun/src/e_coshf.c \
     29     upstream-freebsd/lib/msun/src/e_exp.c \
     30     upstream-freebsd/lib/msun/src/e_expf.c \
     31     upstream-freebsd/lib/msun/src/e_fmod.c \
     32     upstream-freebsd/lib/msun/src/e_fmodf.c \
     33     upstream-freebsd/lib/msun/src/e_gamma.c \
     34     upstream-freebsd/lib/msun/src/e_gammaf.c \
     35     upstream-freebsd/lib/msun/src/e_gammaf_r.c \
     36     upstream-freebsd/lib/msun/src/e_gamma_r.c \
     37     upstream-freebsd/lib/msun/src/e_hypot.c \
     38     upstream-freebsd/lib/msun/src/e_hypotf.c \
     39     upstream-freebsd/lib/msun/src/e_j0.c \
     40     upstream-freebsd/lib/msun/src/e_j0f.c \
     41     upstream-freebsd/lib/msun/src/e_j1.c \
     42     upstream-freebsd/lib/msun/src/e_j1f.c \
     43     upstream-freebsd/lib/msun/src/e_jn.c \
     44     upstream-freebsd/lib/msun/src/e_jnf.c \
     45     upstream-freebsd/lib/msun/src/e_lgamma.c \
     46     upstream-freebsd/lib/msun/src/e_lgammaf.c \
     47     upstream-freebsd/lib/msun/src/e_lgammaf_r.c \
     48     upstream-freebsd/lib/msun/src/e_lgamma_r.c \
     49     upstream-freebsd/lib/msun/src/e_log10.c \
     50     upstream-freebsd/lib/msun/src/e_log10f.c \
     51     upstream-freebsd/lib/msun/src/e_log2.c \
     52     upstream-freebsd/lib/msun/src/e_log2f.c \
     53     upstream-freebsd/lib/msun/src/e_log.c \
     54     upstream-freebsd/lib/msun/src/e_logf.c \
     55     upstream-freebsd/lib/msun/src/e_pow.c \
     56     upstream-freebsd/lib/msun/src/e_powf.c \
     57     upstream-freebsd/lib/msun/src/e_remainder.c \
     58     upstream-freebsd/lib/msun/src/e_remainderf.c \
     59     upstream-freebsd/lib/msun/src/e_rem_pio2.c \
     60     upstream-freebsd/lib/msun/src/e_rem_pio2f.c \
     61     upstream-freebsd/lib/msun/src/e_scalb.c \
     62     upstream-freebsd/lib/msun/src/e_scalbf.c \
     63     upstream-freebsd/lib/msun/src/e_sinh.c \
     64     upstream-freebsd/lib/msun/src/e_sinhf.c \
     65     upstream-freebsd/lib/msun/src/e_sqrt.c \
     66     upstream-freebsd/lib/msun/src/e_sqrtf.c \
     67     upstream-freebsd/lib/msun/src/k_cos.c \
     68     upstream-freebsd/lib/msun/src/k_cosf.c \
     69     upstream-freebsd/lib/msun/src/k_exp.c \
     70     upstream-freebsd/lib/msun/src/k_expf.c \
     71     upstream-freebsd/lib/msun/src/k_rem_pio2.c \
     72     upstream-freebsd/lib/msun/src/k_sin.c \
     73     upstream-freebsd/lib/msun/src/k_sinf.c \
     74     upstream-freebsd/lib/msun/src/k_tan.c \
     75     upstream-freebsd/lib/msun/src/k_tanf.c \
     76     upstream-freebsd/lib/msun/src/s_asinh.c \
     77     upstream-freebsd/lib/msun/src/s_asinhf.c \
     78     upstream-freebsd/lib/msun/src/s_atan.c \
     79     upstream-freebsd/lib/msun/src/s_atanf.c \
     80     upstream-freebsd/lib/msun/src/s_carg.c \
     81     upstream-freebsd/lib/msun/src/s_cargf.c \
     82     upstream-freebsd/lib/msun/src/s_cbrt.c \
     83     upstream-freebsd/lib/msun/src/s_cbrtf.c \
     84     upstream-freebsd/lib/msun/src/s_ccosh.c \
     85     upstream-freebsd/lib/msun/src/s_ccoshf.c \
     86     upstream-freebsd/lib/msun/src/s_ceil.c \
     87     upstream-freebsd/lib/msun/src/s_ceilf.c \
     88     upstream-freebsd/lib/msun/src/s_cexp.c \
     89     upstream-freebsd/lib/msun/src/s_cexpf.c \
     90     upstream-freebsd/lib/msun/src/s_cimag.c \
     91     upstream-freebsd/lib/msun/src/s_cimagf.c \
     92     upstream-freebsd/lib/msun/src/s_conj.c \
     93     upstream-freebsd/lib/msun/src/s_conjf.c \
     94     upstream-freebsd/lib/msun/src/s_copysign.c \
     95     upstream-freebsd/lib/msun/src/s_copysignf.c \
     96     upstream-freebsd/lib/msun/src/s_cos.c \
     97     upstream-freebsd/lib/msun/src/s_cosf.c \
     98     upstream-freebsd/lib/msun/src/s_cproj.c \
     99     upstream-freebsd/lib/msun/src/s_cprojf.c \
    100     upstream-freebsd/lib/msun/src/s_creal.c \
    101     upstream-freebsd/lib/msun/src/s_crealf.c \
    102     upstream-freebsd/lib/msun/src/s_csinh.c \
    103     upstream-freebsd/lib/msun/src/s_csinhf.c \
    104     upstream-freebsd/lib/msun/src/s_csqrt.c \
    105     upstream-freebsd/lib/msun/src/s_csqrtf.c \
    106     upstream-freebsd/lib/msun/src/s_ctanh.c \
    107     upstream-freebsd/lib/msun/src/s_ctanhf.c \
    108     upstream-freebsd/lib/msun/src/s_erf.c \
    109     upstream-freebsd/lib/msun/src/s_erff.c \
    110     upstream-freebsd/lib/msun/src/s_exp2.c \
    111     upstream-freebsd/lib/msun/src/s_exp2f.c \
    112     upstream-freebsd/lib/msun/src/s_expm1.c \
    113     upstream-freebsd/lib/msun/src/s_expm1f.c \
    114     upstream-freebsd/lib/msun/src/s_fabs.c \
    115     upstream-freebsd/lib/msun/src/s_fabsf.c \
    116     upstream-freebsd/lib/msun/src/s_fdim.c \
    117     upstream-freebsd/lib/msun/src/s_finite.c \
    118     upstream-freebsd/lib/msun/src/s_finitef.c \
    119     upstream-freebsd/lib/msun/src/s_floor.c \
    120     upstream-freebsd/lib/msun/src/s_floorf.c \
    121     upstream-freebsd/lib/msun/src/s_fma.c \
    122     upstream-freebsd/lib/msun/src/s_fmaf.c \
    123     upstream-freebsd/lib/msun/src/s_fmax.c \
    124     upstream-freebsd/lib/msun/src/s_fmaxf.c \
    125     upstream-freebsd/lib/msun/src/s_fmin.c \
    126     upstream-freebsd/lib/msun/src/s_fminf.c \
    127     upstream-freebsd/lib/msun/src/s_frexp.c \
    128     upstream-freebsd/lib/msun/src/s_frexpf.c \
    129     upstream-freebsd/lib/msun/src/s_ilogb.c \
    130     upstream-freebsd/lib/msun/src/s_ilogbf.c \
    131     upstream-freebsd/lib/msun/src/s_isfinite.c \
    132     upstream-freebsd/lib/msun/src/s_isnan.c \
    133     upstream-freebsd/lib/msun/src/s_isnormal.c \
    134     upstream-freebsd/lib/msun/src/s_llrint.c \
    135     upstream-freebsd/lib/msun/src/s_llrintf.c \
    136     upstream-freebsd/lib/msun/src/s_llround.c \
    137     upstream-freebsd/lib/msun/src/s_llroundf.c \
    138     upstream-freebsd/lib/msun/src/s_log1p.c \
    139     upstream-freebsd/lib/msun/src/s_log1pf.c \
    140     upstream-freebsd/lib/msun/src/s_logb.c \
    141     upstream-freebsd/lib/msun/src/s_logbf.c \
    142     upstream-freebsd/lib/msun/src/s_lrint.c \
    143     upstream-freebsd/lib/msun/src/s_lrintf.c \
    144     upstream-freebsd/lib/msun/src/s_lround.c \
    145     upstream-freebsd/lib/msun/src/s_lroundf.c \
    146     upstream-freebsd/lib/msun/src/s_modf.c \
    147     upstream-freebsd/lib/msun/src/s_modff.c \
    148     upstream-freebsd/lib/msun/src/s_nan.c \
    149     upstream-freebsd/lib/msun/src/s_nearbyint.c \
    150     upstream-freebsd/lib/msun/src/s_nextafter.c \
    151     upstream-freebsd/lib/msun/src/s_nextafterf.c \
    152     upstream-freebsd/lib/msun/src/s_nexttowardf.c \
    153     upstream-freebsd/lib/msun/src/s_remquo.c \
    154     upstream-freebsd/lib/msun/src/s_remquof.c \
    155     upstream-freebsd/lib/msun/src/s_rint.c \
    156     upstream-freebsd/lib/msun/src/s_rintf.c \
    157     upstream-freebsd/lib/msun/src/s_round.c \
    158     upstream-freebsd/lib/msun/src/s_roundf.c \
    159     upstream-freebsd/lib/msun/src/s_scalbln.c \
    160     upstream-freebsd/lib/msun/src/s_scalbn.c \
    161     upstream-freebsd/lib/msun/src/s_scalbnf.c \
    162     upstream-freebsd/lib/msun/src/s_signbit.c \
    163     upstream-freebsd/lib/msun/src/s_signgam.c \
    164     upstream-freebsd/lib/msun/src/s_significand.c \
    165     upstream-freebsd/lib/msun/src/s_significandf.c \
    166     upstream-freebsd/lib/msun/src/s_sin.c \
    167     upstream-freebsd/lib/msun/src/s_sinf.c \
    168     upstream-freebsd/lib/msun/src/s_tan.c \
    169     upstream-freebsd/lib/msun/src/s_tanf.c \
    170     upstream-freebsd/lib/msun/src/s_tanh.c \
    171     upstream-freebsd/lib/msun/src/s_tanhf.c \
    172     upstream-freebsd/lib/msun/src/s_tgammaf.c \
    173     upstream-freebsd/lib/msun/src/s_trunc.c \
    174     upstream-freebsd/lib/msun/src/s_truncf.c \
    175     upstream-freebsd/lib/msun/src/w_cabs.c \
    176     upstream-freebsd/lib/msun/src/w_cabsf.c \
    177     upstream-freebsd/lib/msun/src/w_drem.c \
    178     upstream-freebsd/lib/msun/src/w_dremf.c \
    179 
    180 libm_common_src_files += fake_long_double.c
    181 
    182 # TODO: on Android, "long double" is "double".
    183 #    upstream-freebsd/lib/msun/src/e_acosl.c \
    184 #    upstream-freebsd/lib/msun/src/e_asinl.c \
    185 #    upstream-freebsd/lib/msun/src/e_atan2l.c \
    186 #    upstream-freebsd/lib/msun/src/e_fmodl.c \
    187 #    upstream-freebsd/lib/msun/src/e_hypotl.c \
    188 #    upstream-freebsd/lib/msun/src/e_remainderl.c \
    189 #    upstream-freebsd/lib/msun/src/e_sqrtl.c \
    190 #    upstream-freebsd/lib/msun/src/s_atanl.c \
    191 #    upstream-freebsd/lib/msun/src/s_cbrtl.c \
    192 #    upstream-freebsd/lib/msun/src/s_ceill.c \
    193 #    upstream-freebsd/lib/msun/src/s_copysignl.c \
    194 #    upstream-freebsd/lib/msun/src/s_cosl.c \
    195 #    upstream-freebsd/lib/msun/src/s_fabsl.c \
    196 #    upstream-freebsd/lib/msun/src/s_floorl.c \
    197 #    upstream-freebsd/lib/msun/src/s_fmal.c \
    198 #    upstream-freebsd/lib/msun/src/s_fmaxl.c \
    199 #    upstream-freebsd/lib/msun/src/s_fminl.c \
    200 #    upstream-freebsd/lib/msun/src/s_frexpl.c \
    201 #    upstream-freebsd/lib/msun/src/s_ilogbl.c \
    202 #    upstream-freebsd/lib/msun/src/s_llrintl.c \
    203 #    upstream-freebsd/lib/msun/src/s_llroundl.c \
    204 #    upstream-freebsd/lib/msun/src/s_logbl.c \
    205 #    upstream-freebsd/lib/msun/src/s_lrintl.c \
    206 #    upstream-freebsd/lib/msun/src/s_lroundl.c \
    207 #    upstream-freebsd/lib/msun/src/s_modfl.c \
    208 #    upstream-freebsd/lib/msun/src/s_nextafterl.c \
    209 #    upstream-freebsd/lib/msun/src/s_nexttoward.c \
    210 #    upstream-freebsd/lib/msun/src/s_remquol.c \
    211 #    upstream-freebsd/lib/msun/src/s_rintl.c \
    212 #    upstream-freebsd/lib/msun/src/s_roundl.c \
    213 #    upstream-freebsd/lib/msun/src/s_scalbnl.c \
    214 #    upstream-freebsd/lib/msun/src/s_sinl.c \
    215 #    upstream-freebsd/lib/msun/src/s_tanl.c \
    216 #    upstream-freebsd/lib/msun/src/s_truncl.c \
    217 
    218 # TODO: re-enable i387/e_sqrtf.S for x86, and maybe others.
    219 
    220 libm_common_cflags := -DFLT_EVAL_METHOD=0
    221 libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
    222 
    223 libm_arm_includes := $(LOCAL_PATH)/arm
    224 libm_arm_src_files := arm/fenv.c
    225 
    226 libm_x86_includes := $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387
    227 libm_x86_src_files := i387/fenv.c
    228 
    229 libm_mips_cflags := -fno-builtin-rintf -fno-builtin-rint
    230 libm_mips_includes := $(LOCAL_PATH)/mips
    231 libm_mips_src_files := mips/fenv.c
    232 
    233 #
    234 # libm.a for target.
    235 #
    236 include $(CLEAR_VARS)
    237 LOCAL_MODULE:= libm
    238 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
    239 LOCAL_ARM_MODE := arm
    240 LOCAL_CFLAGS := $(libm_common_cflags) $(libm_$(TARGET_ARCH)_cflags)
    241 LOCAL_C_INCLUDES += $(libm_common_includes) $(libm_$(TARGET_ARCH)_includes)
    242 LOCAL_SRC_FILES := $(libm_common_src_files) $(libm_$(TARGET_ARCH)_src_files)
    243 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
    244 include $(BUILD_STATIC_LIBRARY)
    245 
    246 #
    247 # libm.so for target.
    248 #
    249 include $(CLEAR_VARS)
    250 LOCAL_MODULE:= libm
    251 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
    252 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
    253 LOCAL_WHOLE_STATIC_LIBRARIES := libm
    254 include $(BUILD_SHARED_LIBRARY)
    255