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