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