1 // Copyright (C) 2017 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_defaults { 16 name: "hid_defaults", 17 cflags: [ 18 "-Wall", 19 "-Werror", 20 "-Wextra", 21 ], 22 } 23 24 cc_library { 25 name: "libhidparser", 26 defaults: ["hid_defaults"], 27 host_supported: true, 28 29 // indended to be used by hal components, thus vendor 30 vendor: true, 31 32 srcs: [ 33 "HidGlobal.cpp", 34 "HidItem.cpp", 35 "HidLocal.cpp", 36 "HidParser.cpp", 37 "HidReport.cpp", 38 "HidTree.cpp", 39 ], 40 export_include_dirs: ["."], 41 42 target: { 43 android: { 44 cflags: ["-DLOG_TAG=\"HidUtil\""], 45 shared_libs: ["libbase"], 46 }, 47 }, 48 } 49 50 // 51 // Example of HidParser 52 // 53 cc_binary_host { 54 name: "hidparser_example", 55 defaults: ["hid_defaults"], 56 57 srcs: [ 58 "test/HidParserExample.cpp", 59 "test/TestHidDescriptor.cpp", 60 ], 61 static_libs: ["libhidparser"], 62 63 local_include_dirs: ["test"], 64 } 65 66 // 67 // Another example of HidParser 68 // 69 cc_binary_host { 70 name: "hidparser_example2", 71 defaults: ["hid_defaults"], 72 73 srcs: [ 74 "test/HidParserExample2.cpp", 75 "test/TestHidDescriptor.cpp", 76 ], 77 static_libs: ["libhidparser"], 78 79 local_include_dirs: ["test"], 80 } 81 82 // 83 // Test for TriState template 84 // 85 cc_test_host { 86 name: "tristate_test", 87 defaults: ["hid_defaults"], 88 89 srcs: ["test/TriStateTest.cpp"], 90 91 local_include_dirs: ["test"], 92 } 93