| 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 | 48cdaff | 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 | 2d0dc99 | 2017-04-12 18:57:57 -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 | 4ad9d51 | 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 | 4ad9d51 | 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 | 48cdaff | 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", | 
 | 53 |         "LinearTransform.cpp", | 
 | 54 |         "Log.cpp", | 
 | 55 |         "NativeHandle.cpp", | 
 | 56 |         "Printer.cpp", | 
 | 57 |         "PropertyMap.cpp", | 
 | 58 |         "RefBase.cpp", | 
 | 59 |         "SharedBuffer.cpp", | 
 | 60 |         "Static.cpp", | 
 | 61 |         "StopWatch.cpp", | 
 | 62 |         "String8.cpp", | 
 | 63 |         "String16.cpp", | 
| Hans Boehm | 7f0b260 | 2017-03-15 11:01:03 -0700 | [diff] [blame] | 64 |         "StrongPointer.cpp", | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 65 |         "SystemClock.cpp", | 
 | 66 |         "Threads.cpp", | 
 | 67 |         "Timers.cpp", | 
 | 68 |         "Tokenizer.cpp", | 
 | 69 |         "Unicode.cpp", | 
 | 70 |         "VectorImpl.cpp", | 
 | 71 |         "misc.cpp", | 
 | 72 |     ], | 
 | 73 |  | 
 | 74 |     cflags: ["-Werror"], | 
 | 75 |     include_dirs: ["external/safe-iop/include"], | 
| Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 76 |     header_libs: ["libutils_headers"], | 
 | 77 |     export_header_lib_headers: ["libutils_headers"], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 78 |  | 
 | 79 |     arch: { | 
 | 80 |         mips: { | 
 | 81 |             cflags: ["-DALIGN_DOUBLE"], | 
 | 82 |         }, | 
 | 83 |     }, | 
 | 84 |  | 
 | 85 |     target: { | 
 | 86 |         android: { | 
 | 87 |             srcs: [ | 
 | 88 |                 "BlobCache.cpp", | 
 | 89 |                 "Looper.cpp", | 
 | 90 |                 "ProcessCallStack.cpp", | 
 | 91 |                 "Trace.cpp", | 
 | 92 |             ], | 
 | 93 |  | 
 | 94 |             cflags: ["-fvisibility=protected"], | 
 | 95 |  | 
 | 96 |             shared_libs: [ | 
 | 97 |                 "libbacktrace", | 
 | 98 |                 "libcutils", | 
 | 99 |                 "libdl", | 
 | 100 |                 "liblog", | 
 | 101 |             ], | 
| Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 102 |  | 
 | 103 |             sanitize: { | 
 | 104 |                 misc_undefined: ["integer"], | 
 | 105 |             }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 106 |         }, | 
 | 107 |  | 
 | 108 |         host: { | 
 | 109 |             cflags: ["-DLIBUTILS_NATIVE=1"], | 
 | 110 |  | 
 | 111 |             shared: { | 
 | 112 |                 enabled: false, | 
 | 113 |             }, | 
 | 114 |         }, | 
 | 115 |  | 
 | 116 |         linux: { | 
 | 117 |             srcs: [ | 
 | 118 |                 "Looper.cpp", | 
 | 119 |                 "ProcessCallStack.cpp", | 
 | 120 |             ], | 
 | 121 |         }, | 
| Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 122 |         linux_bionic: { | 
 | 123 |             enabled: true, | 
 | 124 |             srcs: [ | 
 | 125 |                 "Looper.cpp", | 
 | 126 |                 "ProcessCallStack.cpp", | 
 | 127 |             ], | 
 | 128 |         }, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 129 |  | 
 | 130 |         darwin: { | 
 | 131 |             cflags: ["-Wno-unused-parameter"], | 
 | 132 |         }, | 
 | 133 |  | 
 | 134 |         // Under MinGW, ctype.h doesn't need multi-byte support | 
 | 135 |         windows: { | 
 | 136 |             cflags: ["-DMB_CUR_MAX=1"], | 
 | 137 |  | 
 | 138 |             enabled: true, | 
 | 139 |         }, | 
 | 140 |     }, | 
 | 141 |  | 
 | 142 |     clang: true, | 
| 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"] |