Changyeon Jo | 8018901 | 2021-10-10 16:34:21 -0700 | [diff] [blame] | 1 | // 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 | |
| 15 | package { |
| 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 Chen | 5ed789c | 2023-08-24 20:07:29 +0000 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "android.hardware.automotive.evs-aidl-default-service-default", |
Changyeon Jo | 8018901 | 2021-10-10 16:34:21 -0700 | [diff] [blame] | 26 | defaults: ["EvsHalDefaults"], |
Changyeon Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 27 | 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 Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 33 | "libbinder_ndk", |
| 34 | "libbufferqueueconverter", |
| 35 | "libcamera_metadata", |
| 36 | "libhardware_legacy", |
| 37 | "libhidlbase", |
Changyeon Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 38 | "libnativewindow", |
| 39 | "libtinyxml2", |
| 40 | "libui", |
Changyeon Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 41 | "libyuv", |
| 42 | ], |
Hao Chen | 5ed789c | 2023-08-24 20:07:29 +0000 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | cc_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 Jo | 130d5a3 | 2023-08-29 14:55:03 -0700 | [diff] [blame] | 59 | "android.frameworks.automotive.display-V2-ndk", |
Hao Chen | ac8e696 | 2023-03-29 11:20:56 -0700 | [diff] [blame] | 60 | "android.hardware.automotive.evs-V2-ndk", |
Changyeon Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 61 | "android.hardware.common-V2-ndk", |
| 62 | "libaidlcommonsupport", |
| 63 | "libcutils", |
| 64 | ], |
Changyeon Jo | 130d5a3 | 2023-08-29 14:55:03 -0700 | [diff] [blame] | 65 | header_libs: [ |
| 66 | "libgui_aidl_headers", |
| 67 | ], |
Changyeon Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 68 | local_include_dirs: ["include"], |
| 69 | include_dirs: ["frameworks/native/include/"], |
Hao Chen | 5ed789c | 2023-08-24 20:07:29 +0000 | [diff] [blame] | 70 | export_include_dirs: ["include"], |
| 71 | } |
| 72 | |
| 73 | cc_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 Jo | 7e62631 | 2023-03-13 22:44:01 +0000 | [diff] [blame] | 89 | required: ["evs_mock_hal_configuration.xml"], |
| 90 | } |
| 91 | |
| 92 | prebuilt_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 Jo | 8018901 | 2021-10-10 16:34:21 -0700 | [diff] [blame] | 97 | } |
Hao Chen | 5ed789c | 2023-08-24 20:07:29 +0000 | [diff] [blame] | 98 | |
| 99 | cc_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 Chen | 0d14a82 | 2023-08-29 20:34:08 +0000 | [diff] [blame^] | 108 | test_suites: [ |
| 109 | "general-tests", |
| 110 | ], |
| 111 | } |
| 112 | |
| 113 | cc_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 Chen | 5ed789c | 2023-08-24 20:07:29 +0000 | [diff] [blame] | 125 | } |