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