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