blob: 0125eacca8a09bd7dc95ecd6f1f87c71ec1d9604 [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",
56 "Log.cpp",
57 "NativeHandle.cpp",
58 "Printer.cpp",
59 "PropertyMap.cpp",
60 "RefBase.cpp",
61 "SharedBuffer.cpp",
62 "Static.cpp",
63 "StopWatch.cpp",
64 "String8.cpp",
65 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070066 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070067 "SystemClock.cpp",
68 "Threads.cpp",
69 "Timers.cpp",
70 "Tokenizer.cpp",
71 "Unicode.cpp",
72 "VectorImpl.cpp",
73 "misc.cpp",
74 ],
75
76 cflags: ["-Werror"],
77 include_dirs: ["external/safe-iop/include"],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080078 header_libs: ["libutils_headers"],
79 export_header_lib_headers: ["libutils_headers"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070080
Steven Moreland58b3c792017-06-26 13:52:06 -070081 shared_libs: [
82 "liblog",
83 ],
Steven Moreland58b3c792017-06-26 13:52:06 -070084
Dan Willemsen2e1591b2016-07-12 17:20:18 -070085 arch: {
86 mips: {
87 cflags: ["-DALIGN_DOUBLE"],
88 },
89 },
90
91 target: {
92 android: {
93 srcs: [
94 "BlobCache.cpp",
95 "Looper.cpp",
96 "ProcessCallStack.cpp",
97 "Trace.cpp",
98 ],
99
100 cflags: ["-fvisibility=protected"],
101
102 shared_libs: [
103 "libbacktrace",
104 "libcutils",
105 "libdl",
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700106 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -0700107
108 sanitize: {
109 misc_undefined: ["integer"],
110 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700111 },
112
113 host: {
114 cflags: ["-DLIBUTILS_NATIVE=1"],
115
116 shared: {
117 enabled: false,
118 },
119 },
120
121 linux: {
122 srcs: [
123 "Looper.cpp",
124 "ProcessCallStack.cpp",
125 ],
126 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800127 linux_bionic: {
128 enabled: true,
129 srcs: [
130 "Looper.cpp",
131 "ProcessCallStack.cpp",
132 ],
133 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700134
135 darwin: {
136 cflags: ["-Wno-unused-parameter"],
137 },
138
139 // Under MinGW, ctype.h doesn't need multi-byte support
140 windows: {
141 cflags: ["-DMB_CUR_MAX=1"],
142
143 enabled: true,
144 },
145 },
146
147 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700148}
149
150// Include subdirectory makefiles
151// ============================================================
152
153cc_test {
154 name: "SharedBufferTest",
155 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700156 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700157 shared_libs: ["liblog"],
158 srcs: ["SharedBufferTest.cpp"],
159}
160
161subdirs = ["tests"]