| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 1 | // 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 Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 15 | cc_library_headers { | 
|  | 16 | name: "libutils_headers", | 
| Steven Moreland | 91527ed | 2017-04-11 12:43:16 -0700 | [diff] [blame] | 17 | vendor_available: true, | 
| Jiyong Park | 612210c | 2018-04-27 21:48:43 +0900 | [diff] [blame] | 18 | recovery_available: true, | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 19 | host_supported: true, | 
| Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 20 |  | 
| Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 21 | header_libs: [ | 
| Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 22 | "liblog_headers", | 
| Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 23 | "libsystem_headers", | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 24 | "libcutils_headers", | 
| Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 25 | ], | 
|  | 26 | export_header_lib_headers: [ | 
| Steven Moreland | 95d7cbb | 2017-07-10 16:40:36 -0700 | [diff] [blame] | 27 | "liblog_headers", | 
| Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 28 | "libsystem_headers", | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 29 | "libcutils_headers", | 
| Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 30 | ], | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 31 | export_include_dirs: ["include"], | 
| Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 32 |  | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 33 | target: { | 
| Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 34 | android: { | 
|  | 35 | header_libs: ["libbacktrace_headers"], | 
|  | 36 | export_header_lib_headers: ["libbacktrace_headers"], | 
|  | 37 | }, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 38 | linux_bionic: { | 
|  | 39 | enabled: true, | 
|  | 40 | }, | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 41 | windows: { | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 42 | enabled: true, | 
|  | 43 | }, | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 44 | }, | 
|  | 45 | } | 
|  | 46 |  | 
| David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 47 | cc_defaults { | 
|  | 48 | name: "libutils_defaults", | 
| Steven Moreland | 91527ed | 2017-04-11 12:43:16 -0700 | [diff] [blame] | 49 | vendor_available: true, | 
| Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 50 | recovery_available: true, | 
| Justin Yun | 9ca9245 | 2017-07-31 15:41:10 +0900 | [diff] [blame] | 51 | vndk: { | 
|  | 52 | enabled: true, | 
|  | 53 | support_system_process: true, | 
|  | 54 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 55 | host_supported: true, | 
|  | 56 |  | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 57 | cflags: [ | 
|  | 58 | "-Wall", | 
|  | 59 | "-Werror", | 
|  | 60 | ], | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 61 | header_libs: [ | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 62 | "libutils_headers", | 
|  | 63 | ], | 
|  | 64 | export_header_lib_headers: [ | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 65 | "libutils_headers", | 
|  | 66 | ], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 67 |  | 
| Steven Moreland | 1f64241 | 2017-06-26 13:52:06 -0700 | [diff] [blame] | 68 | shared_libs: [ | 
|  | 69 | "liblog", | 
|  | 70 | ], | 
| Steven Moreland | 1f64241 | 2017-06-26 13:52:06 -0700 | [diff] [blame] | 71 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 72 | arch: { | 
|  | 73 | mips: { | 
|  | 74 | cflags: ["-DALIGN_DOUBLE"], | 
|  | 75 | }, | 
|  | 76 | }, | 
|  | 77 |  | 
|  | 78 | target: { | 
|  | 79 | android: { | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 80 | cflags: ["-fvisibility=protected"], | 
|  | 81 |  | 
|  | 82 | shared_libs: [ | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 83 | "libcutils", | 
|  | 84 | "libdl", | 
| Jiyong Park | 0b3c24b | 2017-05-26 17:57:18 +0900 | [diff] [blame] | 85 | "libvndksupport", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 86 | ], | 
| Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 87 |  | 
|  | 88 | sanitize: { | 
|  | 89 | misc_undefined: ["integer"], | 
|  | 90 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 91 | }, | 
|  | 92 |  | 
| Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 93 | recovery: { | 
|  | 94 | exclude_shared_libs: ["libvndksupport"], | 
|  | 95 | }, | 
|  | 96 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 97 | host: { | 
|  | 98 | cflags: ["-DLIBUTILS_NATIVE=1"], | 
|  | 99 |  | 
|  | 100 | shared: { | 
|  | 101 | enabled: false, | 
|  | 102 | }, | 
|  | 103 | }, | 
|  | 104 |  | 
| Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 105 | linux_bionic: { | 
|  | 106 | enabled: true, | 
| Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 107 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 108 |  | 
|  | 109 | darwin: { | 
|  | 110 | cflags: ["-Wno-unused-parameter"], | 
|  | 111 | }, | 
|  | 112 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 113 | windows: { | 
| Dan Willemsen | 528f144 | 2017-11-29 18:06:11 -0800 | [diff] [blame] | 114 | cflags: [ | 
|  | 115 | // Under MinGW, ctype.h doesn't need multi-byte support | 
|  | 116 | "-DMB_CUR_MAX=1", | 
|  | 117 | "-Wno-unused-private-field", | 
|  | 118 | ], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 119 |  | 
|  | 120 | enabled: true, | 
|  | 121 | }, | 
|  | 122 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 123 | } | 
|  | 124 |  | 
| David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 125 | cc_library { | 
|  | 126 | name: "libutils", | 
|  | 127 | defaults: ["libutils_defaults"], | 
|  | 128 |  | 
|  | 129 | srcs: [ | 
|  | 130 | "FileMap.cpp", | 
|  | 131 | "JenkinsHash.cpp", | 
|  | 132 | "NativeHandle.cpp", | 
|  | 133 | "Printer.cpp", | 
|  | 134 | "PropertyMap.cpp", | 
|  | 135 | "RefBase.cpp", | 
|  | 136 | "SharedBuffer.cpp", | 
| David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 137 | "StopWatch.cpp", | 
|  | 138 | "String8.cpp", | 
|  | 139 | "String16.cpp", | 
|  | 140 | "StrongPointer.cpp", | 
|  | 141 | "SystemClock.cpp", | 
|  | 142 | "Threads.cpp", | 
|  | 143 | "Timers.cpp", | 
|  | 144 | "Tokenizer.cpp", | 
|  | 145 | "Unicode.cpp", | 
|  | 146 | "VectorImpl.cpp", | 
|  | 147 | "misc.cpp", | 
|  | 148 | ], | 
|  | 149 |  | 
|  | 150 | target: { | 
|  | 151 | android: { | 
|  | 152 | srcs: [ | 
|  | 153 | "Trace.cpp", | 
|  | 154 | ], | 
|  | 155 | }, | 
|  | 156 | linux: { | 
| Josh Gao | 2d08ae5 | 2018-07-18 17:26:24 -0700 | [diff] [blame] | 157 | shared_libs: ["libbase"], | 
| David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 158 | srcs: [ | 
|  | 159 | "Looper.cpp", | 
|  | 160 | ], | 
|  | 161 | }, | 
|  | 162 | }, | 
|  | 163 | } | 
|  | 164 |  | 
|  | 165 | cc_library { | 
|  | 166 | name: "libutilscallstack", | 
|  | 167 | defaults: ["libutils_defaults"], | 
|  | 168 |  | 
|  | 169 | srcs: [ | 
|  | 170 | "CallStack.cpp", | 
|  | 171 | ], | 
|  | 172 |  | 
|  | 173 | arch: { | 
|  | 174 | mips: { | 
|  | 175 | cflags: ["-DALIGN_DOUBLE"], | 
|  | 176 | }, | 
|  | 177 | }, | 
|  | 178 |  | 
|  | 179 | target: { | 
|  | 180 | android: { | 
|  | 181 | shared_libs: [ | 
|  | 182 | "libutils", | 
|  | 183 | "libbacktrace", | 
|  | 184 | ], | 
|  | 185 | }, | 
|  | 186 | linux: { | 
|  | 187 | srcs: [ | 
|  | 188 | "ProcessCallStack.cpp", | 
|  | 189 | ], | 
|  | 190 | }, | 
|  | 191 | }, | 
|  | 192 | } | 
|  | 193 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 194 | // Include subdirectory makefiles | 
|  | 195 | // ============================================================ | 
|  | 196 |  | 
|  | 197 | cc_test { | 
|  | 198 | name: "SharedBufferTest", | 
|  | 199 | host_supported: true, | 
| Colin Cross | 2fedbf7 | 2016-07-12 23:43:18 -0700 | [diff] [blame] | 200 | static_libs: ["libutils"], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 201 | shared_libs: ["liblog"], | 
|  | 202 | srcs: ["SharedBufferTest.cpp"], | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 203 | cflags: [ | 
|  | 204 | "-Wall", | 
|  | 205 | "-Werror", | 
|  | 206 | ], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 207 | } |