blob: 940ff5afbcd66f3998b24e4cfabf8ba86d885acf [file] [log] [blame]
Mathias Agopian801ea092017-03-06 15:05:04 -08001// Copyright 2010 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
15cc_library_shared {
16 name: "libsensor",
17
18 clang: true,
Chih-Hung Hsiehb7b8b3d2017-10-05 14:26:36 -070019 cflags: [
20 "-Wall",
21 "-Werror",
22 ],
Mathias Agopian801ea092017-03-06 15:05:04 -080023 cppflags: [
24 "-Weverything",
Mathias Agopian801ea092017-03-06 15:05:04 -080025
26 // The static constructors and destructors in this library have not been noted to
27 // introduce significant overheads
28 "-Wno-exit-time-destructors",
29 "-Wno-global-constructors",
30
31 // We only care about compiling as C++14
32 "-Wno-c++98-compat-pedantic",
33
34 // android/sensors.h uses nested anonymous unions and anonymous structs
35 "-Wno-nested-anon-types",
36 "-Wno-gnu-anonymous-struct",
37
38 // Don't warn about struct padding
39 "-Wno-padded",
40 ],
41
42 srcs: [
43 "BitTube.cpp",
44 "ISensorEventConnection.cpp",
45 "ISensorServer.cpp",
46 "Sensor.cpp",
47 "SensorEventQueue.cpp",
48 "SensorManager.cpp",
49 ],
50
51 shared_libs: [
52 "libbinder",
53 "libcutils",
54 "libutils",
55 "liblog",
56 "libhardware",
57 ],
58
59 export_include_dirs: ["include"],
60
61 export_shared_lib_headers: ["libbinder", "libhardware"],
62}
63
64subdirs = ["tests"]