xref: /aosp_15_r20/external/e2fsprogs/resize/Android.bp (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Worker// Copyright 2017 The Android Open Source Project
2*6a54128fSAndroid Build Coastguard Worker
3*6a54128fSAndroid Build Coastguard Workerpackage {
4*6a54128fSAndroid Build Coastguard Worker    // See: http://go/android-license-faq
5*6a54128fSAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
6*6a54128fSAndroid Build Coastguard Worker    // all of the 'license_kinds' from "external_e2fsprogs_license"
7*6a54128fSAndroid Build Coastguard Worker    // to get the below license kinds:
8*6a54128fSAndroid Build Coastguard Worker    //   SPDX-license-identifier-GPL
9*6a54128fSAndroid Build Coastguard Worker    default_applicable_licenses: ["external_e2fsprogs_license"],
10*6a54128fSAndroid Build Coastguard Worker}
11*6a54128fSAndroid Build Coastguard Worker
12*6a54128fSAndroid Build Coastguard Workerresize2fs_libs = [
13*6a54128fSAndroid Build Coastguard Worker    "libext2fs",
14*6a54128fSAndroid Build Coastguard Worker    "libext2_com_err",
15*6a54128fSAndroid Build Coastguard Worker    "libext2_e2p",
16*6a54128fSAndroid Build Coastguard Worker    "libext2_uuid",
17*6a54128fSAndroid Build Coastguard Worker    "libext2_blkid",
18*6a54128fSAndroid Build Coastguard Worker]
19*6a54128fSAndroid Build Coastguard Worker
20*6a54128fSAndroid Build Coastguard Workercc_defaults {
21*6a54128fSAndroid Build Coastguard Worker    name: "resize2fs-defaults",
22*6a54128fSAndroid Build Coastguard Worker    defaults: ["e2fsprogs-defaults"],
23*6a54128fSAndroid Build Coastguard Worker    srcs: [
24*6a54128fSAndroid Build Coastguard Worker        "extent.c",
25*6a54128fSAndroid Build Coastguard Worker        "resize2fs.c",
26*6a54128fSAndroid Build Coastguard Worker        "main.c",
27*6a54128fSAndroid Build Coastguard Worker        "online.c",
28*6a54128fSAndroid Build Coastguard Worker        "sim_progress.c",
29*6a54128fSAndroid Build Coastguard Worker        "resource_track.c",
30*6a54128fSAndroid Build Coastguard Worker    ],
31*6a54128fSAndroid Build Coastguard Worker}
32*6a54128fSAndroid Build Coastguard Worker
33*6a54128fSAndroid Build Coastguard Workercc_binary {
34*6a54128fSAndroid Build Coastguard Worker    name: "resize2fs",
35*6a54128fSAndroid Build Coastguard Worker    host_supported: true,
36*6a54128fSAndroid Build Coastguard Worker    vendor_ramdisk_available: true,
37*6a54128fSAndroid Build Coastguard Worker    defaults: ["resize2fs-defaults"],
38*6a54128fSAndroid Build Coastguard Worker
39*6a54128fSAndroid Build Coastguard Worker    // Host binaries can be compiled statically to be re-used in other environments.
40*6a54128fSAndroid Build Coastguard Worker    // For android binaries, we keep shared libraries to keep the binary size smaller.
41*6a54128fSAndroid Build Coastguard Worker    target: {
42*6a54128fSAndroid Build Coastguard Worker        host: {
43*6a54128fSAndroid Build Coastguard Worker            static_libs: resize2fs_libs,
44*6a54128fSAndroid Build Coastguard Worker        },
45*6a54128fSAndroid Build Coastguard Worker        android: {
46*6a54128fSAndroid Build Coastguard Worker            shared_libs: resize2fs_libs,
47*6a54128fSAndroid Build Coastguard Worker        },
48*6a54128fSAndroid Build Coastguard Worker    },
49*6a54128fSAndroid Build Coastguard Worker}
50*6a54128fSAndroid Build Coastguard Worker
51*6a54128fSAndroid Build Coastguard Workercc_binary {
52*6a54128fSAndroid Build Coastguard Worker    name: "resize2fs_ramdisk",
53*6a54128fSAndroid Build Coastguard Worker    stem: "resize2fs",
54*6a54128fSAndroid Build Coastguard Worker    static_executable: true,
55*6a54128fSAndroid Build Coastguard Worker    ramdisk: true,
56*6a54128fSAndroid Build Coastguard Worker    defaults: ["resize2fs-defaults"],
57*6a54128fSAndroid Build Coastguard Worker    static_libs: resize2fs_libs,
58*6a54128fSAndroid Build Coastguard Worker}
59