blob: d6c0c726064759963e152d02a8d76bda5b1a8ccd [file] [log] [blame]
Robin Pengc2b5ca92021-02-23 20:00:28 +08001//
2// Copyright (C) 2017 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
16package {
17 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "//device/google/gs101:device_google_gs101_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: [
23 "//device/google/gs101:device_google_gs101_license",
24 ],
25}
26
27soong_config_module_type_import {
28 from: "device/google/gs101/soong/Android.bp",
29 module_types: ["pixel_usbgadget_cc_defaults"],
30}
31
32pixel_usbgadget_cc_defaults {
33 name: "pixel_usbgadget",
34 soong_config_variables: {
35 older_gadget: {
36 cflags: ["-DOLDER_GADGET"],
37 },
38 },
39}
40
41cc_binary {
42 name: "android.hardware.usb@1.3-service.gs101",
43 relative_install_path: "hw",
44 init_rc: ["android.hardware.usb@1.3-service.gs101.rc"],
45 vintf_fragments: [
46 "android.hardware.usb@1.3-service.gs101.xml",
47 "android.hardware.usb.gadget@1.2-service.gs101.xml",
48 ],
49 srcs: ["service.cpp", "Usb.cpp", "UsbGadget.cpp"],
50 cflags: ["-Wall", "-Werror"],
51 defaults: ["pixel_usbgadget"],
52 shared_libs: [
53 "libbase",
54 "libhidlbase",
55 "liblog",
56 "libutils",
57 "libhardware",
58 "android.hardware.usb@1.0",
59 "android.hardware.usb@1.1",
60 "android.hardware.usb@1.2",
61 "android.hardware.usb@1.3",
62 "android.hardware.usb.gadget@1.0",
63 "android.hardware.usb.gadget@1.1",
64 "android.hardware.usb.gadget@1.2",
65 "libcutils",
66 ],
67 static_libs: ["libpixelusb"],
68 proprietary: true,
69}