• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1BASE_PATH := $(call my-dir)
2LOCAL_PATH:= $(call my-dir)
3
4include $(CLEAR_VARS)
5LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
6
7# We default to release for the Android build system. Developers debugging
8# code can build with "Debug"
9GYP_CONFIGURATION := Release
10
11LOCAL_MODULE_CLASS := STATIC_LIBRARIES
12LOCAL_MODULE := libsfntly
13LOCAL_MODULE_SUFFIX := .a
14LOCAL_MODULE_TAGS := optional
15
16LOCAL_CPP_EXTENSION := .cc
17LOCAL_GENERATED_SOURCES :=
18
19LOCAL_SRC_FILES := \
20	cpp/src/sfntly/data/byte_array.cc \
21	cpp/src/sfntly/data/font_data.cc \
22	cpp/src/sfntly/data/font_input_stream.cc \
23	cpp/src/sfntly/data/font_output_stream.cc \
24	cpp/src/sfntly/data/growable_memory_byte_array.cc \
25	cpp/src/sfntly/data/memory_byte_array.cc \
26	cpp/src/sfntly/data/readable_font_data.cc \
27	cpp/src/sfntly/data/writable_font_data.cc \
28	cpp/src/sfntly/font.cc \
29	cpp/src/sfntly/font_factory.cc \
30	cpp/src/sfntly/port/file_input_stream.cc \
31	cpp/src/sfntly/port/lock.cc \
32	cpp/src/sfntly/port/memory_input_stream.cc \
33	cpp/src/sfntly/port/memory_output_stream.cc \
34	cpp/src/sfntly/table/bitmap/big_glyph_metrics.cc \
35	cpp/src/sfntly/table/bitmap/bitmap_glyph.cc \
36	cpp/src/sfntly/table/bitmap/bitmap_glyph_info.cc \
37	cpp/src/sfntly/table/bitmap/bitmap_size_table.cc \
38	cpp/src/sfntly/table/bitmap/composite_bitmap_glyph.cc \
39	cpp/src/sfntly/table/bitmap/ebdt_table.cc \
40	cpp/src/sfntly/table/bitmap/eblc_table.cc \
41	cpp/src/sfntly/table/bitmap/ebsc_table.cc \
42	cpp/src/sfntly/table/bitmap/glyph_metrics.cc \
43	cpp/src/sfntly/table/bitmap/index_sub_table.cc \
44	cpp/src/sfntly/table/bitmap/index_sub_table_format1.cc \
45	cpp/src/sfntly/table/bitmap/index_sub_table_format2.cc \
46	cpp/src/sfntly/table/bitmap/index_sub_table_format3.cc \
47	cpp/src/sfntly/table/bitmap/index_sub_table_format4.cc \
48	cpp/src/sfntly/table/bitmap/index_sub_table_format5.cc \
49	cpp/src/sfntly/table/bitmap/simple_bitmap_glyph.cc \
50	cpp/src/sfntly/table/bitmap/small_glyph_metrics.cc \
51	cpp/src/sfntly/table/byte_array_table_builder.cc \
52	cpp/src/sfntly/table/core/cmap_table.cc \
53	cpp/src/sfntly/table/core/font_header_table.cc \
54	cpp/src/sfntly/table/core/horizontal_device_metrics_table.cc \
55	cpp/src/sfntly/table/core/horizontal_header_table.cc \
56	cpp/src/sfntly/table/core/horizontal_metrics_table.cc \
57	cpp/src/sfntly/table/core/maximum_profile_table.cc \
58	cpp/src/sfntly/table/core/name_table.cc \
59	cpp/src/sfntly/table/core/os2_table.cc \
60	cpp/src/sfntly/table/font_data_table.cc \
61	cpp/src/sfntly/table/generic_table_builder.cc \
62	cpp/src/sfntly/table/header.cc \
63	cpp/src/sfntly/table/subtable.cc \
64	cpp/src/sfntly/table/table.cc \
65	cpp/src/sfntly/table/table_based_table_builder.cc \
66	cpp/src/sfntly/table/truetype/glyph_table.cc \
67	cpp/src/sfntly/table/truetype/loca_table.cc \
68	cpp/src/sfntly/tag.cc \
69	cpp/src/sample/chromium/font_subsetter.cc \
70	cpp/src/sample/chromium/subsetter_impl.cc
71
72
73# Flags passed to both C and C++ files.
74MY_CFLAGS_Debug := \
75	-fstack-protector \
76	--param=ssp-buffer-size=4 \
77	-Werror \
78	-fno-exceptions \
79	-fno-strict-aliasing \
80	-Wall \
81	-Wno-unused-parameter \
82	-Wno-missing-field-initializers \
83	-fvisibility=hidden \
84	-pipe \
85	-fPIC \
86	-fno-tree-sra \
87	-fuse-ld=gold \
88	-Wno-psabi \
89	-ffunction-sections \
90	-funwind-tables \
91	-g \
92	-fstack-protector \
93	-fno-short-enums \
94	-finline-limit=64 \
95	-Wa,--noexecstack \
96	-U_FORTIFY_SOURCE \
97	-Wno-extra \
98	-Wno-ignored-qualifiers \
99	-Wno-type-limits \
100	-Os \
101	-g \
102	-fomit-frame-pointer \
103	-fdata-sections \
104	-ffunction-sections
105
106MY_DEFS_Debug := \
107	'-DANGLE_DX11' \
108	'-D_FILE_OFFSET_BITS=64' \
109	'-DNO_TCMALLOC' \
110	'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
111	'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
112	'-DDISABLE_NACL' \
113	'-DCHROMIUM_BUILD' \
114	'-DUSE_LIBJPEG_TURBO=1' \
115	'-DUSE_PROPRIETARY_CODECS' \
116	'-DENABLE_CONFIGURATION_POLICY' \
117	'-DENABLE_GPU=1' \
118	'-DUSE_OPENSSL=1' \
119	'-DENABLE_EGLIMAGE=1' \
120	'-DSFNTLY_NO_EXCEPTION' \
121	'-DU_USING_ICU_NAMESPACE=0' \
122	'-D__STDC_CONSTANT_MACROS' \
123	'-D__STDC_FORMAT_MACROS' \
124	'-DANDROID' \
125	'-D__GNU_SOURCE=1' \
126	'-DUSE_STLPORT=1' \
127	'-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
128	'-DCHROME_BUILD_ID=""' \
129	'-DDYNAMIC_ANNOTATIONS_ENABLED=1' \
130	'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
131	'-D_DEBUG'
132
133# Include paths placed before CFLAGS/CPPFLAGS
134LOCAL_C_INCLUDES_Debug := \
135	$(LOCAL_PATH)/cpp/src \
136	$(LOCAL_PATH) \
137	frameworks/wilhelm/include \
138
139
140# Flags passed to only C++ (and not C) files.
141LOCAL_CPPFLAGS_Debug := \
142	-fno-rtti \
143	-fno-threadsafe-statics \
144	-fvisibility-inlines-hidden \
145	-Wsign-compare \
146	-Wno-abi \
147	-Wno-error=c++0x-compat \
148	-Wno-non-virtual-dtor \
149	-Wno-sign-promo
150
151
152# Flags passed to both C and C++ files.
153MY_CFLAGS_Release := \
154	-fstack-protector \
155	--param=ssp-buffer-size=4 \
156	-Werror \
157	-fno-exceptions \
158	-fno-strict-aliasing \
159	-Wall \
160	-Wno-unused-parameter \
161	-Wno-missing-field-initializers \
162	-fvisibility=hidden \
163	-pipe \
164	-fPIC \
165	-fno-tree-sra \
166	-fuse-ld=gold \
167	-Wno-psabi \
168	-ffunction-sections \
169	-funwind-tables \
170	-g \
171	-fstack-protector \
172	-fno-short-enums \
173	-finline-limit=64 \
174	-Wa,--noexecstack \
175	-U_FORTIFY_SOURCE \
176	-Wno-extra \
177	-Wno-ignored-qualifiers \
178	-Wno-type-limits \
179	-Os \
180	-fno-ident \
181	-fdata-sections \
182	-ffunction-sections \
183	-fomit-frame-pointer
184
185MY_DEFS_Release := \
186	'-DANGLE_DX11' \
187	'-D_FILE_OFFSET_BITS=64' \
188	'-DNO_TCMALLOC' \
189	'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
190	'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
191	'-DDISABLE_NACL' \
192	'-DCHROMIUM_BUILD' \
193	'-DUSE_LIBJPEG_TURBO=1' \
194	'-DUSE_PROPRIETARY_CODECS' \
195	'-DENABLE_CONFIGURATION_POLICY' \
196	'-DENABLE_GPU=1' \
197	'-DUSE_OPENSSL=1' \
198	'-DENABLE_EGLIMAGE=1' \
199	'-DSFNTLY_NO_EXCEPTION' \
200	'-DU_USING_ICU_NAMESPACE=0' \
201	'-D__STDC_CONSTANT_MACROS' \
202	'-D__STDC_FORMAT_MACROS' \
203	'-DANDROID' \
204	'-D__GNU_SOURCE=1' \
205	'-DUSE_STLPORT=1' \
206	'-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
207	'-DCHROME_BUILD_ID=""' \
208	'-DNDEBUG' \
209	'-DNVALGRIND' \
210	'-DDYNAMIC_ANNOTATIONS_ENABLED=0' \
211	'-D_FORTIFY_SOURCE=2'
212
213
214# Include paths placed before CFLAGS/CPPFLAGS
215LOCAL_C_INCLUDES_Release := \
216	$(LOCAL_PATH)/cpp/src \
217	$(LOCAL_PATH) \
218	frameworks/wilhelm/include \
219
220
221# Flags passed to only C++ (and not C) files.
222LOCAL_CPPFLAGS_Release := \
223	-fno-rtti \
224	-fno-threadsafe-statics \
225	-fvisibility-inlines-hidden \
226	-Wsign-compare \
227	-Wno-abi \
228	-Wno-error=c++0x-compat \
229	-Wno-non-virtual-dtor \
230	-Wno-sign-promo
231
232LOCAL_SHARED_LIBRARIES := libicuuc libicui18n
233
234LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
235LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
236LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
237
238include $(BUILD_STATIC_LIBRARY)
239