blob: 3451bbddb7d6ab7610c20227ed49c5d6e9c3eb98 [file] [log] [blame]
Dan Willemsen2e1591b2016-07-12 17:20:18 -07001// Copyright (C) 2008 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
15cc_library {
16 name: "libutils",
17 host_supported: true,
18
19 srcs: [
20 "CallStack.cpp",
21 "FileMap.cpp",
22 "JenkinsHash.cpp",
23 "LinearTransform.cpp",
24 "Log.cpp",
25 "NativeHandle.cpp",
26 "Printer.cpp",
27 "PropertyMap.cpp",
28 "RefBase.cpp",
29 "SharedBuffer.cpp",
30 "Static.cpp",
31 "StopWatch.cpp",
32 "String8.cpp",
33 "String16.cpp",
34 "SystemClock.cpp",
35 "Threads.cpp",
36 "Timers.cpp",
37 "Tokenizer.cpp",
38 "Unicode.cpp",
39 "VectorImpl.cpp",
40 "misc.cpp",
41 ],
42
43 cflags: ["-Werror"],
44 include_dirs: ["external/safe-iop/include"],
45
46 arch: {
47 mips: {
48 cflags: ["-DALIGN_DOUBLE"],
49 },
50 },
51
52 target: {
53 android: {
54 srcs: [
55 "BlobCache.cpp",
56 "Looper.cpp",
57 "ProcessCallStack.cpp",
58 "Trace.cpp",
59 ],
60
61 cflags: ["-fvisibility=protected"],
62
63 shared_libs: [
64 "libbacktrace",
65 "libcutils",
66 "libdl",
67 "liblog",
68 ],
69 },
70
71 host: {
72 cflags: ["-DLIBUTILS_NATIVE=1"],
73
74 shared: {
75 enabled: false,
76 },
77 },
78
79 linux: {
80 srcs: [
81 "Looper.cpp",
82 "ProcessCallStack.cpp",
83 ],
84 },
85
86 darwin: {
87 cflags: ["-Wno-unused-parameter"],
88 },
89
90 // Under MinGW, ctype.h doesn't need multi-byte support
91 windows: {
92 cflags: ["-DMB_CUR_MAX=1"],
93
94 enabled: true,
95 },
96 },
97
98 clang: true,
99 sanitize: {
100 misc_undefined: ["integer"],
101 },
102}
103
104// Include subdirectory makefiles
105// ============================================================
106
107cc_test {
108 name: "SharedBufferTest",
109 host_supported: true,
110 static_libs: [
111 "libutils",
112 "libcutils",
113 ],
114 shared_libs: ["liblog"],
115 srcs: ["SharedBufferTest.cpp"],
116}
117
118subdirs = ["tests"]