1// Copyright 2006 The Android Open Source Project
2
3cc_library_headers {
4    name: "libhardware_legacy_headers",
5    vendor_available: true,
6    export_include_dirs: ["include"],
7
8    header_libs: ["libcutils_headers"],
9    export_header_lib_headers: ["libcutils_headers"],
10}
11
12cc_defaults {
13    name: "libpower_defaults",
14    defaults: ["system_suspend_defaults"],
15    cflags: [
16        "-Wexit-time-destructors",
17        "-fno-c++-static-destructors",
18    ],
19}
20
21cc_library {
22    name: "libpower",
23    defaults: ["libpower_defaults"],
24    srcs: ["power.cpp"],
25    export_include_dirs: ["include"],
26    shared_libs: ["[email protected]"],
27    vendor_available: true,
28    vndk: {
29        enabled: true,
30    },
31}
32
33cc_test {
34    name: "libpower_test",
35    defaults: ["libpower_defaults"],
36    srcs: ["power_test.cpp"],
37    static_libs: ["libpower"],
38    shared_libs: [
39        "[email protected]",
40        "suspend_control_aidl_interface-cpp",
41    ],
42    test_suites: ["device-tests"],
43    require_root: true,
44}
45
46cc_library_shared {
47    name: "libhardware_legacy",
48    defaults: ["libpower_defaults"],
49    vendor_available: true,
50    vndk: {
51        enabled: true,
52    },
53
54    shared_libs: [
55        "[email protected]",
56        "libdl",
57    ],
58
59    header_libs: [
60        "libhardware_legacy_headers",
61    ],
62    export_header_lib_headers: ["libhardware_legacy_headers"],
63
64    export_include_dirs: ["include"],
65
66    cflags: [
67        "-DQEMU_HARDWARE",
68        "-Wall",
69        "-Werror",
70    ],
71
72    srcs: [
73        "power.cpp",
74        "uevent.c",
75    ],
76}
77
78cc_test {
79    name: "block_suspend",
80    defaults: ["libpower_defaults"],
81    srcs: ["block_suspend.cpp"],
82    static_libs: ["libpower"],
83    shared_libs: [
84        "[email protected]",
85    ],
86    gtest: false,
87}
88