| Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 1 | // 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 |  | 
 | 15 | cc_library_shared { | 
 | 16 |     name: "libsensor", | 
 | 17 |  | 
 | 18 |     clang: true, | 
| Chih-Hung Hsieh | b7b8b3d | 2017-10-05 14:26:36 -0700 | [diff] [blame] | 19 |     cflags: [ | 
 | 20 |         "-Wall", | 
 | 21 |         "-Werror", | 
 | 22 |     ], | 
| Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 23 |     cppflags: [ | 
 | 24 |         "-Weverything", | 
| Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 25 |  | 
 | 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 |  | 
 | 64 | subdirs = ["tests"] |