| 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_network_client_unix.c", | 
 | 28 |     "sockets_unix.cpp", | 
 | 29 |     "str_parms.c", | 
 | 30 | ] | 
 | 31 |  | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 32 | cc_library_headers { | 
 | 33 |     name: "libcutils_vndk_headers", | 
 | 34 |     host_supported: true, | 
 | 35 |     export_include_dirs: ["include_vndk"], | 
 | 36 | } | 
 | 37 |  | 
 | 38 | cc_library_headers { | 
 | 39 |     name: "libcutils_headers", | 
 | 40 |     host_supported: true, | 
 | 41 |     export_include_dirs: ["include"], | 
 | 42 |     target: { | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 43 |         linux_bionic: { | 
 | 44 |             enabled: true, | 
 | 45 |         }, | 
 | 46 |         windows: { | 
 | 47 |             enabled: true, | 
 | 48 |         }, | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 49 |     }, | 
 | 50 | } | 
 | 51 |  | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 52 | cc_library { | 
 | 53 |     name: "libcutils", | 
 | 54 |     host_supported: true, | 
 | 55 |     srcs: [ | 
 | 56 |         "config_utils.c", | 
 | 57 |         "fs_config.c", | 
 | 58 |         "canned_fs_config.c", | 
 | 59 |         "hashmap.c", | 
 | 60 |         "iosched_policy.c", | 
 | 61 |         "load_file.c", | 
 | 62 |         "native_handle.c", | 
 | 63 |         "open_memstream.c", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 64 |         "record_stream.c", | 
| Isaac Chen | 795267d | 2017-02-16 11:47:33 +0800 | [diff] [blame] | 65 |         "sched_policy.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 66 |         "sockets.cpp", | 
 | 67 |         "strdup16to8.c", | 
 | 68 |         "strdup8to16.c", | 
 | 69 |         "strlcpy.c", | 
 | 70 |         "threads.c", | 
 | 71 |     ], | 
 | 72 |  | 
 | 73 |     target: { | 
 | 74 |         host: { | 
 | 75 |             srcs: ["dlmalloc_stubs.c"], | 
 | 76 |         }, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 77 |         linux_bionic: { | 
 | 78 |             enabled: true, | 
 | 79 |             exclude_srcs: ["dlmalloc_stubs.c"], | 
 | 80 |         }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 81 |         not_windows: { | 
 | 82 |             srcs: libcutils_nonwindows_sources + [ | 
 | 83 |                 "ashmem-host.c", | 
 | 84 |                 "trace-host.c", | 
 | 85 |             ], | 
 | 86 |         }, | 
 | 87 |         windows: { | 
 | 88 |             srcs: [ | 
 | 89 |                 "socket_inaddr_any_server_windows.c", | 
 | 90 |                 "socket_network_client_windows.c", | 
 | 91 |                 "sockets_windows.cpp", | 
 | 92 |             ], | 
 | 93 |  | 
 | 94 |             enabled: true, | 
 | 95 |             shared: { | 
 | 96 |                 enabled: false, | 
 | 97 |             }, | 
 | 98 |         }, | 
 | 99 |  | 
 | 100 |         android: { | 
 | 101 |             srcs: libcutils_nonwindows_sources + [ | 
 | 102 |                 "android_reboot.c", | 
 | 103 |                 "ashmem-dev.c", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 104 |                 "klog.cpp", | 
 | 105 |                 "partition_utils.c", | 
| Elliott Hughes | 4eacd70 | 2017-01-26 17:31:40 -0800 | [diff] [blame] | 106 |                 "properties.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 107 |                 "qtaguid.c", | 
 | 108 |                 "trace-dev.c", | 
 | 109 |                 "uevent.c", | 
 | 110 |             ], | 
| Evgenii Stepanov | 54c7886 | 2017-01-31 16:33:53 -0800 | [diff] [blame] | 111 |             sanitize: { | 
 | 112 |                 misc_undefined: ["integer"], | 
 | 113 |             }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 114 |         }, | 
 | 115 |  | 
 | 116 |         android_arm: { | 
 | 117 |             srcs: ["arch-arm/memset32.S"], | 
 | 118 |         }, | 
 | 119 |         android_arm64: { | 
 | 120 |             srcs: ["arch-arm64/android_memset.S"], | 
 | 121 |         }, | 
 | 122 |  | 
 | 123 |         android_mips: { | 
 | 124 |             srcs: ["arch-mips/android_memset.c"], | 
 | 125 |         }, | 
 | 126 |         android_mips64: { | 
 | 127 |             srcs: ["arch-mips/android_memset.c"], | 
 | 128 |         }, | 
 | 129 |  | 
 | 130 |         android_x86: { | 
 | 131 |             srcs: [ | 
 | 132 |                 "arch-x86/android_memset16.S", | 
 | 133 |                 "arch-x86/android_memset32.S", | 
 | 134 |             ], | 
 | 135 |         }, | 
 | 136 |  | 
 | 137 |         android_x86_64: { | 
 | 138 |             srcs: [ | 
 | 139 |                 "arch-x86_64/android_memset16.S", | 
 | 140 |                 "arch-x86_64/android_memset32.S", | 
 | 141 |             ], | 
 | 142 |         }, | 
 | 143 |     }, | 
 | 144 |  | 
 | 145 |     shared_libs: ["liblog"], | 
| Steven Moreland | d73be1b | 2017-04-13 23:48:57 -0700 | [diff] [blame] | 146 |     header_libs: [ | 
 | 147 |         "libcutils_headers", | 
 | 148 |         "libutils_headers", | 
 | 149 |     ], | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 150 |     export_header_lib_headers: ["libcutils_headers"], | 
 | 151 |  | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 152 |     cflags: [ | 
 | 153 |         "-Werror", | 
 | 154 |         "-Wall", | 
 | 155 |         "-Wextra", | 
 | 156 |     ], | 
 | 157 |  | 
 | 158 |     clang: true, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 159 | } | 
 | 160 |  | 
 | 161 | subdirs = ["tests"] |