Files
2026-09-22 09:38:26 +08:00

54 lines
1.6 KiB
BlitzBasic

# SPDX-FileCopyrightText: 2021 Unisoc (Shanghai) Technologies Co., Ltd.
#
# SPDX-License-Identifier: LicenseRef-Unisoc-General-1.0
DESCRIPTION = "Unisoc crypto-control module"
HOMEPAGE = "http://www.unisoc.com/"
PROVIDES = "crypto"
LICENSE = "CLOSED"
SECTION = "libs"
inherit get_release_mode
CRYPTO_SRC_DIR = "${OEROOT}/source/unisoc/modules/crypto"
CRYPTO_INSTALL_DIR = "${DEPLOY_OUT_DIR}/crypto"
CRYPTO_RELEASE_DIR = "${PREBUILTS_OUT_DIR}/crypto"
export CRYPTO_SRC_MODE = "${@get_release_mode(d,"${CRYPTO_SRC_DIR}")}"
EXTERNALSRC = "${@bb.utils.contains("CRYPTO_SRC_MODE", "customer", "${CRYPTO_RELEASE_DIR}", "${CRYPTO_SRC_DIR}", d)}"
EXTERNALSRC_BUILD = "${EXTERNALSRC}"
do_compile () {
if [ ${CRYPTO_SRC_MODE} != "customer" ]; then
make clean
make
fi
}
do_install:prepend () {
if [ ${CRYPTO_SRC_MODE} != "customer" ]; then
rm -rf ${CRYPTO_INSTALL_DIR}
install -d ${CRYPTO_INSTALL_DIR}
install -m 0755 ${S}/libsprdcrypto.so ${CRYPTO_INSTALL_DIR}
install -m 0755 ${S}/aes_gcm/inc/nvitem_aes_gcm.h ${CRYPTO_INSTALL_DIR}
fi
}
do_install () {
install -d ${D}${libdir}
install -m 0755 ${S}/libsprdcrypto.so ${D}${libdir}/
install -d ${D}${includedir}/
if [ ${CRYPTO_SRC_MODE} != "customer" ]; then
install -m 0755 ${S}/aes_gcm/inc/nvitem_aes_gcm.h ${D}${includedir}/
fi
if [ ${CRYPTO_SRC_MODE} == "customer" ]; then
install -m 0755 ${S}/nvitem_aes_gcm.h ${D}${includedir}/
fi
}
FILES:${PN} = "${libdir}/libsprdcrypto.so"
FILES_SOLIBSDEV = ""
INSANE_SKIP:${PN} = "dev-so"
TARGET_CC_ARCH += "${LDFLAGS}"