Home | History | Annotate | Download | only in i18n
      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 //
     16 // Common definitions.
     17 //
     18 
     19 cc_defaults {
     20     name: "libicui18n_defaults",
     21     srcs: [
     22         "decContext.c",
     23         "decNumber.c",
     24         "ucln_in.cpp",
     25         "ulocdata.c",
     26         "utmscale.c",
     27 
     28         "affixpatternparser.cpp",
     29         "alphaindex.cpp",
     30         "anytrans.cpp",
     31         "astro.cpp",
     32         "basictz.cpp",
     33         "bocsu.cpp",
     34         "brktrans.cpp",
     35         "buddhcal.cpp",
     36         "calendar.cpp",
     37         "casetrn.cpp",
     38         "cecal.cpp",
     39         "chnsecal.cpp",
     40         "choicfmt.cpp",
     41         "coleitr.cpp",
     42         "collationbuilder.cpp",
     43         "collationcompare.cpp",
     44         "collation.cpp",
     45         "collationdatabuilder.cpp",
     46         "collationdata.cpp",
     47         "collationdatareader.cpp",
     48         "collationdatawriter.cpp",
     49         "collationfastlatinbuilder.cpp",
     50         "collationfastlatin.cpp",
     51         "collationfcd.cpp",
     52         "collationiterator.cpp",
     53         "collationkeys.cpp",
     54         "collationroot.cpp",
     55         "collationrootelements.cpp",
     56         "collationruleparser.cpp",
     57         "collationsets.cpp",
     58         "collationsettings.cpp",
     59         "collationtailoring.cpp",
     60         "collationweights.cpp",
     61         "coll.cpp",
     62         "compactdecimalformat.cpp",
     63         "coptccal.cpp",
     64         "cpdtrans.cpp",
     65         "csdetect.cpp",
     66         "csmatch.cpp",
     67         "csr2022.cpp",
     68         "csrecog.cpp",
     69         "csrmbcs.cpp",
     70         "csrsbcs.cpp",
     71         "csrucode.cpp",
     72         "csrutf8.cpp",
     73         "curramt.cpp",
     74         "currfmt.cpp",
     75         "currpinf.cpp",
     76         "currunit.cpp",
     77         "dangical.cpp",
     78         "datefmt.cpp",
     79         "dayperiodrules.cpp",
     80         "dcfmtsym.cpp",
     81         "decfmtst.cpp",
     82         "decimalformatpattern.cpp",
     83         "decimfmt.cpp",
     84         "decimfmtimpl.cpp",
     85         "digitaffix.cpp",
     86         "digitaffixesandpadding.cpp",
     87         "digitformatter.cpp",
     88         "digitgrouping.cpp",
     89         "digitinterval.cpp",
     90         "digitlst.cpp",
     91         "dtfmtsym.cpp",
     92         "dtitvfmt.cpp",
     93         "dtitvinf.cpp",
     94         "dtptngen.cpp",
     95         "dtrule.cpp",
     96         "esctrn.cpp",
     97         "ethpccal.cpp",
     98         "fmtable_cnv.cpp",
     99         "fmtable.cpp",
    100         "format.cpp",
    101         "fphdlimp.cpp",
    102         "fpositer.cpp",
    103         "funcrepl.cpp",
    104         "gender.cpp",
    105         "gregocal.cpp",
    106         "gregoimp.cpp",
    107         "hebrwcal.cpp",
    108         "indiancal.cpp",
    109         "inputext.cpp",
    110         "islamcal.cpp",
    111         "japancal.cpp",
    112         "measfmt.cpp",
    113         "measunit.cpp",
    114         "measure.cpp",
    115         "msgfmt.cpp",
    116         "name2uni.cpp",
    117         "nfrs.cpp",
    118         "nfrule.cpp",
    119         "nfsubs.cpp",
    120         "nortrans.cpp",
    121         "nultrans.cpp",
    122         "numfmt.cpp",
    123         "numsys.cpp",
    124         "olsontz.cpp",
    125         "persncal.cpp",
    126         "pluralaffix.cpp",
    127         "plurfmt.cpp",
    128         "plurrule.cpp",
    129         "precision.cpp",
    130         "quant.cpp",
    131         "quantityformatter.cpp",
    132         "rbnf.cpp",
    133         "rbt.cpp",
    134         "rbt_data.cpp",
    135         "rbt_pars.cpp",
    136         "rbt_rule.cpp",
    137         "rbt_set.cpp",
    138         "rbtz.cpp",
    139         "regexcmp.cpp",
    140         "regeximp.cpp",
    141         "regexst.cpp",
    142         "regextxt.cpp",
    143         "region.cpp",
    144         "reldatefmt.cpp",
    145         "reldtfmt.cpp",
    146         "rematch.cpp",
    147         "remtrans.cpp",
    148         "repattrn.cpp",
    149         "rulebasedcollator.cpp",
    150         "scientificnumberformatter.cpp",
    151         "scriptset.cpp",
    152         "search.cpp",
    153         "selfmt.cpp",
    154         "sharedbreakiterator.cpp",
    155         "simpletz.cpp",
    156         "smallintformatter.cpp",
    157         "smpdtfmt.cpp",
    158         "smpdtfst.cpp",
    159         "sortkey.cpp",
    160         "standardplural.cpp",
    161         "strmatch.cpp",
    162         "strrepl.cpp",
    163         "stsearch.cpp",
    164         "taiwncal.cpp",
    165         "timezone.cpp",
    166         "titletrn.cpp",
    167         "tmunit.cpp",
    168         "tmutamt.cpp",
    169         "tmutfmt.cpp",
    170         "tolowtrn.cpp",
    171         "toupptrn.cpp",
    172         "translit.cpp",
    173         "transreg.cpp",
    174         "tridpars.cpp",
    175         "tzfmt.cpp",
    176         "tzgnames.cpp",
    177         "tznames.cpp",
    178         "tznames_impl.cpp",
    179         "tzrule.cpp",
    180         "tztrans.cpp",
    181         "ucal.cpp",
    182         "ucol.cpp",
    183         "ucoleitr.cpp",
    184         "ucol_res.cpp",
    185         "ucol_sit.cpp",
    186         "ucsdet.cpp",
    187         "udat.cpp",
    188         "udateintervalformat.cpp",
    189         "udatpg.cpp",
    190         "ufieldpositer.cpp",
    191         "uitercollationiterator.cpp",
    192         "umsg.cpp",
    193         "unesctrn.cpp",
    194         "uni2name.cpp",
    195         "unum.cpp",
    196         "upluralrules.cpp",
    197         "uregexc.cpp",
    198         "uregex.cpp",
    199         "usearch.cpp",
    200         "uspoof_build.cpp",
    201         "uspoof_conf.cpp",
    202         "uspoof.cpp",
    203         "uspoof_impl.cpp",
    204         "utf16collationiterator.cpp",
    205         "utf8collationiterator.cpp",
    206         "utrans.cpp",
    207         "valueformatter.cpp",
    208         "windtfmt.cpp",
    209         "winnmfmt.cpp",
    210         "wintzimpl.cpp",
    211         "visibledigits.cpp",
    212         "vtzone.cpp",
    213         "vzone.cpp",
    214         "zonemeta.cpp",
    215         "zrule.cpp",
    216         "ztrans.cpp",
    217     ],
    218     cflags: [
    219         "-D_REENTRANT",
    220         "-DU_I18N_IMPLEMENTATION",
    221         "-O3",
    222         "-fvisibility=hidden",
    223         "-Wno-unused-parameter",
    224     ],
    225     clang: true,
    226     rtti: true,
    227     export_include_dirs: ["."],
    228 
    229     target: {
    230         android: {
    231             cflags: [
    232                 "-DPIC",
    233                 "-fPIC",
    234             ],
    235         },
    236     },
    237 }
    238 
    239 //
    240 // Build for the host and target (device).
    241 //
    242 cc_library_shared {
    243     name: "libicui18n",
    244     vendor_available: true,
    245     defaults: ["libicui18n_defaults"],
    246     host_supported: true,
    247     unique_host_soname: true,
    248     shared_libs: ["libicuuc"],
    249     host_ldlibs: [
    250         "-lm",
    251         "-lpthread",
    252     ],
    253 }
    254 
    255 //
    256 // Build as a static library against the NDK
    257 //
    258 cc_library_static {
    259     name: "libicui18n_static",
    260     defaults: ["libicui18n_defaults"],
    261     sdk_version: "9",
    262     stl: "stlport_static",
    263     static_libs: ["libicuuc_static"],
    264 
    265     cflags: ["-Os"], // Using -Os over -O3 actually cuts down the final executable size by a few dozen kilobytes
    266 }
    267