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