Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2008 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | // some files must not be compiled when building against Mingw |
| 18 | // they correspond to features not used by our host development tools |
| 19 | // which are also hard or even impossible to port to native Win32 |
| 20 | libcutils_nonwindows_sources = [ |
Mark Salyzyn | 52bd37e | 2016-11-07 09:39:30 -0800 | [diff] [blame] | 21 | "android_get_control_file.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 22 | "fs.c", |
| 23 | "multiuser.c", |
| 24 | "socket_inaddr_any_server_unix.c", |
| 25 | "socket_local_client_unix.c", |
| 26 | "socket_local_server_unix.c", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 27 | "socket_loopback_server_unix.c", |
| 28 | "socket_network_client_unix.c", |
| 29 | "sockets_unix.cpp", |
| 30 | "str_parms.c", |
| 31 | ] |
| 32 | |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 33 | cc_library_headers { |
| 34 | name: "libcutils_vndk_headers", |
| 35 | host_supported: true, |
| 36 | export_include_dirs: ["include_vndk"], |
| 37 | } |
| 38 | |
| 39 | cc_library_headers { |
| 40 | name: "libcutils_headers", |
| 41 | host_supported: true, |
| 42 | export_include_dirs: ["include"], |
| 43 | target: { |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 44 | linux_bionic: { |
| 45 | enabled: true, |
| 46 | }, |
| 47 | windows: { |
| 48 | enabled: true, |
| 49 | }, |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 50 | }, |
| 51 | } |
| 52 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 53 | cc_library { |
| 54 | name: "libcutils", |
| 55 | host_supported: true, |
| 56 | srcs: [ |
| 57 | "config_utils.c", |
| 58 | "fs_config.c", |
| 59 | "canned_fs_config.c", |
| 60 | "hashmap.c", |
| 61 | "iosched_policy.c", |
| 62 | "load_file.c", |
| 63 | "native_handle.c", |
| 64 | "open_memstream.c", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 65 | "record_stream.c", |
Isaac Chen | 795267d | 2017-02-16 11:47:33 +0800 | [diff] [blame] | 66 | "sched_policy.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 67 | "sockets.cpp", |
| 68 | "strdup16to8.c", |
| 69 | "strdup8to16.c", |
| 70 | "strlcpy.c", |
| 71 | "threads.c", |
| 72 | ], |
| 73 | |
| 74 | target: { |
| 75 | host: { |
| 76 | srcs: ["dlmalloc_stubs.c"], |
| 77 | }, |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 78 | linux_bionic: { |
| 79 | enabled: true, |
| 80 | exclude_srcs: ["dlmalloc_stubs.c"], |
| 81 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 82 | not_windows: { |
| 83 | srcs: libcutils_nonwindows_sources + [ |
| 84 | "ashmem-host.c", |
| 85 | "trace-host.c", |
| 86 | ], |
| 87 | }, |
| 88 | windows: { |
| 89 | srcs: [ |
| 90 | "socket_inaddr_any_server_windows.c", |
| 91 | "socket_network_client_windows.c", |
| 92 | "sockets_windows.cpp", |
| 93 | ], |
| 94 | |
| 95 | enabled: true, |
| 96 | shared: { |
| 97 | enabled: false, |
| 98 | }, |
| 99 | }, |
| 100 | |
| 101 | android: { |
| 102 | srcs: libcutils_nonwindows_sources + [ |
| 103 | "android_reboot.c", |
| 104 | "ashmem-dev.c", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 105 | "klog.cpp", |
| 106 | "partition_utils.c", |
Elliott Hughes | 4eacd70 | 2017-01-26 17:31:40 -0800 | [diff] [blame] | 107 | "properties.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 108 | "qtaguid.c", |
| 109 | "trace-dev.c", |
| 110 | "uevent.c", |
| 111 | ], |
Evgenii Stepanov | 54c7886 | 2017-01-31 16:33:53 -0800 | [diff] [blame] | 112 | sanitize: { |
| 113 | misc_undefined: ["integer"], |
| 114 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 115 | }, |
| 116 | |
| 117 | android_arm: { |
| 118 | srcs: ["arch-arm/memset32.S"], |
| 119 | }, |
| 120 | android_arm64: { |
| 121 | srcs: ["arch-arm64/android_memset.S"], |
| 122 | }, |
| 123 | |
| 124 | android_mips: { |
| 125 | srcs: ["arch-mips/android_memset.c"], |
| 126 | }, |
| 127 | android_mips64: { |
| 128 | srcs: ["arch-mips/android_memset.c"], |
| 129 | }, |
| 130 | |
| 131 | android_x86: { |
| 132 | srcs: [ |
| 133 | "arch-x86/android_memset16.S", |
| 134 | "arch-x86/android_memset32.S", |
| 135 | ], |
| 136 | }, |
| 137 | |
| 138 | android_x86_64: { |
| 139 | srcs: [ |
| 140 | "arch-x86_64/android_memset16.S", |
| 141 | "arch-x86_64/android_memset32.S", |
| 142 | ], |
| 143 | }, |
| 144 | }, |
| 145 | |
| 146 | shared_libs: ["liblog"], |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 147 | header_libs: ["libcutils_headers"], |
| 148 | export_header_lib_headers: ["libcutils_headers"], |
| 149 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 150 | cflags: [ |
| 151 | "-Werror", |
| 152 | "-Wall", |
| 153 | "-Wextra", |
| 154 | ], |
| 155 | |
| 156 | clang: true, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | subdirs = ["tests"] |