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