1// Copyright (C) 2019 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//
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21cc_defaults {
22    name: "android.automotive.evs.manager_defaults",
23
24    shared_libs: [
25        "android.hardware.automotive.evs@1.0",
26        "android.hardware.automotive.evs@1.1",
27        "libbase",
28        "libcamera_metadata",
29        "libcutils",
30        "libhardware",
31        "libhidlbase",
32        "libpng",
33        "libprocessgroup",
34        "libstatslog",
35        "libui",
36        "libutils",
37    ],
38
39    static_libs: ["libc++fs"],
40
41    cflags: [
42        "-DLOG_TAG=\"EvsManagerV1_1\"",
43        "-DGL_GLEXT_PROTOTYPES",
44        "-DEGL_EGLEXT_PROTOTYPES",
45        "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS",
46        "-Wall",
47        "-Werror",
48        "-Wunused",
49        "-Wunreachable-code",
50        "-Wthread-safety",
51    ],
52
53    export_include_dirs: [
54        "./",
55        "stats/",
56    ],
57
58    product_variables: {
59        debuggable: {
60            cflags: [
61                "-DEVS_DEBUG",
62            ]
63        }
64    },
65}
66
67filegroup {
68    name: "android.automotive.evs.manager_sources",
69
70    srcs: [
71        "Enumerator.cpp",
72        "HalCamera.cpp",
73        "HalDisplay.cpp",
74        "VirtualCamera.cpp",
75        "emul/EvsEmulatedCamera.cpp",
76        "emul/VideoCapture.cpp",
77        "stats/CameraUsageStats.cpp",
78        "stats/LooperWrapper.cpp",
79        "stats/StatsCollector.cpp",
80    ],
81}
82
83cc_library_static {
84    name: "libevsmanager_static",
85
86    defaults: ["android.automotive.evs.manager_defaults"],
87
88    srcs: [":android.automotive.evs.manager_sources"],
89
90    export_include_dirs: ["."],
91
92}
93
94cc_binary {
95    name: "android.automotive.evs.manager@1.1",
96
97    defaults: ["android.automotive.evs.manager_defaults"],
98
99    srcs: [
100        ":android.automotive.evs.manager_sources",
101        "service.cpp"
102    ],
103
104    init_rc: ["android.automotive.evs.manager@1.1.rc"],
105
106    vintf_fragments: ["manifest_android.automotive.evs.manager@1.1.xml"],
107}
108