| 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: [ | 
|  | 21 | "libsystem_headers", | 
|  | 22 | "libcutils_headers" | 
|  | 23 | ], | 
|  | 24 | export_header_lib_headers: [ | 
|  | 25 | "libsystem_headers", | 
|  | 26 | "libcutils_headers" | 
|  | 27 | ], | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 28 | export_include_dirs: ["include"], | 
| Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 29 |  | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 30 | target: { | 
| Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 31 | android: { | 
|  | 32 | header_libs: ["libbacktrace_headers"], | 
|  | 33 | export_header_lib_headers: ["libbacktrace_headers"], | 
|  | 34 | }, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 35 | linux_bionic: { | 
|  | 36 | enabled: true, | 
|  | 37 | }, | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 38 | windows: { | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 39 | enabled: true, | 
|  | 40 | }, | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 41 | }, | 
|  | 42 | } | 
|  | 43 |  | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 44 | cc_library { | 
|  | 45 | name: "libutils", | 
| Steven Moreland | 91527ed | 2017-04-11 12:43:16 -0700 | [diff] [blame] | 46 | vendor_available: true, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 47 | host_supported: true, | 
|  | 48 |  | 
|  | 49 | srcs: [ | 
|  | 50 | "CallStack.cpp", | 
|  | 51 | "FileMap.cpp", | 
|  | 52 | "JenkinsHash.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 53 | "NativeHandle.cpp", | 
|  | 54 | "Printer.cpp", | 
|  | 55 | "PropertyMap.cpp", | 
|  | 56 | "RefBase.cpp", | 
|  | 57 | "SharedBuffer.cpp", | 
|  | 58 | "Static.cpp", | 
|  | 59 | "StopWatch.cpp", | 
|  | 60 | "String8.cpp", | 
|  | 61 | "String16.cpp", | 
| Hans Boehm | 7f0b260 | 2017-03-15 11:01:03 -0700 | [diff] [blame] | 62 | "StrongPointer.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 63 | "SystemClock.cpp", | 
|  | 64 | "Threads.cpp", | 
|  | 65 | "Timers.cpp", | 
|  | 66 | "Tokenizer.cpp", | 
|  | 67 | "Unicode.cpp", | 
|  | 68 | "VectorImpl.cpp", | 
|  | 69 | "misc.cpp", | 
|  | 70 | ], | 
|  | 71 |  | 
|  | 72 | cflags: ["-Werror"], | 
|  | 73 | include_dirs: ["external/safe-iop/include"], | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 74 | header_libs: [ | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 75 | "libutils_headers", | 
|  | 76 | ], | 
|  | 77 | export_header_lib_headers: [ | 
| Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 78 | "libutils_headers", | 
|  | 79 | ], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 80 |  | 
|  | 81 | arch: { | 
|  | 82 | mips: { | 
|  | 83 | cflags: ["-DALIGN_DOUBLE"], | 
|  | 84 | }, | 
|  | 85 | }, | 
|  | 86 |  | 
|  | 87 | target: { | 
|  | 88 | android: { | 
|  | 89 | srcs: [ | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 90 | "Looper.cpp", | 
|  | 91 | "ProcessCallStack.cpp", | 
|  | 92 | "Trace.cpp", | 
|  | 93 | ], | 
|  | 94 |  | 
|  | 95 | cflags: ["-fvisibility=protected"], | 
|  | 96 |  | 
|  | 97 | shared_libs: [ | 
|  | 98 | "libbacktrace", | 
|  | 99 | "libcutils", | 
|  | 100 | "libdl", | 
|  | 101 | "liblog", | 
| Jiyong Park | 0b3c24b | 2017-05-26 17:57:18 +0900 | [diff] [blame] | 102 | "libvndksupport", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 103 | ], | 
| Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 104 |  | 
|  | 105 | sanitize: { | 
|  | 106 | misc_undefined: ["integer"], | 
|  | 107 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 108 | }, | 
|  | 109 |  | 
|  | 110 | host: { | 
|  | 111 | cflags: ["-DLIBUTILS_NATIVE=1"], | 
|  | 112 |  | 
|  | 113 | shared: { | 
|  | 114 | enabled: false, | 
|  | 115 | }, | 
|  | 116 | }, | 
|  | 117 |  | 
|  | 118 | linux: { | 
|  | 119 | srcs: [ | 
|  | 120 | "Looper.cpp", | 
|  | 121 | "ProcessCallStack.cpp", | 
|  | 122 | ], | 
|  | 123 | }, | 
| Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 124 | linux_bionic: { | 
|  | 125 | enabled: true, | 
|  | 126 | srcs: [ | 
|  | 127 | "Looper.cpp", | 
|  | 128 | "ProcessCallStack.cpp", | 
|  | 129 | ], | 
|  | 130 | }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 131 |  | 
|  | 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 Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 143 | } | 
|  | 144 |  | 
|  | 145 | // Include subdirectory makefiles | 
|  | 146 | // ============================================================ | 
|  | 147 |  | 
|  | 148 | cc_test { | 
|  | 149 | name: "SharedBufferTest", | 
|  | 150 | host_supported: true, | 
| Colin Cross | 2fedbf7 | 2016-07-12 23:43:18 -0700 | [diff] [blame] | 151 | static_libs: ["libutils"], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 152 | shared_libs: ["liblog"], | 
|  | 153 | srcs: ["SharedBufferTest.cpp"], | 
|  | 154 | } | 
|  | 155 |  | 
|  | 156 | subdirs = ["tests"] |