Android.mk revision a7c42079fb5365cd3f3a3c191452378c7027dd57
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# To get your own ICU userdata:
17#
18# Go to http://apps.icu-project.org/datacustom/ and configure yourself
19# a data file.  Unzip the file it gives you, and save that somewhere,
20# Set the icu_var_name variable to the location of that file in the tree.
21#
22# Make sure to choose ICU4C at the bottom.  You should also
23# make sure to pick all of the following options, as they are required
24# by the system.  Things will fail quietly if you don't have them:
25#
26# TODO: >>> base list goes here once we have it <<<
27#
28
29
30#
31# Common definitions for all variants.
32#
33
34LOCAL_PATH:= $(call my-dir)
35
36# Build configuration:
37#
38# Japanese wins if required.
39# "Large" includes most other languages.
40# US-Euro is needed for IT or PL builds
41# Default is suitable for CS, DE, EN, ES, FR, NL
42# US has only EN and ES
43
44config := $(word 1, \
45            $(if $(findstring ar,$(PRODUCT_LOCALES)),large) \
46            $(if $(findstring da,$(PRODUCT_LOCALES)),large) \
47            $(if $(findstring el,$(PRODUCT_LOCALES)),large) \
48            $(if $(findstring fi,$(PRODUCT_LOCALES)),large) \
49            $(if $(findstring he,$(PRODUCT_LOCALES)),large) \
50            $(if $(findstring hr,$(PRODUCT_LOCALES)),large) \
51            $(if $(findstring hu,$(PRODUCT_LOCALES)),large) \
52            $(if $(findstring id,$(PRODUCT_LOCALES)),large) \
53            $(if $(findstring ko,$(PRODUCT_LOCALES)),large) \
54            $(if $(findstring nb,$(PRODUCT_LOCALES)),large) \
55            $(if $(findstring pt,$(PRODUCT_LOCALES)),large) \
56            $(if $(findstring ro,$(PRODUCT_LOCALES)),large) \
57            $(if $(findstring ru,$(PRODUCT_LOCALES)),large) \
58            $(if $(findstring sk,$(PRODUCT_LOCALES)),large) \
59            $(if $(findstring sr,$(PRODUCT_LOCALES)),large) \
60            $(if $(findstring sv,$(PRODUCT_LOCALES)),large) \
61            $(if $(findstring th,$(PRODUCT_LOCALES)),large) \
62            $(if $(findstring tr,$(PRODUCT_LOCALES)),large) \
63            $(if $(findstring uk,$(PRODUCT_LOCALES)),large) \
64            $(if $(findstring zh,$(PRODUCT_LOCALES)),large) \
65            $(if $(findstring ja,$(PRODUCT_LOCALES)),us-japan) \
66            $(if $(findstring it,$(PRODUCT_LOCALES)),us-euro) \
67            $(if $(findstring pl,$(PRODUCT_LOCALES)),us-euro) \
68            $(if $(findstring cs,$(PRODUCT_LOCALES)),default) \
69            $(if $(findstring de,$(PRODUCT_LOCALES)),default) \
70            $(if $(findstring fr,$(PRODUCT_LOCALES)),default) \
71            $(if $(findstring nl,$(PRODUCT_LOCALES)),default) \
72            us)
73
74icu_var_name := icudt42_dat
75
76
77#
78# Japanese (for target)
79#
80
81include $(CLEAR_VARS)
82
83LOCAL_MODULE := libicudata-jp
84
85required_config := us-japan
86data_file_name := icudt42l-us-japan.dat
87output_file_name := icu_data_jp.S
88
89include $(LOCAL_PATH)/IcuData.mk
90include $(BUILD_SHARED_LIBRARY)
91
92
93#
94# Large (for target)
95#
96
97include $(CLEAR_VARS)
98LOCAL_MODULE := libicudata-large
99
100required_config := large
101data_file_name := icudt42l-large.dat
102output_file_name := icu_data_large.S
103
104include $(LOCAL_PATH)/IcuData.mk
105include $(BUILD_SHARED_LIBRARY)
106
107
108#
109# Euro (for target)
110#
111
112include $(CLEAR_VARS)
113LOCAL_MODULE := libicudata-eu
114
115required_config := us-euro
116data_file_name := icudt42l-us-euro.dat
117output_file_name := icu_data_eu.S
118
119include $(LOCAL_PATH)/IcuData.mk
120include $(BUILD_SHARED_LIBRARY)
121
122
123#
124# Default (for target)
125#
126
127include $(CLEAR_VARS)
128LOCAL_MODULE := libicudata-default
129
130required_config := default
131data_file_name := icudt42l-default.dat
132output_file_name := icu_data_default.S
133
134include $(LOCAL_PATH)/IcuData.mk
135include $(BUILD_SHARED_LIBRARY)
136
137
138#
139# US (for target)
140#
141
142include $(CLEAR_VARS)
143LOCAL_MODULE := libicudata-us
144
145required_config := us
146data_file_name := icudt42l-us.dat
147output_file_name := icu_data_us.S
148
149include $(LOCAL_PATH)/IcuData.mk
150include $(BUILD_SHARED_LIBRARY)
151
152
153#
154# Large (for host). This is the only config we support on the host,
155# and you can see the "config" variable being set below for that
156# reason.
157#
158
159ifeq ($(WITH_HOST_DALVIK),true)
160
161    include $(CLEAR_VARS)
162    LOCAL_MODULE := libicudata-large
163
164    config := large
165    required_config := large
166    data_file_name := icudt42l-large.dat
167    output_file_name := icu_data_large.S
168
169    include $(LOCAL_PATH)/IcuData.mk
170    include $(BUILD_HOST_SHARED_LIBRARY)
171
172endif
173