blob: 3c66744324b161a4cf31664b484521f1ec7ff7ba [file] [log] [blame]
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +00001/*
2 * Copyright (C) 2021 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
17package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "hardware_interfaces_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["hardware_interfaces_license"],
24}
25
deyaoren@google.combde01c62022-04-05 22:16:49 +000026filegroup {
27 name: "sensors-default.rc",
28 srcs: ["sensors-default.rc"],
29}
30
31filegroup {
32 name: "sensors-default.xml",
33 srcs: ["sensors-default.xml"],
34}
35
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000036cc_library_static {
37 name: "libsensorsexampleimpl",
38 vendor: true,
39 shared_libs: [
40 "libbase",
Grace Chengbc2a1b72021-11-09 14:26:23 +000041 "libfmq",
42 "libpower",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000043 "libbinder_ndk",
44 "android.hardware.sensors-V1-ndk",
45 ],
46 export_include_dirs: ["include"],
47 srcs: [
48 "Sensors.cpp",
Grace Chengbc2a1b72021-11-09 14:26:23 +000049 "Sensor.cpp",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000050 ],
51 visibility: [
52 ":__subpackages__",
53 "//hardware/interfaces/tests/extension/sensors:__subpackages__",
54 ],
55}
56
57cc_binary {
58 name: "android.hardware.sensors-service.example",
59 relative_install_path: "hw",
deyaoren@google.combde01c62022-04-05 22:16:49 +000060 init_rc: [":sensors-default.rc"],
61 vintf_fragments: [":sensors-default.xml"],
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000062 vendor: true,
63 shared_libs: [
64 "libbase",
65 "libbinder_ndk",
Grace Chengbc2a1b72021-11-09 14:26:23 +000066 "libfmq",
67 "libpower",
68 "libcutils",
69 "liblog",
70 "libutils",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000071 "android.hardware.sensors-V1-ndk",
72 ],
73 static_libs: [
74 "libsensorsexampleimpl",
75 ],
76 srcs: ["main.cpp"],
77}