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: { |
| 44 | windows: { |
| 45 | enabled: true, |
| 46 | }, |
| 47 | }, |
| 48 | } |
| 49 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 50 | cc_library { |
| 51 | name: "libcutils", |
| 52 | host_supported: true, |
| 53 | srcs: [ |
| 54 | "config_utils.c", |
| 55 | "fs_config.c", |
| 56 | "canned_fs_config.c", |
| 57 | "hashmap.c", |
| 58 | "iosched_policy.c", |
| 59 | "load_file.c", |
| 60 | "native_handle.c", |
| 61 | "open_memstream.c", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 62 | "record_stream.c", |
| 63 | "sched_policy.c", |
| 64 | "sockets.cpp", |
| 65 | "strdup16to8.c", |
| 66 | "strdup8to16.c", |
| 67 | "strlcpy.c", |
| 68 | "threads.c", |
| 69 | ], |
| 70 | |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 71 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 72 | target: { |
| 73 | host: { |
| 74 | srcs: ["dlmalloc_stubs.c"], |
| 75 | }, |
| 76 | not_windows: { |
| 77 | srcs: libcutils_nonwindows_sources + [ |
| 78 | "ashmem-host.c", |
| 79 | "trace-host.c", |
| 80 | ], |
| 81 | }, |
| 82 | windows: { |
| 83 | srcs: [ |
| 84 | "socket_inaddr_any_server_windows.c", |
| 85 | "socket_network_client_windows.c", |
| 86 | "sockets_windows.cpp", |
| 87 | ], |
| 88 | |
| 89 | enabled: true, |
| 90 | shared: { |
| 91 | enabled: false, |
| 92 | }, |
| 93 | }, |
| 94 | |
| 95 | android: { |
| 96 | srcs: libcutils_nonwindows_sources + [ |
| 97 | "android_reboot.c", |
| 98 | "ashmem-dev.c", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 99 | "klog.cpp", |
| 100 | "partition_utils.c", |
Elliott Hughes | 4eacd70 | 2017-01-26 17:31:40 -0800 | [diff] [blame] | 101 | "properties.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 102 | "qtaguid.c", |
| 103 | "trace-dev.c", |
| 104 | "uevent.c", |
| 105 | ], |
Evgenii Stepanov | 54c7886 | 2017-01-31 16:33:53 -0800 | [diff] [blame^] | 106 | sanitize: { |
| 107 | misc_undefined: ["integer"], |
| 108 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 109 | }, |
| 110 | |
| 111 | android_arm: { |
| 112 | srcs: ["arch-arm/memset32.S"], |
| 113 | }, |
| 114 | android_arm64: { |
| 115 | srcs: ["arch-arm64/android_memset.S"], |
| 116 | }, |
| 117 | |
| 118 | android_mips: { |
| 119 | srcs: ["arch-mips/android_memset.c"], |
| 120 | }, |
| 121 | android_mips64: { |
| 122 | srcs: ["arch-mips/android_memset.c"], |
| 123 | }, |
| 124 | |
| 125 | android_x86: { |
| 126 | srcs: [ |
| 127 | "arch-x86/android_memset16.S", |
| 128 | "arch-x86/android_memset32.S", |
| 129 | ], |
| 130 | }, |
| 131 | |
| 132 | android_x86_64: { |
| 133 | srcs: [ |
| 134 | "arch-x86_64/android_memset16.S", |
| 135 | "arch-x86_64/android_memset32.S", |
| 136 | ], |
| 137 | }, |
| 138 | }, |
| 139 | |
| 140 | shared_libs: ["liblog"], |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 141 | header_libs: ["libcutils_headers"], |
| 142 | export_header_lib_headers: ["libcutils_headers"], |
| 143 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 144 | product_variables: { |
| 145 | cpusets: { |
| 146 | cflags: ["-DUSE_CPUSETS"], |
| 147 | }, |
| 148 | schedboost: { |
| 149 | cflags: ["-DUSE_SCHEDBOOST"], |
| 150 | }, |
| 151 | }, |
| 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"] |