blob: 217b8c378f455e2ca4f52d2f3e41d46a99faab3a [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 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070069
70 sanitize: {
71 misc_undefined: ["integer"],
72 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -070073 },
74
75 host: {
76 cflags: ["-DLIBUTILS_NATIVE=1"],
77
78 shared: {
79 enabled: false,
80 },
81 },
82
83 linux: {
84 srcs: [
85 "Looper.cpp",
86 "ProcessCallStack.cpp",
87 ],
88 },
Dan Willemsenab34b472016-11-29 13:32:55 -080089 linux_bionic: {
90 enabled: true,
91 srcs: [
92 "Looper.cpp",
93 "ProcessCallStack.cpp",
94 ],
95 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -070096
97 darwin: {
98 cflags: ["-Wno-unused-parameter"],
99 },
100
101 // Under MinGW, ctype.h doesn't need multi-byte support
102 windows: {
103 cflags: ["-DMB_CUR_MAX=1"],
104
105 enabled: true,
106 },
107 },
108
109 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700110}
111
112// Include subdirectory makefiles
113// ============================================================
114
115cc_test {
116 name: "SharedBufferTest",
117 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700118 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700119 shared_libs: ["liblog"],
120 srcs: ["SharedBufferTest.cpp"],
121}
122
123subdirs = ["tests"]