blob: 6b638a3e199df15d960a38bb23b61a56ea19d0cb [file] [log] [blame]
Changyeon Jo80189012021-10-10 16:34:21 -07001// Copyright (C) 2022 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
15package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "hardware_interfaces_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["hardware_interfaces_license"],
22}
23
Hao Chen5ed789c2023-08-24 20:07:29 +000024cc_defaults {
25 name: "android.hardware.automotive.evs-aidl-default-service-default",
Changyeon Jo80189012021-10-10 16:34:21 -070026 defaults: ["EvsHalDefaults"],
Changyeon Jo7e626312023-03-13 22:44:01 +000027 shared_libs: [
28 "android.hardware.graphics.bufferqueue@1.0",
29 "android.hardware.graphics.bufferqueue@2.0",
30 "android.hidl.token@1.0-utils",
31 "libEGL",
32 "libGLESv2",
Changyeon Jo7e626312023-03-13 22:44:01 +000033 "libbinder_ndk",
34 "libbufferqueueconverter",
35 "libcamera_metadata",
36 "libhardware_legacy",
37 "libhidlbase",
Changyeon Jo7e626312023-03-13 22:44:01 +000038 "libnativewindow",
39 "libtinyxml2",
40 "libui",
Changyeon Jo7e626312023-03-13 22:44:01 +000041 "libyuv",
42 ],
Hao Chen5ed789c2023-08-24 20:07:29 +000043}
44
45cc_library {
46 name: "android.hardware.automotive.evs-aidl-default-service-lib",
47 defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
48 vendor: true,
49 cflags: [
50 "-DGL_GLEXT_PROTOTYPES",
51 "-DEGL_EGLEXT_PROTOTYPES",
52 ],
53 srcs: [
54 ":libgui_frame_event_aidl",
55 "src/*.cpp",
56 ],
57 exclude_srcs: ["src/service.cpp"],
58 whole_static_libs: [
Changyeon Jo130d5a32023-08-29 14:55:03 -070059 "android.frameworks.automotive.display-V2-ndk",
Hao Chenac8e6962023-03-29 11:20:56 -070060 "android.hardware.automotive.evs-V2-ndk",
Changyeon Jo7e626312023-03-13 22:44:01 +000061 "android.hardware.common-V2-ndk",
62 "libaidlcommonsupport",
63 "libcutils",
64 ],
Changyeon Jo130d5a32023-08-29 14:55:03 -070065 header_libs: [
66 "libgui_aidl_headers",
67 ],
Changyeon Jo7e626312023-03-13 22:44:01 +000068 local_include_dirs: ["include"],
69 include_dirs: ["frameworks/native/include/"],
Hao Chen5ed789c2023-08-24 20:07:29 +000070 export_include_dirs: ["include"],
71}
72
73cc_binary {
74 name: "android.hardware.automotive.evs-aidl-default-service",
75 defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
76 vintf_fragments: ["manifest_evs-default-service.xml"],
77 init_rc: ["evs-default-service.rc"],
78 vendor: true,
79 relative_install_path: "hw",
80 cflags: [
81 "-DGL_GLEXT_PROTOTYPES",
82 "-DEGL_EGLEXT_PROTOTYPES",
83 ],
84 srcs: ["src/service.cpp"],
85 static_libs: [
86 "android.hardware.automotive.evs-aidl-default-service-lib",
87 ],
88 include_dirs: ["frameworks/native/include/"],
Changyeon Jo7e626312023-03-13 22:44:01 +000089 required: ["evs_mock_hal_configuration.xml"],
90}
91
92prebuilt_etc {
93 name: "evs_mock_hal_configuration.xml",
94 soc_specific: true,
95 src: "resources/evs_mock_configuration.xml",
96 sub_dir: "automotive/evs",
Changyeon Jo80189012021-10-10 16:34:21 -070097}
Hao Chen5ed789c2023-08-24 20:07:29 +000098
99cc_test {
100 name: "android.hardware.automotive.evs-aidl-default-service_cam_buffer_test",
101 defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
102 vendor: true,
103 srcs: ["tests/EvsCameraBufferTest.cpp"],
104 static_libs: [
105 "android.hardware.automotive.evs-aidl-default-service-lib",
106 "libgmock",
107 ],
Hao Chen0d14a822023-08-29 20:34:08 +0000108 test_suites: [
109 "general-tests",
110 ],
111}
112
113cc_test {
114 name: "android.hardware.automotive.evs-aidl-default-service_cam_state_test",
115 defaults: ["android.hardware.automotive.evs-aidl-default-service-default"],
116 vendor: true,
117 srcs: ["tests/EvsCameraStateTest.cpp"],
118 static_libs: [
119 "android.hardware.automotive.evs-aidl-default-service-lib",
120 "libgmock",
121 ],
122 test_suites: [
123 "general-tests",
124 ],
Hao Chen5ed789c2023-08-24 20:07:29 +0000125}