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, |
Justin Yun | 9ca9245 | 2017-07-31 15:41:10 +0900 | [diff] [blame] | 47 | vndk: { |
| 48 | enabled: true, |
| 49 | support_system_process: true, |
| 50 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 51 | host_supported: true, |
| 52 | |
| 53 | srcs: [ |
| 54 | "CallStack.cpp", |
| 55 | "FileMap.cpp", |
| 56 | "JenkinsHash.cpp", |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 57 | "NativeHandle.cpp", |
| 58 | "Printer.cpp", |
| 59 | "PropertyMap.cpp", |
| 60 | "RefBase.cpp", |
| 61 | "SharedBuffer.cpp", |
| 62 | "Static.cpp", |
| 63 | "StopWatch.cpp", |
| 64 | "String8.cpp", |
| 65 | "String16.cpp", |
Hans Boehm | 7f0b260 | 2017-03-15 11:01:03 -0700 | [diff] [blame] | 66 | "StrongPointer.cpp", |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 67 | "SystemClock.cpp", |
| 68 | "Threads.cpp", |
| 69 | "Timers.cpp", |
| 70 | "Tokenizer.cpp", |
| 71 | "Unicode.cpp", |
| 72 | "VectorImpl.cpp", |
| 73 | "misc.cpp", |
| 74 | ], |
| 75 | |
| 76 | cflags: ["-Werror"], |
| 77 | include_dirs: ["external/safe-iop/include"], |
Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 78 | header_libs: [ |
Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 79 | "libutils_headers", |
| 80 | ], |
| 81 | export_header_lib_headers: [ |
Steven Moreland | b084bc3 | 2017-04-12 18:57:57 -0700 | [diff] [blame] | 82 | "libutils_headers", |
| 83 | ], |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 84 | |
| 85 | arch: { |
| 86 | mips: { |
| 87 | cflags: ["-DALIGN_DOUBLE"], |
| 88 | }, |
| 89 | }, |
| 90 | |
| 91 | target: { |
| 92 | android: { |
| 93 | srcs: [ |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 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", |
| 105 | "liblog", |
Jiyong Park | 0b3c24b | 2017-05-26 17:57:18 +0900 | [diff] [blame] | 106 | "libvndksupport", |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 107 | ], |
Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 108 | |
| 109 | sanitize: { |
| 110 | misc_undefined: ["integer"], |
| 111 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 112 | }, |
| 113 | |
| 114 | host: { |
| 115 | cflags: ["-DLIBUTILS_NATIVE=1"], |
| 116 | |
| 117 | shared: { |
| 118 | enabled: false, |
| 119 | }, |
| 120 | }, |
| 121 | |
Dan Willemsen | 4852933 | 2017-10-02 10:38:16 -0700 | [diff] [blame] | 122 | linux_glibc: { |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 123 | srcs: [ |
| 124 | "Looper.cpp", |
| 125 | "ProcessCallStack.cpp", |
| 126 | ], |
| 127 | }, |
Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 128 | linux_bionic: { |
| 129 | enabled: true, |
| 130 | srcs: [ |
| 131 | "Looper.cpp", |
| 132 | "ProcessCallStack.cpp", |
| 133 | ], |
| 134 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 135 | |
| 136 | darwin: { |
| 137 | cflags: ["-Wno-unused-parameter"], |
| 138 | }, |
| 139 | |
| 140 | // Under MinGW, ctype.h doesn't need multi-byte support |
| 141 | windows: { |
| 142 | cflags: ["-DMB_CUR_MAX=1"], |
| 143 | |
| 144 | enabled: true, |
| 145 | }, |
| 146 | }, |
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"] |