Android.mk revision 89e80237bc27af084c9ff316d4f47abf426eced8
1# Copyright (C) 2013 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
15LOCAL_PATH := $(call my-dir)
16
17include $(CLEAR_VARS)
18
19minikin_src_files := \
20    AnalyzeStyle.cpp \
21    CmapCoverage.cpp \
22    FontCollection.cpp \
23    FontFamily.cpp \
24    FontLanguage.cpp \
25    FontLanguageListCache.cpp \
26    GraphemeBreak.cpp \
27    HbFontCache.cpp \
28    Hyphenator.cpp \
29    Layout.cpp \
30    LayoutUtils.cpp \
31    LineBreaker.cpp \
32    Measurement.cpp \
33    MinikinInternal.cpp \
34    MinikinRefCounted.cpp \
35    MinikinFontFreeType.cpp \
36    SparseBitSet.cpp
37
38minikin_c_includes := \
39    external/harfbuzz_ng/src \
40    external/freetype/include \
41    frameworks/minikin/include
42
43minikin_shared_libraries := \
44    libharfbuzz_ng \
45    libft2 \
46    liblog \
47    libz \
48    libicuuc \
49    libutils
50
51ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
52# Enable race detection on eng and userdebug build.
53enable_race_detection := -DENABLE_RACE_DETECTION
54else
55enable_race_detection :=
56endif
57
58LOCAL_MODULE := libminikin
59LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
60LOCAL_SRC_FILES := $(minikin_src_files)
61LOCAL_C_INCLUDES := $(minikin_c_includes)
62LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
63LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
64LOCAL_CLANG := true
65LOCAL_SANITIZE := signed-integer-overflow
66# b/26432628.
67#LOCAL_SANITIZE += unsigned-integer-overflow
68
69include $(BUILD_SHARED_LIBRARY)
70
71include $(CLEAR_VARS)
72
73LOCAL_MODULE := libminikin
74LOCAL_MODULE_TAGS := optional
75LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
76LOCAL_SRC_FILES := $(minikin_src_files)
77LOCAL_C_INCLUDES := $(minikin_c_includes)
78LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
79LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
80LOCAL_CLANG := true
81LOCAL_SANITIZE := signed-integer-overflow
82# b/26432628.
83#LOCAL_SANITIZE += unsigned-integer-overflow
84
85include $(BUILD_STATIC_LIBRARY)
86
87include $(CLEAR_VARS)
88
89# Reduced library (currently just hyphenation) for host
90
91LOCAL_MODULE := libminikin_host
92LOCAL_MODULE_TAGS := optional
93LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
94LOCAL_C_INCLUDES := $(minikin_c_includes)
95LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
96LOCAL_SHARED_LIBRARIES := liblog libicuuc-host
97
98LOCAL_SRC_FILES := Hyphenator.cpp
99
100include $(BUILD_HOST_STATIC_LIBRARY)
101