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", |
| 97 | ], |
Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 98 | |
| 99 | sanitize: { |
| 100 | misc_undefined: ["integer"], |
| 101 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 102 | }, |
| 103 | |
| 104 | host: { |
| 105 | cflags: ["-DLIBUTILS_NATIVE=1"], |
| 106 | |
| 107 | shared: { |
| 108 | enabled: false, |
| 109 | }, |
| 110 | }, |
| 111 | |
| 112 | linux: { |
| 113 | srcs: [ |
| 114 | "Looper.cpp", |
| 115 | "ProcessCallStack.cpp", |
| 116 | ], |
| 117 | }, |
Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 118 | linux_bionic: { |
| 119 | enabled: true, |
| 120 | srcs: [ |
| 121 | "Looper.cpp", |
| 122 | "ProcessCallStack.cpp", |
| 123 | ], |
| 124 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 125 | |
| 126 | darwin: { |
| 127 | cflags: ["-Wno-unused-parameter"], |
| 128 | }, |
| 129 | |
| 130 | // Under MinGW, ctype.h doesn't need multi-byte support |
| 131 | windows: { |
| 132 | cflags: ["-DMB_CUR_MAX=1"], |
| 133 | |
| 134 | enabled: true, |
| 135 | }, |
| 136 | }, |
| 137 | |
| 138 | clang: true, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | // Include subdirectory makefiles |
| 142 | // ============================================================ |
| 143 | |
| 144 | cc_test { |
| 145 | name: "SharedBufferTest", |
| 146 | host_supported: true, |
Colin Cross | 2fedbf7 | 2016-07-12 23:43:18 -0700 | [diff] [blame] | 147 | static_libs: ["libutils"], |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 148 | shared_libs: ["liblog"], |
| 149 | srcs: ["SharedBufferTest.cpp"], |
| 150 | } |
| 151 | |
| 152 | subdirs = ["tests"] |