Android.mk revision 9afcc6e2bd4d89e4e1deb6e18c3c4daca4e114fd
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    MinikinFont.cpp \
36    MinikinFontFreeType.cpp \
37    SparseBitSet.cpp \
38    WordBreaker.cpp
39
40minikin_c_includes := \
41    external/harfbuzz_ng/src \
42    external/freetype/include \
43    frameworks/minikin/include
44
45minikin_shared_libraries := \
46    libharfbuzz_ng \
47    libft2 \
48    liblog \
49    libz \
50    libicuuc \
51    libutils
52
53ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
54# Enable race detection on eng and userdebug build.
55enable_race_detection := -DENABLE_RACE_DETECTION
56else
57enable_race_detection :=
58endif
59
60LOCAL_MODULE := libminikin
61LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
62LOCAL_SRC_FILES := $(minikin_src_files)
63LOCAL_C_INCLUDES := $(minikin_c_includes)
64LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
65LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
66LOCAL_CLANG := true
67LOCAL_SANITIZE := signed-integer-overflow
68# b/26432628.
69#LOCAL_SANITIZE += unsigned-integer-overflow
70
71include $(BUILD_SHARED_LIBRARY)
72
73include $(CLEAR_VARS)
74
75LOCAL_MODULE := libminikin
76LOCAL_MODULE_TAGS := optional
77LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
78LOCAL_SRC_FILES := $(minikin_src_files)
79LOCAL_C_INCLUDES := $(minikin_c_includes)
80LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
81LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
82LOCAL_CLANG := true
83LOCAL_SANITIZE := signed-integer-overflow
84# b/26432628.
85#LOCAL_SANITIZE += unsigned-integer-overflow
86
87include $(BUILD_STATIC_LIBRARY)
88
89include $(CLEAR_VARS)
90
91# Reduced library (currently just hyphenation) for host
92
93LOCAL_MODULE := libminikin_host
94LOCAL_MODULE_TAGS := optional
95LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
96LOCAL_C_INCLUDES := $(minikin_c_includes)
97LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
98LOCAL_SHARED_LIBRARIES := liblog libicuuc-host
99
100LOCAL_SRC_FILES := Hyphenator.cpp
101
102include $(BUILD_HOST_STATIC_LIBRARY)
103