OSDN Git Service

Add bound checks to utf16_to_utf8
[android-x86/frameworks-base.git] / tools / split-select / Android.mk
1 #
2 # Copyright (C) 2014 The Android Open Source Project
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 # This tool is prebuilt if we're doing an app-only build.
18 ifeq ($(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)),)
19
20 # ==========================================================
21 # Setup some common variables for the different build
22 # targets here.
23 # ==========================================================
24 LOCAL_PATH:= $(call my-dir)
25
26 main := Main.cpp
27 sources := \
28     Abi.cpp \
29     Grouper.cpp \
30     Rule.cpp \
31     RuleGenerator.cpp \
32     SplitDescription.cpp \
33     SplitSelector.cpp
34
35 testSources := \
36     Grouper_test.cpp \
37     Rule_test.cpp \
38     RuleGenerator_test.cpp \
39     SplitSelector_test.cpp \
40     TestRules.cpp
41
42 cIncludes := \
43     external/zlib \
44     frameworks/base/tools
45
46 hostStaticLibs := \
47     libaapt \
48     libandroidfw \
49     libpng \
50     libutils \
51     liblog \
52     libcutils \
53     libexpat \
54     libziparchive-host \
55     libbase
56
57 cFlags := -Wall -Werror
58
59 hostLdLibs_linux := -lrt -ldl -lpthread
60
61 # Statically link libz for MinGW (Win SDK under Linux),
62 # and dynamically link for all others.
63 hostStaticLibs_windows := libz
64 hostLdLibs_darwin := -lz
65 hostLdLibs_linux += -lz
66
67
68 # ==========================================================
69 # Build the host static library: libsplit-select
70 # ==========================================================
71 include $(CLEAR_VARS)
72 LOCAL_MODULE := libsplit-select
73 LOCAL_MODULE_HOST_OS := darwin linux windows
74
75 LOCAL_SRC_FILES := $(sources)
76
77 LOCAL_C_INCLUDES := $(cIncludes)
78 LOCAL_CFLAGS := $(cFlags) -D_DARWIN_UNLIMITED_STREAMS
79
80 include $(BUILD_HOST_STATIC_LIBRARY)
81
82
83 # ==========================================================
84 # Build the host tests: libsplit-select_tests
85 # ==========================================================
86 include $(CLEAR_VARS)
87 LOCAL_MODULE := libsplit-select_tests
88 LOCAL_MODULE_TAGS := tests
89
90 LOCAL_SRC_FILES := $(testSources)
91
92 LOCAL_C_INCLUDES := $(cIncludes)
93 LOCAL_STATIC_LIBRARIES := libsplit-select $(hostStaticLibs)
94 LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows)
95 LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin)
96 LOCAL_LDLIBS_linux := $(hostLdLibs_linux)
97 LOCAL_CFLAGS := $(cFlags)
98
99 include $(BUILD_HOST_NATIVE_TEST)
100
101 # ==========================================================
102 # Build the host executable: split-select
103 # ==========================================================
104 include $(CLEAR_VARS)
105 LOCAL_MODULE := split-select
106 LOCAL_MODULE_HOST_OS := darwin linux windows
107
108 LOCAL_SRC_FILES := $(main)
109
110 LOCAL_C_INCLUDES := $(cIncludes)
111 LOCAL_STATIC_LIBRARIES := libsplit-select $(hostStaticLibs)
112 LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows)
113 LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin)
114 LOCAL_LDLIBS_linux := $(hostLdLibs_linux)
115 LOCAL_CFLAGS := $(cFlags)
116
117 include $(BUILD_HOST_EXECUTABLE)
118
119 endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK