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 19include $(CLEAR_VARS) 20minikin_src_files := \ 21 CmapCoverage.cpp \ 22 Emoji.cpp \ 23 FontCollection.cpp \ 24 FontFamily.cpp \ 25 FontLanguage.cpp \ 26 FontLanguageListCache.cpp \ 27 FontUtils.cpp \ 28 GraphemeBreak.cpp \ 29 HbFontCache.cpp \ 30 Hyphenator.cpp \ 31 Layout.cpp \ 32 LayoutUtils.cpp \ 33 LineBreaker.cpp \ 34 Measurement.cpp \ 35 MinikinInternal.cpp \ 36 MinikinFont.cpp \ 37 SparseBitSet.cpp \ 38 WordBreaker.cpp 39 40minikin_c_includes := \ 41 external/harfbuzz_ng/src \ 42 frameworks/minikin/include \ 43 $(intermediates) 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 99 100LOCAL_SRC_FILES := Hyphenator.cpp 101 102include $(BUILD_HOST_STATIC_LIBRARY) 103