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