1# Copyright (C) 2008 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15 16LOCAL_PATH:= $(call my-dir) 17 18# 19# Common definitions. 20# 21 22include $(CLEAR_VARS) 23 24src_files := \ 25 ucln_in.c decContext.c \ 26 ulocdata.c utmscale.c decNumber.c 27 28src_files += \ 29 indiancal.cpp dtptngen.cpp dtrule.cpp \ 30 persncal.cpp rbtz.cpp reldtfmt.cpp \ 31 taiwncal.cpp tzrule.cpp tztrans.cpp \ 32 udatpg.cpp vtzone.cpp \ 33 anytrans.cpp astro.cpp buddhcal.cpp \ 34 basictz.cpp calendar.cpp casetrn.cpp \ 35 choicfmt.cpp coleitr.cpp coll.cpp \ 36 collation.cpp \ 37 collationbasedatabuilder.cpp collationbuilder.cpp \ 38 collationcompare.cpp collationdata.cpp \ 39 collationdatabuilder.cpp collationdatareader.cpp \ 40 collationdatawriter.cpp collationfastlatin.cpp \ 41 collationfastlatinbuilder.cpp collationfcd.cpp \ 42 collationiterator.cpp collationkeys.cpp collationroot.cpp \ 43 collationrootelements.cpp collationruleparser.cpp \ 44 collationsets.cpp collationsettings.cpp \ 45 collationtailoring.cpp collationweights.cpp \ 46 compactdecimalformat.cpp \ 47 cpdtrans.cpp csdetect.cpp csmatch.cpp \ 48 csr2022.cpp csrecog.cpp csrmbcs.cpp \ 49 csrsbcs.cpp csrucode.cpp csrutf8.cpp \ 50 curramt.cpp currfmt.cpp currunit.cpp \ 51 dangical.cpp \ 52 datefmt.cpp dcfmtsym.cpp decimfmt.cpp \ 53 decimalformatpattern.cpp \ 54 digitlst.cpp dtfmtsym.cpp esctrn.cpp \ 55 filteredbrk.cpp \ 56 fmtable_cnv.cpp fmtable.cpp format.cpp \ 57 funcrepl.cpp gender.cpp \ 58 gregocal.cpp gregoimp.cpp \ 59 hebrwcal.cpp identifier_info.cpp \ 60 inputext.cpp islamcal.cpp \ 61 japancal.cpp measfmt.cpp measunit.cpp \ 62 measure.cpp \ 63 msgfmt.cpp name2uni.cpp nfrs.cpp \ 64 nfrule.cpp nfsubs.cpp nortrans.cpp \ 65 nultrans.cpp numfmt.cpp olsontz.cpp \ 66 quant.cpp quantityformatter.cpp \ 67 rbnf.cpp rbt.cpp \ 68 rbt_data.cpp rbt_pars.cpp rbt_rule.cpp \ 69 rbt_set.cpp regexcmp.cpp regexst.cpp \ 70 regeximp.cpp region.cpp \ 71 rematch.cpp remtrans.cpp repattrn.cpp \ 72 rulebasedcollator.cpp \ 73 scriptset.cpp \ 74 search.cpp simpletz.cpp smpdtfmt.cpp \ 75 sortkey.cpp strmatch.cpp strrepl.cpp \ 76 stsearch.cpp timezone.cpp \ 77 titletrn.cpp tolowtrn.cpp toupptrn.cpp \ 78 translit.cpp transreg.cpp tridpars.cpp \ 79 ucal.cpp \ 80 ucol.cpp ucoleitr.cpp \ 81 ucol_res.cpp ucol_sit.cpp \ 82 ucsdet.cpp ucurr.cpp udat.cpp \ 83 uitercollationiterator.cpp \ 84 umsg.cpp unesctrn.cpp uni2name.cpp \ 85 unum.cpp uregexc.cpp uregex.cpp \ 86 usearch.cpp \ 87 utf16collationiterator.cpp \ 88 utf8collationiterator.cpp \ 89 utrans.cpp windtfmt.cpp \ 90 winnmfmt.cpp zonemeta.cpp \ 91 numsys.cpp chnsecal.cpp \ 92 cecal.cpp coptccal.cpp ethpccal.cpp \ 93 brktrans.cpp wintzimpl.cpp plurrule.cpp \ 94 plurfmt.cpp dtitvfmt.cpp dtitvinf.cpp \ 95 tmunit.cpp tmutamt.cpp tmutfmt.cpp \ 96 currpinf.cpp uspoof.cpp uspoof_impl.cpp \ 97 uspoof_build.cpp \ 98 regextxt.cpp selfmt.cpp uspoof_conf.cpp \ 99 uspoof_wsconf.cpp ztrans.cpp zrule.cpp \ 100 vzone.cpp fphdlimp.cpp fpositer.cpp\ 101 locdspnm.cpp \ 102 alphaindex.cpp bocsu.cpp decfmtst.cpp \ 103 smpdtfst.cpp smpdtfst.h tzfmt.cpp \ 104 tzgnames.cpp tznames.cpp tznames_impl.cpp \ 105 udateintervalformat.cpp upluralrules.cpp 106 107 108c_includes = \ 109 $(LOCAL_PATH) \ 110 $(LOCAL_PATH)/../common 111 112local_cflags := -D_REENTRANT 113local_cflags += -DU_I18N_IMPLEMENTATION 114local_cflags += -O3 -fvisibility=hidden 115 116 117# 118# Build for the target (device). 119# 120 121include $(CLEAR_VARS) 122LOCAL_SRC_FILES += $(src_files) 123LOCAL_C_INCLUDES += $(c_includes) $(optional_android_logging_includes) 124LOCAL_CFLAGS += $(local_cflags) -DPIC -fPIC 125LOCAL_SHARED_LIBRARIES += libicuuc $(optional_android_logging_libraries) 126LOCAL_MODULE_TAGS := optional 127LOCAL_MODULE := libicui18n 128LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk 129# Use "-include" to not fail apps_only build. 130-include abi/cpp/use_rtti.mk 131-include external/stlport/libstlport.mk 132include $(BUILD_SHARED_LIBRARY) 133 134 135# 136# Build for the host. 137# 138 139include $(CLEAR_VARS) 140LOCAL_SRC_FILES += $(src_files) 141LOCAL_C_INCLUDES += $(c_includes) $(optional_android_logging_includes) 142LOCAL_CFLAGS += $(local_cflags) 143LOCAL_SHARED_LIBRARIES += libicuuc-host $(optional_android_logging_libraries) 144LOCAL_LDLIBS += -lm -lpthread 145LOCAL_MODULE_TAGS := optional 146LOCAL_MODULE := libicui18n-host 147LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk 148LOCAL_MULTILIB := both 149include $(BUILD_HOST_SHARED_LIBRARY) 150 151# 152# Build as a static library against the NDK 153# 154 155include $(CLEAR_VARS) 156LOCAL_SDK_VERSION := 9 157LOCAL_NDK_STL_VARIANT := stlport_static 158LOCAL_SRC_FILES += $(src_files) 159LOCAL_C_INCLUDES += $(c_includes) $(optional_android_logging_includes) 160LOCAL_SHARED_LIBRARIES += $(optional_android_logging_libraries) 161LOCAL_STATIC_LIBRARIES += libicuuc_static 162LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH) 163LOCAL_CPP_FEATURES := rtti 164LOCAL_CFLAGS += $(local_cflags) -DPIC -fPIC -frtti 165# Using -Os over -O3 actually cuts down the final executable size by a few dozen kilobytes 166LOCAL_CFLAGS += -Os 167LOCAL_EXPORT_CFLAGS += -DU_STATIC_IMPLEMENTATION=1 168LOCAL_MODULE_TAGS := optional 169LOCAL_MODULE := libicui18n_static 170include $(BUILD_STATIC_LIBRARY) 171