• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2019 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
17//TODO: b/196432585
18//Change the service names to match AIDL instead of HIDL major, minor versioning. Currently
19//left alone to avoid accidentally breaking targets.
20
21package {
22    default_applicable_licenses: ["Android-Apache-2.0"],
23}
24
25soong_config_module_type {
26    name: "gch_lazy_hal_cc_defaults",
27    module_type: "cc_defaults",
28    config_namespace: "gch",
29    bool_variables: ["use_lazy_hal"],
30    properties: ["enabled"],
31}
32
33gch_lazy_hal_cc_defaults {
34    name: "camera_service_eager_hal_defaults",
35    enabled: true,
36    soong_config_variables: {
37        use_lazy_hal: {
38            enabled: false,
39        },
40    },
41}
42
43gch_lazy_hal_cc_defaults {
44    name: "camera_service_lazy_hal_defaults",
45    enabled: false,
46    soong_config_variables: {
47        use_lazy_hal: {
48            enabled: true,
49        },
50    },
51}
52
53// Exported for use in vendor/google/services/LyricCameraHAL/src/
54python_binary_host {
55    name: "camera_hal_version_script",
56    main: "version_script.py",
57    srcs: ["version_script.py"],
58}
59
60cc_genrule {
61   name: "aidl_camera_build_version",
62   tool_files: ["version_script.py"],
63   cmd: "python3 $(location version_script.py) $(in) $(out)",
64   vendor: true,
65   srcs: [
66       "aidl_camera_build_version.inl",
67   ],
68   out: ["aidl_camera_build_version.h"],
69}
70
71cc_defaults {
72    name: "camera_service_defaults_common",
73    defaults: [
74        "google_camera_hal_defaults",
75        "apex_update_listener_cc_defaults_static",
76    ],
77    vendor: true,
78    relative_install_path: "hw",
79    srcs: [
80        "aidl_camera_device.cc",
81        "aidl_camera_device_session.cc",
82        "aidl_camera_provider.cc",
83        "aidl_profiler.cc",
84        "aidl_thermal_utils.cc",
85        "aidl_utils.cc",
86        "libc_wrappers.cc",
87    ],
88    generated_headers: [
89        "aidl_camera_build_version",
90    ],
91    compile_multilib: "first",
92    shared_libs: [
93        "android.hardware.camera.device-V2-ndk",
94        "android.hardware.camera.common-V1-ndk",
95        "android.hardware.camera.provider-V2-ndk",
96        "android.hardware.graphics.mapper@2.0",
97        "android.hardware.graphics.mapper@3.0",
98        "android.hardware.graphics.mapper@4.0",
99        "android.hardware.thermal-V1-ndk",
100        "libbinder",
101        "libbinder_ndk",
102        "libbase",
103        "libcamera_metadata",
104        "libcutils",
105        "libfmq",
106        "libgooglecamerahal",
107        "libgooglecamerahalutils",
108        "libhidlbase",
109        "liblog",
110        "libutils",
111        "lib_profiler",
112    ],
113    export_shared_lib_headers: [
114        "lib_profiler",
115    ],
116    static_libs: [
117        "libaidlcommonsupport",
118    ],
119}
120
121cc_defaults {
122    name: "hardware_camera_service_defaults",
123    defaults: [
124        "camera_service_defaults_common",
125    ],
126    srcs: [
127        "aidl_service.cc",
128    ],
129    vintf_fragments: [":android.hardware.camera.provider@2.7-service-google.xml"],
130}
131
132cc_binary {
133    name: "android.hardware.camera.provider@2.7-service-google",
134    defaults: [
135        "hardware_camera_service_defaults",
136        "camera_service_eager_hal_defaults",
137    ],
138    init_rc: ["android.hardware.camera.provider@2.7-service-google.rc"],
139}
140
141cc_binary {
142    name: "android.hardware.camera.provider@2.7-service-google-lazy",
143    defaults: [
144        "hardware_camera_service_defaults",
145        "camera_service_lazy_hal_defaults",
146    ],
147    init_rc: ["android.hardware.camera.provider@2.7-service-google-lazy.rc"],
148    cflags: ["-DLAZY_SERVICE"],
149}
150
151filegroup {
152    name: "android.hardware.camera.provider@2.7-service-google.xml",
153    srcs: ["android.hardware.camera.provider@2.7-service-google.xml"],
154}
155