blob: e912ad237f49c541df859a663a870943aeeec9f9 [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
20 header_libs: ["libsystem_headers",],
21 export_header_lib_headers: ["libsystem_headers",],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080022 export_include_dirs: ["include"],
Steven Moreland4ad9d512017-04-13 21:01:40 -070023
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080024 target: {
Steven Moreland4ad9d512017-04-13 21:01:40 -070025 android: {
26 header_libs: ["libbacktrace_headers"],
27 export_header_lib_headers: ["libbacktrace_headers"],
28 },
Dan Willemsene0cd1e02017-03-15 15:23:36 -070029 linux_bionic: {
30 enabled: true,
31 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080032 windows: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070033 enabled: true,
34 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080035 },
36}
37
Dan Willemsen2e1591b2016-07-12 17:20:18 -070038cc_library {
39 name: "libutils",
Steven Moreland48cdaff2017-04-11 12:43:16 -070040 vendor_available: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -070041 host_supported: true,
42
43 srcs: [
44 "CallStack.cpp",
45 "FileMap.cpp",
46 "JenkinsHash.cpp",
47 "LinearTransform.cpp",
48 "Log.cpp",
49 "NativeHandle.cpp",
50 "Printer.cpp",
51 "PropertyMap.cpp",
52 "RefBase.cpp",
53 "SharedBuffer.cpp",
54 "Static.cpp",
55 "StopWatch.cpp",
56 "String8.cpp",
57 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070058 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070059 "SystemClock.cpp",
60 "Threads.cpp",
61 "Timers.cpp",
62 "Tokenizer.cpp",
63 "Unicode.cpp",
64 "VectorImpl.cpp",
65 "misc.cpp",
66 ],
67
68 cflags: ["-Werror"],
69 include_dirs: ["external/safe-iop/include"],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080070 header_libs: ["libutils_headers"],
71 export_header_lib_headers: ["libutils_headers"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070072
73 arch: {
74 mips: {
75 cflags: ["-DALIGN_DOUBLE"],
76 },
77 },
78
79 target: {
80 android: {
81 srcs: [
82 "BlobCache.cpp",
83 "Looper.cpp",
84 "ProcessCallStack.cpp",
85 "Trace.cpp",
86 ],
87
88 cflags: ["-fvisibility=protected"],
89
90 shared_libs: [
91 "libbacktrace",
92 "libcutils",
93 "libdl",
94 "liblog",
95 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070096
97 sanitize: {
98 misc_undefined: ["integer"],
99 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700100 },
101
102 host: {
103 cflags: ["-DLIBUTILS_NATIVE=1"],
104
105 shared: {
106 enabled: false,
107 },
108 },
109
110 linux: {
111 srcs: [
112 "Looper.cpp",
113 "ProcessCallStack.cpp",
114 ],
115 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800116 linux_bionic: {
117 enabled: true,
118 srcs: [
119 "Looper.cpp",
120 "ProcessCallStack.cpp",
121 ],
122 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700123
124 darwin: {
125 cflags: ["-Wno-unused-parameter"],
126 },
127
128 // Under MinGW, ctype.h doesn't need multi-byte support
129 windows: {
130 cflags: ["-DMB_CUR_MAX=1"],
131
132 enabled: true,
133 },
134 },
135
136 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700137}
138
139// Include subdirectory makefiles
140// ============================================================
141
142cc_test {
143 name: "SharedBufferTest",
144 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700145 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700146 shared_libs: ["liblog"],
147 srcs: ["SharedBufferTest.cpp"],
148}
149
150subdirs = ["tests"]