1LOCAL_PATH:= $(call my-dir) 2 3libm_common_src_files:= \ 4 isinf.c \ 5 fpclassify.c \ 6 sincos.c \ 7 bsdsrc/b_exp.c \ 8 bsdsrc/b_log.c \ 9 bsdsrc/b_tgamma.c \ 10 src/e_acos.c \ 11 src/e_acosf.c \ 12 src/e_acosh.c \ 13 src/e_acoshf.c \ 14 src/e_asin.c \ 15 src/e_asinf.c \ 16 src/e_atan2.c \ 17 src/e_atan2f.c \ 18 src/e_atanh.c \ 19 src/e_atanhf.c \ 20 src/e_cosh.c \ 21 src/e_coshf.c \ 22 src/e_exp.c \ 23 src/e_expf.c \ 24 src/e_fmod.c \ 25 src/e_fmodf.c \ 26 src/e_gamma.c \ 27 src/e_gamma_r.c \ 28 src/e_gammaf.c \ 29 src/e_gammaf_r.c \ 30 src/e_hypot.c \ 31 src/e_hypotf.c \ 32 src/e_j0.c \ 33 src/e_j0f.c \ 34 src/e_j1.c \ 35 src/e_j1f.c \ 36 src/e_jn.c \ 37 src/e_jnf.c \ 38 src/e_lgamma.c \ 39 src/e_lgamma_r.c \ 40 src/e_lgammaf.c \ 41 src/e_lgammaf_r.c \ 42 src/e_log.c \ 43 src/e_log10.c \ 44 src/e_log10f.c \ 45 src/e_logf.c \ 46 src/e_pow.c \ 47 src/e_powf.c \ 48 src/e_rem_pio2.c \ 49 src/e_rem_pio2f.c \ 50 src/e_remainder.c \ 51 src/e_remainderf.c \ 52 src/e_scalb.c \ 53 src/e_scalbf.c \ 54 src/e_sinh.c \ 55 src/e_sinhf.c \ 56 src/e_sqrt.c \ 57 src/k_cos.c \ 58 src/k_cosf.c \ 59 src/k_rem_pio2.c \ 60 src/k_sin.c \ 61 src/k_sinf.c \ 62 src/k_tan.c \ 63 src/k_tanf.c \ 64 src/s_asinh.c \ 65 src/s_asinhf.c \ 66 src/s_atan.c \ 67 src/s_atanf.c \ 68 src/s_cbrt.c \ 69 src/s_cbrtf.c \ 70 src/s_ceil.c \ 71 src/s_ceilf.c \ 72 src/s_ceill.c \ 73 src/s_copysign.c \ 74 src/s_copysignf.c \ 75 src/s_cos.c \ 76 src/s_cosf.c \ 77 src/s_erf.c \ 78 src/s_erff.c \ 79 src/s_exp2.c \ 80 src/s_exp2f.c \ 81 src/s_expm1.c \ 82 src/s_expm1f.c \ 83 src/s_fabsf.c \ 84 src/s_fdim.c \ 85 src/s_finite.c \ 86 src/s_finitef.c \ 87 src/s_floor.c \ 88 src/s_floorf.c \ 89 src/s_floorl.c \ 90 src/s_fma.c \ 91 src/s_fmaf.c \ 92 src/s_fmax.c \ 93 src/s_fmaxf.c \ 94 src/s_fmaxl.c \ 95 src/s_fmin.c \ 96 src/s_fminf.c \ 97 src/s_fminl.c \ 98 src/s_frexpf.c \ 99 src/s_ilogb.c \ 100 src/s_ilogbf.c \ 101 src/s_ilogbl.c \ 102 src/s_isfinite.c \ 103 src/s_isnormal.c \ 104 src/s_llrint.c \ 105 src/s_llrintf.c \ 106 src/s_llround.c \ 107 src/s_llroundf.c \ 108 src/s_llroundl.c \ 109 src/s_log1p.c \ 110 src/s_log1pf.c \ 111 src/s_logb.c \ 112 src/s_logbf.c \ 113 src/s_lrint.c \ 114 src/s_lrintf.c \ 115 src/s_lround.c \ 116 src/s_lroundf.c \ 117 src/s_lroundl.c \ 118 src/s_modff.c \ 119 src/s_nan.c \ 120 src/s_nearbyint.c \ 121 src/s_nextafter.c \ 122 src/s_nextafterf.c \ 123 src/s_nexttowardf.c \ 124 src/s_remquo.c \ 125 src/s_remquof.c \ 126 src/s_rint.c \ 127 src/s_rintf.c \ 128 src/s_round.c \ 129 src/s_roundf.c \ 130 src/s_roundl.c \ 131 src/s_signbit.c \ 132 src/s_signgam.c \ 133 src/s_significand.c \ 134 src/s_significandf.c \ 135 src/s_sin.c \ 136 src/s_sinf.c \ 137 src/s_tan.c \ 138 src/s_tanf.c \ 139 src/s_tanh.c \ 140 src/s_tanhf.c \ 141 src/s_tgammaf.c \ 142 src/s_trunc.c \ 143 src/s_truncf.c \ 144 src/s_truncl.c \ 145 src/w_drem.c \ 146 src/w_dremf.c \ 147 src/s_copysignl.c \ 148 src/s_fabsl.c \ 149 src/s_fabs.c \ 150 src/s_frexp.c \ 151 src/s_isnan.c \ 152 src/s_modf.c 153 154libm_common_cflags := 155 156ifeq ($(TARGET_ARCH),arm) 157 libm_common_src_files += \ 158 arm/fenv.c \ 159 src/e_ldexpf.c \ 160 src/s_scalbln.c \ 161 src/s_scalbn.c \ 162 src/s_scalbnf.c \ 163 src/e_sqrtf.c 164 165 libm_common_includes = $(LOCAL_PATH)/arm 166endif 167 168ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-x86) 169 libm_common_src_files += \ 170 i387/fenv.c \ 171 i387/s_scalbnl.S \ 172 i387/s_scalbn.S \ 173 i387/s_scalbnf.S \ 174 i387/e_sqrtf.S 175 176 libm_common_includes = $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387 177endif 178ifeq ($(TARGET_ARCH),mips) 179 libm_common_src_files += \ 180 mips/fenv.c \ 181 src/e_ldexpf.c \ 182 src/s_scalbln.c \ 183 src/s_scalbn.c \ 184 src/s_scalbnf.c \ 185 src/e_sqrtf.c 186 187 libm_common_includes = $(LOCAL_PATH)/mips 188 # Need to build *rint* functions 189 libm_common_cflags += -fno-builtin-rintf -fno-builtin-rint 190endif 191 192# libm.a 193# ======================================================== 194 195include $(CLEAR_VARS) 196 197LOCAL_SRC_FILES := \ 198 $(libm_common_src_files) 199 200LOCAL_ARM_MODE := arm 201LOCAL_C_INCLUDES += $(libm_common_includes) 202LOCAL_CFLAGS := $(libm_common_cflags) 203 204LOCAL_MODULE:= libm 205LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 206 207LOCAL_SYSTEM_SHARED_LIBRARIES := libc 208 209include $(BUILD_STATIC_LIBRARY) 210 211# libm.so 212# ======================================================== 213 214include $(CLEAR_VARS) 215 216LOCAL_SRC_FILES := \ 217 $(libm_common_src_files) 218 219LOCAL_ARM_MODE := arm 220 221LOCAL_C_INCLUDES += $(libm_common_includes) 222LOCAL_CFLAGS := $(libm_common_cflags) 223 224LOCAL_MODULE:= libm 225LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 226 227LOCAL_SYSTEM_SHARED_LIBRARIES := libc 228 229include $(BUILD_SHARED_LIBRARY) 230