blob: 83b2682f6545fbc88badf56a4809899a970086bb [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"],
23 target: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070024 linux_bionic: {
25 enabled: true,
26 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080027 windows: {
Dan Willemsene0cd1e02017-03-15 15:23:36 -070028 enabled: true,
29 },
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080030 },
31}
32
Dan Willemsen2e1591b2016-07-12 17:20:18 -070033cc_library {
34 name: "libutils",
Steven Moreland48cdaff2017-04-11 12:43:16 -070035 vendor_available: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -070036 host_supported: true,
37
38 srcs: [
39 "CallStack.cpp",
40 "FileMap.cpp",
41 "JenkinsHash.cpp",
42 "LinearTransform.cpp",
43 "Log.cpp",
44 "NativeHandle.cpp",
45 "Printer.cpp",
46 "PropertyMap.cpp",
47 "RefBase.cpp",
48 "SharedBuffer.cpp",
49 "Static.cpp",
50 "StopWatch.cpp",
51 "String8.cpp",
52 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070053 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070054 "SystemClock.cpp",
55 "Threads.cpp",
56 "Timers.cpp",
57 "Tokenizer.cpp",
58 "Unicode.cpp",
59 "VectorImpl.cpp",
60 "misc.cpp",
61 ],
62
63 cflags: ["-Werror"],
64 include_dirs: ["external/safe-iop/include"],
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080065 header_libs: ["libutils_headers"],
66 export_header_lib_headers: ["libutils_headers"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070067
68 arch: {
69 mips: {
70 cflags: ["-DALIGN_DOUBLE"],
71 },
72 },
73
74 target: {
75 android: {
76 srcs: [
77 "BlobCache.cpp",
78 "Looper.cpp",
79 "ProcessCallStack.cpp",
80 "Trace.cpp",
81 ],
82
83 cflags: ["-fvisibility=protected"],
84
85 shared_libs: [
86 "libbacktrace",
87 "libcutils",
88 "libdl",
89 "liblog",
90 ],
Dan Willemsene16bdb12016-07-13 00:20:20 -070091
92 sanitize: {
93 misc_undefined: ["integer"],
94 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -070095 },
96
97 host: {
98 cflags: ["-DLIBUTILS_NATIVE=1"],
99
100 shared: {
101 enabled: false,
102 },
103 },
104
105 linux: {
106 srcs: [
107 "Looper.cpp",
108 "ProcessCallStack.cpp",
109 ],
110 },
Dan Willemsenab34b472016-11-29 13:32:55 -0800111 linux_bionic: {
112 enabled: true,
113 srcs: [
114 "Looper.cpp",
115 "ProcessCallStack.cpp",
116 ],
117 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700118
119 darwin: {
120 cflags: ["-Wno-unused-parameter"],
121 },
122
123 // Under MinGW, ctype.h doesn't need multi-byte support
124 windows: {
125 cflags: ["-DMB_CUR_MAX=1"],
126
127 enabled: true,
128 },
129 },
130
131 clang: true,
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700132}
133
134// Include subdirectory makefiles
135// ============================================================
136
137cc_test {
138 name: "SharedBufferTest",
139 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700140 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700141 shared_libs: ["liblog"],
142 srcs: ["SharedBufferTest.cpp"],
143}
144
145subdirs = ["tests"]