blob: 00edb4a163ebe34a004cbec3206fd3066e3bea3c [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: [
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 Moreland4ad9d512017-04-13 21:01:40 -070029
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080030 target: {
Steven Moreland4ad9d512017-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 Moreland48cdaff2017-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",
53 "LinearTransform.cpp",
54 "Log.cpp",
55 "NativeHandle.cpp",
56 "Printer.cpp",
57 "PropertyMap.cpp",
58 "RefBase.cpp",
59 "SharedBuffer.cpp",
60 "Static.cpp",
61 "StopWatch.cpp",
62 "String8.cpp",
63 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070064 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070065 "SystemClock.cpp",
66 "Threads.cpp",
67 "Timers.cpp",
68 "Tokenizer.cpp",
69 "Unicode.cpp",
70 "VectorImpl.cpp",
71 "misc.cpp",
72 ],
73
74 cflags: ["-Werror"],
75 include_dirs: ["external/safe-iop/include"],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080076 header_libs: ["libutils_headers"],
77 export_header_lib_headers: ["libutils_headers"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070078
Steven Moreland58b3c792017-06-26 13:52:06 -070079 shared_libs: [
80 "liblog",
81 ],
82 export_shared_lib_headers: [
83 "liblog",
84 ],
85
Dan Willemsen2e1591b2016-07-12 17:20:18 -070086 arch: {
87 mips: {
88 cflags: ["-DALIGN_DOUBLE"],
89 },
90 },
91
92 target: {
93 android: {
94 srcs: [
95 "BlobCache.cpp",
96 "Looper.cpp",
97 "ProcessCallStack.cpp",
98 "Trace.cpp",
99 ],
100
101 cflags: ["-fvisibility=protected"],
102
103 shared_libs: [
104 "libbacktrace",
105 "libcutils",
106 "libdl",
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700107 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -0700108
109 sanitize: {
110 misc_undefined: ["integer"],
111 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700112 },
113
114 host: {
115 cflags: ["-DLIBUTILS_NATIVE=1"],
116
117 shared: {
118 enabled: false,
119 },
120 },
121
122 linux: {
123 srcs: [
124 "Looper.cpp",
125 "ProcessCallStack.cpp",
126 ],
127 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800128 linux_bionic: {
129 enabled: true,
130 srcs: [
131 "Looper.cpp",
132 "ProcessCallStack.cpp",
133 ],
134 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700135
136 darwin: {
137 cflags: ["-Wno-unused-parameter"],
138 },
139
140 // Under MinGW, ctype.h doesn't need multi-byte support
141 windows: {
142 cflags: ["-DMB_CUR_MAX=1"],
143
144 enabled: true,
145 },
146 },
147
148 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700149}
150
151// Include subdirectory makefiles
152// ============================================================
153
154cc_test {
155 name: "SharedBufferTest",
156 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700157 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700158 shared_libs: ["liblog"],
159 srcs: ["SharedBufferTest.cpp"],
160}
161
162subdirs = ["tests"]