blob: ef16d56aab3011f8b2e9f36f5f4b117875ef33b7 [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 Moreland91527ed2017-04-11 12:43:16 -070017 vendor_available: true,
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080018 host_supported: true,
Steven Morelandd3b4b2c2017-04-13 21:01:40 -070019
Jaesoo Lee1e8ac0f2017-04-20 16:56:45 +090020 header_libs: [
21 "libsystem_headers",
22 "libcutils_headers"
23 ],
24 export_header_lib_headers: [
25 "libsystem_headers",
26 "libcutils_headers"
27 ],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080028 export_include_dirs: ["include"],
Steven Morelandd3b4b2c2017-04-13 21:01:40 -070029
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080030 target: {
Steven Morelandd3b4b2c2017-04-13 21:01:40 -070031 android: {
32 header_libs: ["libbacktrace_headers"],
33 export_header_lib_headers: ["libbacktrace_headers"],
34 },
Dan Willemsene0cd1e02017-03-15 15:23:36 -070035 linux_bionic: {
36 enabled: true,
37 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080038 windows: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070039 enabled: true,
40 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080041 },
42}
43
Dan Willemsen2e1591b2016-07-12 17:20:18 -070044cc_library {
45 name: "libutils",
Steven Moreland91527ed2017-04-11 12:43:16 -070046 vendor_available: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -070047 host_supported: true,
48
49 srcs: [
50 "CallStack.cpp",
51 "FileMap.cpp",
52 "JenkinsHash.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070053 "Log.cpp",
54 "NativeHandle.cpp",
55 "Printer.cpp",
56 "PropertyMap.cpp",
57 "RefBase.cpp",
58 "SharedBuffer.cpp",
59 "Static.cpp",
60 "StopWatch.cpp",
61 "String8.cpp",
62 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070063 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070064 "SystemClock.cpp",
65 "Threads.cpp",
66 "Timers.cpp",
67 "Tokenizer.cpp",
68 "Unicode.cpp",
69 "VectorImpl.cpp",
70 "misc.cpp",
71 ],
72
73 cflags: ["-Werror"],
74 include_dirs: ["external/safe-iop/include"],
Steven Morelandb084bc32017-04-12 18:57:57 -070075 header_libs: [
Steven Morelandb084bc32017-04-12 18:57:57 -070076 "libutils_headers",
77 ],
78 export_header_lib_headers: [
Steven Morelandb084bc32017-04-12 18:57:57 -070079 "libutils_headers",
80 ],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070081
Steven Moreland43e20ca2017-06-26 13:52:06 -070082 shared_libs: [
83 "liblog",
84 ],
85 export_shared_lib_headers: [
86 "liblog",
87 ],
88
Dan Willemsen2e1591b2016-07-12 17:20:18 -070089 arch: {
90 mips: {
91 cflags: ["-DALIGN_DOUBLE"],
92 },
93 },
94
95 target: {
96 android: {
97 srcs: [
Dan Willemsen2e1591b2016-07-12 17:20:18 -070098 "Looper.cpp",
99 "ProcessCallStack.cpp",
100 "Trace.cpp",
101 ],
102
103 cflags: ["-fvisibility=protected"],
104
105 shared_libs: [
106 "libbacktrace",
107 "libcutils",
108 "libdl",
Jiyong Park0b3c24b2017-05-26 17:57:18 +0900109 "libvndksupport",
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700110 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -0700111
112 sanitize: {
113 misc_undefined: ["integer"],
114 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700115 },
116
117 host: {
118 cflags: ["-DLIBUTILS_NATIVE=1"],
119
120 shared: {
121 enabled: false,
122 },
123 },
124
125 linux: {
126 srcs: [
127 "Looper.cpp",
128 "ProcessCallStack.cpp",
129 ],
130 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800131 linux_bionic: {
132 enabled: true,
133 srcs: [
134 "Looper.cpp",
135 "ProcessCallStack.cpp",
136 ],
137 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700138
139 darwin: {
140 cflags: ["-Wno-unused-parameter"],
141 },
142
143 // Under MinGW, ctype.h doesn't need multi-byte support
144 windows: {
145 cflags: ["-DMB_CUR_MAX=1"],
146
147 enabled: true,
148 },
149 },
150
151 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700152}
153
154// Include subdirectory makefiles
155// ============================================================
156
157cc_test {
158 name: "SharedBufferTest",
159 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700160 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700161 shared_libs: ["liblog"],
162 srcs: ["SharedBufferTest.cpp"],
163}
164
165subdirs = ["tests"]