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