1//
2// Copyright (C) 2018 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
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21cc_library_static {
22    name: "libdm",
23    defaults: ["fs_mgr_defaults"],
24    recovery_available: true,
25    host_supported: true,
26
27    export_include_dirs: ["include"],
28
29    srcs: [
30        "dm_table.cpp",
31        "dm_target.cpp",
32        "dm.cpp",
33        "loop_control.cpp",
34        "utility.cpp",
35    ],
36
37    static_libs: [
38        "libext2_uuid",
39    ],
40    header_libs: [
41        "libbase_headers",
42        "liblog_headers",
43    ],
44    target: {
45        darwin: {
46            enabled: false,
47        },
48    },
49    ramdisk_available: true,
50    vendor_ramdisk_available: true,
51}
52
53filegroup {
54    name: "libdm_test_srcs",
55    srcs: [
56        "dm_test.cpp",
57        "loop_control_test.cpp",
58        "test_util.cpp",
59    ],
60}
61
62cc_defaults {
63    name: "libdm_test_defaults",
64    defaults: ["fs_mgr_defaults"],
65    static_libs: [
66        "libdm",
67        "libext2_uuid",
68        "libfs_mgr",
69    ],
70    shared_libs: [
71        "libbase",
72        "liblog",
73    ],
74    srcs: [":libdm_test_srcs"],
75    auto_gen_config: true,
76    require_root: true,
77}
78
79cc_test {
80    name: "libdm_test",
81    defaults: ["libdm_test_defaults"],
82    test_suites: ["device-tests"],
83}
84
85cc_test {
86    name: "vts_libdm_test",
87    defaults: ["libdm_test_defaults"],
88    test_suites: ["vts"],
89    test_options: {
90        min_shipping_api_level: 29,
91    },
92}
93