blob: 3589e6f12ec6609755bce677316f6d7905fe11aa [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: [
Steven Moreland25db8dc2017-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 Moreland25db8dc2017-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 Morelandd3b4b2c2017-04-13 21:01:40 -070031
Vijay Venkatraman75acc7b2017-01-05 10:39:38 -080032 target: {
Steven Morelandd3b4b2c2017-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 Moreland91527ed2017-04-11 12:43:16 -070048 vendor_available: true,
Justin Yun9ca92452017-07-31 15:41:10 +090049 vndk: {
50 enabled: true,
51 support_system_process: true,
52 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -070053 host_supported: true,
54
55 srcs: [
56 "CallStack.cpp",
57 "FileMap.cpp",
58 "JenkinsHash.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070059 "NativeHandle.cpp",
60 "Printer.cpp",
61 "PropertyMap.cpp",
62 "RefBase.cpp",
63 "SharedBuffer.cpp",
64 "Static.cpp",
65 "StopWatch.cpp",
66 "String8.cpp",
67 "String16.cpp",
Hans Boehm7f0b2602017-03-15 11:01:03 -070068 "StrongPointer.cpp",
Dan Willemsen2e1591b2016-07-12 17:20:18 -070069 "SystemClock.cpp",
70 "Threads.cpp",
71 "Timers.cpp",
72 "Tokenizer.cpp",
73 "Unicode.cpp",
74 "VectorImpl.cpp",
75 "misc.cpp",
76 ],
77
78 cflags: ["-Werror"],
79 include_dirs: ["external/safe-iop/include"],
Steven Morelandb084bc32017-04-12 18:57:57 -070080 header_libs: [
Steven Morelandb084bc32017-04-12 18:57:57 -070081 "libutils_headers",
82 ],
83 export_header_lib_headers: [
Steven Morelandb084bc32017-04-12 18:57:57 -070084 "libutils_headers",
85 ],
Dan Willemsen2e1591b2016-07-12 17:20:18 -070086
87 arch: {
88 mips: {
89 cflags: ["-DALIGN_DOUBLE"],
90 },
91 },
92
93 target: {
94 android: {
95 srcs: [
Dan Willemsen2e1591b2016-07-12 17:20:18 -070096 "Trace.cpp",
97 ],
98
99 cflags: ["-fvisibility=protected"],
100
101 shared_libs: [
102 "libbacktrace",
103 "libcutils",
104 "libdl",
105 "liblog",
Jiyong Park0b3c24b2017-05-26 17:57:18 +0900106 "libvndksupport",
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 },
Dan Willemsenbdddcab2017-10-03 14:17:31 -0700113 linux: {
114 srcs: [
115 "Looper.cpp",
116 "ProcessCallStack.cpp",
117 ],
118 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700119
120 host: {
121 cflags: ["-DLIBUTILS_NATIVE=1"],
122
123 shared: {
124 enabled: false,
125 },
126 },
127
Dan Willemsenab34b472016-11-29 13:32:55 -0800128 linux_bionic: {
129 enabled: true,
Dan Willemsenab34b472016-11-29 13:32:55 -0800130 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700131
132 darwin: {
133 cflags: ["-Wno-unused-parameter"],
134 },
135
136 // Under MinGW, ctype.h doesn't need multi-byte support
137 windows: {
138 cflags: ["-DMB_CUR_MAX=1"],
139
140 enabled: true,
141 },
142 },
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700143}
144
145// Include subdirectory makefiles
146// ============================================================
147
148cc_test {
149 name: "SharedBufferTest",
150 host_supported: true,
Colin Cross2fedbf72016-07-12 23:43:18 -0700151 static_libs: ["libutils"],
Dan Willemsen2e1591b2016-07-12 17:20:18 -0700152 shared_libs: ["liblog"],
153 srcs: ["SharedBufferTest.cpp"],
154}
155
156subdirs = ["tests"]