blob: fbfb7c2a8c5447ac261c78c347d0ff433e1e7e1b [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",
Steven Moreland48cdaff2017-04-11 12:43:16 -070017 vendor_available: true,
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080018 host_supported: true,
Steven Moreland2d0dc992017-04-12 18:57:57 -070019
Jaesoo Lee1e8ac0f2017-04-20 16:56:45 +090020 header_libs: [
Steven Morelandc30f2482017-07-10 16:40:36 -070021 "liblog_headers",
Jaesoo Lee1e8ac0f2017-04-20 16:56:45 +090022 "libsystem_headers",
23 "libcutils_headers"
24 ],
25 export_header_lib_headers: [
Steven Morelandc30f2482017-07-10 16:40:36 -070026 "liblog_headers",
Jaesoo Lee1e8ac0f2017-04-20 16:56:45 +090027 "libsystem_headers",
28 "libcutils_headers"
29 ],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080030 export_include_dirs: ["include"],
Steven Moreland4ad9d512017-04-13 21:01:40 -070031
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080032 target: {
Steven Moreland4ad9d512017-04-13 21:01:40 -070033 android: {
34 header_libs: ["libbacktrace_headers"],
35 export_header_lib_headers: ["libbacktrace_headers"],
36 },
Dan Willemsene0cd1e02017-03-15 15:23:36 -070037 linux_bionic: {
38 enabled: true,
39 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080040 windows: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070041 enabled: true,
42 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080043 },
44}
45
Dan Willemsen2e1591b2016-07-12 17:20:18 -070046cc_library {
47 name: "libutils",
Steven Moreland48cdaff2017-04-11 12:43:16 -070048 vendor_available: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -070049 host_supported: true,
50
51 srcs: [
52 "CallStack.cpp",
53 "FileMap.cpp",
54 "JenkinsHash.cpp",
55 "LinearTransform.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070056 "NativeHandle.cpp",
57 "Printer.cpp",
58 "PropertyMap.cpp",
59 "RefBase.cpp",
60 "SharedBuffer.cpp",
61 "Static.cpp",
62 "StopWatch.cpp",
63 "String8.cpp",
64 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070065 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070066 "SystemClock.cpp",
67 "Threads.cpp",
68 "Timers.cpp",
69 "Tokenizer.cpp",
70 "Unicode.cpp",
71 "VectorImpl.cpp",
72 "misc.cpp",
73 ],
74
75 cflags: ["-Werror"],
76 include_dirs: ["external/safe-iop/include"],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080077 header_libs: ["libutils_headers"],
78 export_header_lib_headers: ["libutils_headers"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070079
Steven Moreland58b3c792017-06-26 13:52:06 -070080 shared_libs: [
81 "liblog",
82 ],
Steven Moreland58b3c792017-06-26 13:52:06 -070083
Dan Willemsen2e1591b2016-07-12 17:20:18 -070084 arch: {
85 mips: {
86 cflags: ["-DALIGN_DOUBLE"],
87 },
88 },
89
90 target: {
91 android: {
92 srcs: [
93 "BlobCache.cpp",
94 "Looper.cpp",
95 "ProcessCallStack.cpp",
96 "Trace.cpp",
97 ],
98
99 cflags: ["-fvisibility=protected"],
100
101 shared_libs: [
102 "libbacktrace",
103 "libcutils",
104 "libdl",
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700105 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -0700106
107 sanitize: {
108 misc_undefined: ["integer"],
109 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700110 },
111
112 host: {
113 cflags: ["-DLIBUTILS_NATIVE=1"],
114
115 shared: {
116 enabled: false,
117 },
118 },
119
120 linux: {
121 srcs: [
122 "Looper.cpp",
123 "ProcessCallStack.cpp",
124 ],
125 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800126 linux_bionic: {
127 enabled: true,
128 srcs: [
129 "Looper.cpp",
130 "ProcessCallStack.cpp",
131 ],
132 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700133
134 darwin: {
135 cflags: ["-Wno-unused-parameter"],
136 },
137
138 // Under MinGW, ctype.h doesn't need multi-byte support
139 windows: {
140 cflags: ["-DMB_CUR_MAX=1"],
141
142 enabled: true,
143 },
144 },
145
146 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700147}
148
149// Include subdirectory makefiles
150// ============================================================
151
152cc_test {
153 name: "SharedBufferTest",
154 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700155 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700156 shared_libs: ["liblog"],
157 srcs: ["SharedBufferTest.cpp"],
158}
159
160subdirs = ["tests"]