Android.mk 2.8 KB
Newer Older
R
Raph Levien 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

R
Raph Levien 已提交
19
minikin_src_files := \
R
Raph Levien 已提交
20 21 22 23
    AnalyzeStyle.cpp \
    CmapCoverage.cpp \
    FontCollection.cpp \
    FontFamily.cpp \
24
    FontLanguage.cpp \
S
Seigo Nonaka 已提交
25
    FontLanguageListCache.cpp \
26
    GraphemeBreak.cpp \
27
    HbFaceCache.cpp \
28
    Hyphenator.cpp \
R
Raph Levien 已提交
29
    Layout.cpp \
30
    LayoutUtils.cpp \
R
Raph Levien 已提交
31
    LineBreaker.cpp \
32
    Measurement.cpp \
R
Raph Levien 已提交
33 34
    MinikinInternal.cpp \
    MinikinRefCounted.cpp \
R
Raph Levien 已提交
35
    MinikinFontFreeType.cpp \
R
Raph Levien 已提交
36 37
    SparseBitSet.cpp

R
Raph Levien 已提交
38
minikin_c_includes := \
R
Raph Levien 已提交
39 40 41 42
    external/harfbuzz_ng/src \
    external/freetype/include \
    frameworks/minikin/include

R
Raph Levien 已提交
43
minikin_shared_libraries := \
R
Raph Levien 已提交
44
    libharfbuzz_ng \
45
    libft2 \
46
    liblog \
47
    libz \
48 49
    libicuuc \
    libutils
R
Raph Levien 已提交
50

51 52 53 54 55 56 57
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
# Enable race detection on eng and userdebug build.
enable_race_detection := -DENABLE_RACE_DETECTION
else
enable_race_detection :=
endif

R
Raph Levien 已提交
58 59 60 61
LOCAL_MODULE := libminikin
LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
LOCAL_SRC_FILES := $(minikin_src_files)
LOCAL_C_INCLUDES := $(minikin_c_includes)
62
LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
R
Raph Levien 已提交
63
LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
64 65
LOCAL_CLANG := true
LOCAL_SANITIZE := signed-integer-overflow unsigned-integer-overflow
66
include $(BUILD_SHARED_LIBRARY)
R
Raph Levien 已提交
67 68 69 70 71 72 73 74

include $(CLEAR_VARS)

LOCAL_MODULE := libminikin
LOCAL_MODULE_TAGS := optional
LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
LOCAL_SRC_FILES := $(minikin_src_files)
LOCAL_C_INCLUDES := $(minikin_c_includes)
75
LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
R
Raph Levien 已提交
76
LOCAL_SHARED_LIBRARIES := $(minikin_shared_libraries)
77 78
LOCAL_CLANG := true
LOCAL_SANITIZE := signed-integer-overflow unsigned-integer-overflow
R
Raph Levien 已提交
79 80

include $(BUILD_STATIC_LIBRARY)
81 82 83 84 85 86 87 88 89

include $(CLEAR_VARS)

# Reduced library (currently just hyphenation) for host

LOCAL_MODULE := libminikin_host
LOCAL_MODULE_TAGS := optional
LOCAL_EXPORT_C_INCLUDE_DIRS := frameworks/minikin/include
LOCAL_C_INCLUDES := $(minikin_c_includes)
90
LOCAL_CPPFLAGS += -Werror -Wall -Wextra $(enable_race_detection)
91
LOCAL_SHARED_LIBRARIES := liblog libicuuc-host
92 93
LOCAL_CLANG := true
LOCAL_SANITIZE := signed-integer-overflow unsigned-integer-overflow
94 95 96 97

LOCAL_SRC_FILES := Hyphenator.cpp

include $(BUILD_HOST_STATIC_LIBRARY)