blob: 955c0ecd6e161653f24c0ff5d0616e2dec770c50 [file] [log] [blame]
Dan Willemseneee8e7f2016-06-06 22:31:58 -07001//
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
20libcutils_nonwindows_sources = [
21 "fs.c",
22 "multiuser.c",
23 "socket_inaddr_any_server_unix.c",
24 "socket_local_client_unix.c",
25 "socket_local_server_unix.c",
26 "socket_loopback_client_unix.c",
27 "socket_loopback_server_unix.c",
28 "socket_network_client_unix.c",
29 "sockets_unix.cpp",
30 "str_parms.c",
31]
32
33cc_library {
34 name: "libcutils",
35 host_supported: true,
36 srcs: [
37 "config_utils.c",
38 "fs_config.c",
39 "canned_fs_config.c",
40 "hashmap.c",
41 "iosched_policy.c",
42 "load_file.c",
43 "native_handle.c",
44 "open_memstream.c",
Dan Willemseneee8e7f2016-06-06 22:31:58 -070045 "record_stream.c",
46 "sched_policy.c",
47 "sockets.cpp",
48 "strdup16to8.c",
49 "strdup8to16.c",
50 "strlcpy.c",
51 "threads.c",
52 ],
53
54 target: {
55 host: {
56 srcs: ["dlmalloc_stubs.c"],
57 },
58 not_windows: {
59 srcs: libcutils_nonwindows_sources + [
60 "ashmem-host.c",
61 "trace-host.c",
62 ],
63 },
64 windows: {
65 srcs: [
66 "socket_inaddr_any_server_windows.c",
67 "socket_network_client_windows.c",
68 "sockets_windows.cpp",
69 ],
70
71 enabled: true,
72 shared: {
73 enabled: false,
74 },
75 },
76
77 android: {
78 srcs: libcutils_nonwindows_sources + [
79 "android_reboot.c",
80 "ashmem-dev.c",
81 "debugger.c",
82 "klog.cpp",
83 "partition_utils.c",
84 "properties.c",
85 "qtaguid.c",
86 "trace-dev.c",
87 "uevent.c",
88 ],
89
Dan Willemseneee8e7f2016-06-06 22:31:58 -070090 static_libs: ["libdebuggerd_client"],
91 export_static_lib_headers: ["libdebuggerd_client"],
92
93 cflags: [
94 "-std=gnu90",
95 ],
96 },
97
98 android_arm: {
99 srcs: ["arch-arm/memset32.S"],
100 },
101 android_arm64: {
102 srcs: ["arch-arm64/android_memset.S"],
103 },
104
105 android_mips: {
106 srcs: ["arch-mips/android_memset.c"],
107 },
108 android_mips64: {
109 srcs: ["arch-mips/android_memset.c"],
110 },
111
112 android_x86: {
113 srcs: [
114 "arch-x86/android_memset16.S",
115 "arch-x86/android_memset32.S",
116 ],
117 },
118
119 android_x86_64: {
120 srcs: [
121 "arch-x86_64/android_memset16.S",
122 "arch-x86_64/android_memset32.S",
123 ],
124 },
125 },
126
127 shared_libs: ["liblog"],
128 product_variables: {
129 cpusets: {
130 cflags: ["-DUSE_CPUSETS"],
131 },
132 schedboost: {
133 cflags: ["-DUSE_SCHEDBOOST"],
134 },
135 },
136 cflags: [
137 "-Werror",
138 "-Wall",
139 "-Wextra",
140 ],
141
142 clang: true,
143 sanitize: {
144 misc_undefined: ["integer"],
145 },
146}
147
148subdirs = ["tests"]