| 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", | 
|  | 23 | "libcutils_headers" | 
|  | 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", | 
|  | 28 | "libcutils_headers" | 
|  | 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 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 46 | cc_library { | 
|  | 47 | name: "libutils", | 
| 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 |  | 
|  | 55 | srcs: [ | 
|  | 56 | "CallStack.cpp", | 
|  | 57 | "FileMap.cpp", | 
|  | 58 | "JenkinsHash.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 59 | "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 Boehm | 7f0b260 | 2017-03-15 11:01:03 -0700 | [diff] [blame] | 68 | "StrongPointer.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 69 | "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 Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 80 | header_libs: [ | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 81 | "libutils_headers", | 
|  | 82 | ], | 
|  | 83 | export_header_lib_headers: [ | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 84 | "libutils_headers", | 
|  | 85 | ], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 86 |  | 
| Steven Moreland | 1f64241 | 2017-06-26 13:52:06 -0700 | [diff] [blame] | 87 | shared_libs: [ | 
|  | 88 | "liblog", | 
|  | 89 | ], | 
| Steven Moreland | 1f64241 | 2017-06-26 13:52:06 -0700 | [diff] [blame] | 90 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 91 | arch: { | 
|  | 92 | mips: { | 
|  | 93 | cflags: ["-DALIGN_DOUBLE"], | 
|  | 94 | }, | 
|  | 95 | }, | 
|  | 96 |  | 
|  | 97 | target: { | 
|  | 98 | android: { | 
|  | 99 | srcs: [ | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 100 | "Trace.cpp", | 
|  | 101 | ], | 
|  | 102 |  | 
|  | 103 | cflags: ["-fvisibility=protected"], | 
|  | 104 |  | 
|  | 105 | shared_libs: [ | 
|  | 106 | "libbacktrace", | 
|  | 107 | "libcutils", | 
|  | 108 | "libdl", | 
| Jiyong Park | 0b3c24b | 2017-05-26 17:57:18 +0900 | [diff] [blame] | 109 | "libvndksupport", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 110 | ], | 
| Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 111 |  | 
|  | 112 | sanitize: { | 
|  | 113 | misc_undefined: ["integer"], | 
|  | 114 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 115 | }, | 
| Dan Willemsen | bdddcab | 2017-10-03 14:17:31 -0700 | [diff] [blame] | 116 | linux: { | 
|  | 117 | srcs: [ | 
|  | 118 | "Looper.cpp", | 
|  | 119 | "ProcessCallStack.cpp", | 
|  | 120 | ], | 
|  | 121 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 122 |  | 
|  | 123 | host: { | 
|  | 124 | cflags: ["-DLIBUTILS_NATIVE=1"], | 
|  | 125 |  | 
|  | 126 | shared: { | 
|  | 127 | enabled: false, | 
|  | 128 | }, | 
|  | 129 | }, | 
|  | 130 |  | 
| Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 131 | linux_bionic: { | 
|  | 132 | enabled: true, | 
| Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 133 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 134 |  | 
|  | 135 | darwin: { | 
|  | 136 | cflags: ["-Wno-unused-parameter"], | 
|  | 137 | }, | 
|  | 138 |  | 
|  | 139 | // Under MinGW, ctype.h doesn't need multi-byte support | 
|  | 140 | windows: { | 
|  | 141 | cflags: ["-DMB_CUR_MAX=1"], | 
|  | 142 |  | 
|  | 143 | enabled: true, | 
|  | 144 | }, | 
|  | 145 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 146 | } | 
|  | 147 |  | 
|  | 148 | // Include subdirectory makefiles | 
|  | 149 | // ============================================================ | 
|  | 150 |  | 
|  | 151 | cc_test { | 
|  | 152 | name: "SharedBufferTest", | 
|  | 153 | host_supported: true, | 
| Colin Cross | 2fedbf7 | 2016-07-12 23:43:18 -0700 | [diff] [blame] | 154 | static_libs: ["libutils"], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 155 | shared_libs: ["liblog"], | 
|  | 156 | srcs: ["SharedBufferTest.cpp"], | 
|  | 157 | } | 
|  | 158 |  | 
|  | 159 | subdirs = ["tests"] |