blob: 384ee97f3ac1c65ab64f8a5ea9944e8d48a348da [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
Jooyung Han9aaa45e2023-10-10 13:53:36 +090031prebuilt_etc {
deyaoren@google.combde01c62022-04-05 22:16:49 +000032 name: "sensors-default.xml",
Jooyung Han9aaa45e2023-10-10 13:53:36 +090033 src: "sensors-default.xml",
34 sub_dir: "vintf",
35 installable: false,
deyaoren@google.combde01c62022-04-05 22:16:49 +000036}
37
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000038cc_library_static {
39 name: "libsensorsexampleimpl",
40 vendor: true,
41 shared_libs: [
42 "libbase",
Grace Chengbc2a1b72021-11-09 14:26:23 +000043 "libfmq",
44 "libpower",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000045 "libbinder_ndk",
Vladimir Komsiyski08315cc2022-12-06 13:26:09 +010046 "android.hardware.sensors-V2-ndk",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000047 ],
48 export_include_dirs: ["include"],
49 srcs: [
50 "Sensors.cpp",
Grace Chengbc2a1b72021-11-09 14:26:23 +000051 "Sensor.cpp",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000052 ],
53 visibility: [
54 ":__subpackages__",
55 "//hardware/interfaces/tests/extension/sensors:__subpackages__",
56 ],
57}
58
59cc_binary {
60 name: "android.hardware.sensors-service.example",
61 relative_install_path: "hw",
deyaoren@google.combde01c62022-04-05 22:16:49 +000062 init_rc: [":sensors-default.rc"],
63 vintf_fragments: [":sensors-default.xml"],
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000064 vendor: true,
65 shared_libs: [
66 "libbase",
67 "libbinder_ndk",
Grace Chengbc2a1b72021-11-09 14:26:23 +000068 "libfmq",
69 "libpower",
70 "libcutils",
71 "liblog",
72 "libutils",
Vladimir Komsiyski08315cc2022-12-06 13:26:09 +010073 "android.hardware.sensors-V2-ndk",
Arthur Ishiguroc7ac0b22021-10-13 16:12:37 +000074 ],
75 static_libs: [
76 "libsensorsexampleimpl",
77 ],
78 srcs: ["main.cpp"],
79}