summaryrefslogtreecommitdiff
path: root/audio/common/all-versions/default/service/Android.bp
blob: 079b1cf88c74be9a22d2fd9f3718b910ec00c6d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "hardware_interfaces_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["hardware_interfaces_license"],
}

soong_config_module_type {
    name: "android_hardware_audio_config_default",
    module_type: "cc_defaults",
    config_namespace: "android_hardware_audio",
    bool_variables: [
        "run_64bit",
    ],
    properties: ["compile_multilib"],
}

android_hardware_audio_config_default {
    name: "android_hardware_audio_config_defaults",

    soong_config_variables: {
        run_64bit: {
            conditions_default: {
                // Prefer 32 bit as the binary must always be installed at the same
                // location for init to start it and the build system does not support
                // having two binaries installable to the same location even if they are
                // not installed in the same build.
                compile_multilib: "prefer32",
            },
            compile_multilib: "64",
        },
    },
}

cc_binary {
    name: "android.hardware.audio.service",

    init_rc: ["android.hardware.audio.service.rc"],
    relative_install_path: "hw",
    vendor: true,
    srcs: ["service.cpp"],

    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
    ],

    shared_libs: [
        "libcutils",
        "libbinder",
        "libbinder_ndk",
        "libhwbinder",
        "libhidlbase",
        "liblog",
        "libutils",
        "libhardware",
    ],
    arch : {
        arm : {
	    cflags: [
                "-DARCH_ARM_32",
	    ]
	}
    },

    defaults: [
        "android_hardware_audio_config_defaults",
    ],
}

cc_binary {
    name: "android.hardware.audio.service_64",

    init_rc: ["android.hardware.audio.service_64.rc"],
    relative_install_path: "hw",
    vendor: true,
    compile_multilib: "64",
    srcs: ["service.cpp"],

    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
    ],

    shared_libs: [
        "libcutils",
        "libbinder",
        "libbinder_ndk",
        "libhwbinder",
        "libhidlbase",
        "liblog",
        "libutils",
        "libhardware",
    ],
}

// Legacy service name, use android.hardware.audio.service instead
phony {
    name: "android.hardware.audio@2.0-service",
    required: ["android.hardware.audio.service"],
}
phony {
    name: "android.hardware.audio@2.0-service_64",
    required: ["android.hardware.audio.service_64"],
}