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