| 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 | }, | 
|  | 89 |  | 
|  | 90 | darwin: { | 
|  | 91 | cflags: ["-Wno-unused-parameter"], | 
|  | 92 | }, | 
|  | 93 |  | 
|  | 94 | // Under MinGW, ctype.h doesn't need multi-byte support | 
|  | 95 | windows: { | 
|  | 96 | cflags: ["-DMB_CUR_MAX=1"], | 
|  | 97 |  | 
|  | 98 | enabled: true, | 
|  | 99 | }, | 
|  | 100 | }, | 
|  | 101 |  | 
|  | 102 | clang: true, | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 103 | } | 
|  | 104 |  | 
|  | 105 | // Include subdirectory makefiles | 
|  | 106 | // ============================================================ | 
|  | 107 |  | 
|  | 108 | cc_test { | 
|  | 109 | name: "SharedBufferTest", | 
|  | 110 | host_supported: true, | 
| Colin Cross | 2fedbf7 | 2016-07-12 23:43:18 -0700 | [diff] [blame] | 111 | static_libs: ["libutils"], | 
| Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 112 | shared_libs: ["liblog"], | 
|  | 113 | srcs: ["SharedBufferTest.cpp"], | 
|  | 114 | } | 
|  | 115 |  | 
|  | 116 | subdirs = ["tests"] |