// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

soong_namespace {
}

cc_prebuilt_library_shared {
    name: "libc_secshared",
    arch: {
        arm: {
            srcs: ["libc_secshared.so"],
            shared_libs: [
                "libc++",
                "libdl",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libc_secshared.so"],
            shared_libs: [
                "libc++",
                "libdl",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}

cc_prebuilt_library_shared {
    name: "libhiion",
    arch: {
        arm: {
            srcs: ["libhiion.so"],
            shared_libs: [
                "liblog",
                "libion",
                "libc_secshared",
                "libc++",
                "libdl",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libhiion.so"],
            shared_libs: [
                "liblog",
                "libion",
                "libc_secshared",
                "libc++",
                "libdl",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}

cc_prebuilt_library_shared {
    name: "libhilog",
    arch: {
        arm: {
            srcs: ["libhilog.so"],
            shared_libs: [
                "libc_secshared",
                "libdl",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libhilog.so"],
            shared_libs: [
                "libc_secshared",
                "libdl",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}

cc_prebuilt_library_shared {
    name: "libOMX_Core",
    arch: {
        arm: {
            srcs: ["libOMX_Core.so"],
            shared_libs: [
                "liblog",
                "libdl",
                "libc_secshared",
                "libc++",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libOMX_Core.so"],
            shared_libs: [
                "liblog",
                "libdl",
                "libc_secshared",
                "libc++",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}

cc_prebuilt_library_shared {
    name: "libOMX.hisi.vdec.core",
    arch: {
        arm: {
            srcs: ["libOMX.hisi.vdec.core.so"],
            shared_libs: [
                "libion",
                "libhiion",
                "liblog",
                "libc++",
                "libdl",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libOMX.hisi.vdec.core.so"],
            shared_libs: [
                "libion",
                "libhiion",
                "liblog",
                "libc++",
                "libdl",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}

cc_prebuilt_library_shared {
    name: "libOMX.hisi.video.decoder",
    arch: {
        arm: {
            srcs: ["libOMX.hisi.video.decoder.so"],
            shared_libs: [
                "libdl",
                "libutils",
                "liblog",
                "libion",
                "libhiion",
                "libcutils",
                "libOMX.hisi.vdec.core",
                "libc++",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libOMX.hisi.video.decoder.so"],
            shared_libs: [
                "libdl",
                "libutils",
                "liblog",
                "libion",
                "libhiion",
                "libcutils",
                "libOMX.hisi.vdec.core",
                "libc++",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}

cc_prebuilt_library_shared {
    name: "libstagefrighthw",
    arch: {
        arm: {
            srcs: ["libstagefrighthw.so"],
            shared_libs: [
                "liblog",
                "libcutils",
                "libutils",
                "libdl",
                "libc++",
                "libc",
                "libm",
            ],
        },
        arm64: {
            srcs: ["lib64/libstagefrighthw.so"],
            shared_libs: [
                "liblog",
                "libcutils",
                "libutils",
                "libdl",
                "libc++",
                "libc",
                "libm",
            ],
        },
    },
    compile_multilib: "both",
    vendor: true,
    strip: {
        none: true,
    },
}
