blob: 0c777b10381bc8759315dabf65b40c052ded1299 [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
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080015cc_library_headers {
16 name: "libutils_headers",
17 host_supported: true,
18 export_include_dirs: ["include"],
19 target: {
20 windows: {
21 enabled: true,
22 },
23 },
24}
25
Dan Willemsen2e1591b2016-07-12 17:20:18 -070026cc_library {
27 name: "libutils",
28 host_supported: true,
29
30 srcs: [
31 "CallStack.cpp",
32 "FileMap.cpp",
33 "JenkinsHash.cpp",
34 "LinearTransform.cpp",
35 "Log.cpp",
36 "NativeHandle.cpp",
37 "Printer.cpp",
38 "PropertyMap.cpp",
39 "RefBase.cpp",
40 "SharedBuffer.cpp",
41 "Static.cpp",
42 "StopWatch.cpp",
43 "String8.cpp",
44 "String16.cpp",
45 "SystemClock.cpp",
46 "Threads.cpp",
47 "Timers.cpp",
48 "Tokenizer.cpp",
49 "Unicode.cpp",
50 "VectorImpl.cpp",
51 "misc.cpp",
52 ],
53
54 cflags: ["-Werror"],
55 include_dirs: ["external/safe-iop/include"],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080056 header_libs: ["libutils_headers"],
57 export_header_lib_headers: ["libutils_headers"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070058
59 arch: {
60 mips: {
61 cflags: ["-DALIGN_DOUBLE"],
62 },
63 },
64
65 target: {
66 android: {
67 srcs: [
68 "BlobCache.cpp",
69 "Looper.cpp",
70 "ProcessCallStack.cpp",
71 "Trace.cpp",
72 ],
73
74 cflags: ["-fvisibility=protected"],
75
76 shared_libs: [
77 "libbacktrace",
78 "libcutils",
79 "libdl",
80 "liblog",
81 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070082
83 sanitize: {
84 misc_undefined: ["integer"],
85 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -070086 },
87
88 host: {
89 cflags: ["-DLIBUTILS_NATIVE=1"],
90
91 shared: {
92 enabled: false,
93 },
94 },
95
96 linux: {
97 srcs: [
98 "Looper.cpp",
99 "ProcessCallStack.cpp",
100 ],
101 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800102 linux_bionic: {
103 enabled: true,
104 srcs: [
105 "Looper.cpp",
106 "ProcessCallStack.cpp",
107 ],
108 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700109
110 darwin: {
111 cflags: ["-Wno-unused-parameter"],
112 },
113
114 // Under MinGW, ctype.h doesn't need multi-byte support
115 windows: {
116 cflags: ["-DMB_CUR_MAX=1"],
117
118 enabled: true,
119 },
120 },
121
122 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700123}
124
125// Include subdirectory makefiles
126// ============================================================
127
128cc_test {
129 name: "SharedBufferTest",
130 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700131 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700132 shared_libs: ["liblog"],
133 srcs: ["SharedBufferTest.cpp"],
134}
135
136subdirs = ["tests"]