1// Copyright (C) 2021 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// WARNING: Everything listed here will be built on ALL platforms,
17// including x86, the emulator, and the SDK.  Modules must be uniquely
18// named (liblights.panda), and must build everywhere, or limit themselves
19// to only building on ARM if they include assembly. Individual makefiles
20// are responsible for having their own logic, for fine-grained control.
21
22package {
23    default_applicable_licenses: ["Android-Apache-2.0"],
24}
25
26cc_binary {
27    name: "android.hardware.confirmationui-service.cuttlefish",
28    defaults: [
29        "cuttlefish_guest_only",
30        "keymint_use_latest_hal_aidl_ndk_static",
31    ],
32    relative_install_path: "hw",
33    vendor: true,
34
35    stl: "c++_static",
36
37    shared_libs: [
38        "libbinder_ndk",
39        "liblog",
40    ],
41
42    static_libs: [
43        "android.hardware.confirmationui-V1-ndk",
44        "android.hardware.confirmationui-lib.cuttlefish",
45        "android.hardware.security.secureclock-V1-ndk",
46        "libbase",
47        "libcutils",
48        "libcuttlefish_confui",
49        "libcuttlefish_fs",
50        "libcuttlefish_utils",
51        "libteeui_hal_support",
52        "libutils",
53    ],
54
55    srcs: [
56        "service.cpp",
57    ],
58
59    cflags: [
60        "-DTEEUI_USE_STD_VECTOR",
61        "-Wall",
62        "-Werror",
63    ],
64
65    installable: false, // installed in APEX
66}
67
68cc_library {
69    name: "android.hardware.confirmationui-lib.cuttlefish",
70    defaults: [
71        "cuttlefish_guest_only",
72        "keymint_use_latest_hal_aidl_ndk_shared",
73    ],
74    vendor: true,
75    shared_libs: [
76        "android.hardware.confirmationui-V1-ndk",
77        "libbase",
78        "libbinder_ndk",
79        "libcutils",
80        "libdmabufheap",
81        "libteeui_hal_support",
82        "libtrusty",
83        "libutils",
84    ],
85
86    export_include_dirs: ["include"],
87
88    srcs: [
89        "TrustyConfirmationUI.cpp",
90        "guest_session.cpp",
91    ],
92    static_libs: [
93        "libcuttlefish_confui",
94        "libcuttlefish_fs",
95        "libcuttlefish_utils",
96    ],
97    cflags: [
98        "-DTEEUI_USE_STD_VECTOR",
99        "-Wall",
100        "-Werror",
101    ],
102}
103
104prebuilt_etc {
105    name: "android.hardware.confirmationui-service.cuttlefish.rc",
106    src: "android.hardware.confirmationui-service.cuttlefish.rc",
107    installable: false,
108}
109
110prebuilt_etc {
111    name: "android.hardware.confirmationui-service.cuttlefish.xml",
112    src: "android.hardware.confirmationui-service.cuttlefish.xml",
113    sub_dir: "vintf",
114    installable: false,
115}
116
117apex {
118    name: "com.google.cf.confirmationui",
119    vendor: true,
120    manifest: "apex_manifest.json",
121    file_contexts: "apex_file_contexts",
122    key: "com.google.cf.apex.key",
123    certificate: ":com.google.cf.apex.certificate",
124    updatable: false,
125
126    binaries: ["android.hardware.confirmationui-service.cuttlefish"],
127    prebuilts: [
128        "android.hardware.confirmationui-service.cuttlefish.rc",
129        "android.hardware.confirmationui-service.cuttlefish.xml",
130    ],
131}
132