# DKMS module name and version
PACKAGE_NAME="mlnx-nvme"
PACKAGE_VERSION="4.0"

kernelver=${kernelver:-$(uname -r)}
kernel_source_dir=${kernel_source_dir:-/lib/modules/$kernelver/build}

# Module name, source and destination directories, and build command-line
#
# host
#
BUILT_MODULE_NAME[0]="nvme-core"
BUILT_MODULE_LOCATION[0]="./host/"
DEST_MODULE_LOCATION[0]="/kernel/../updates/"

BUILT_MODULE_NAME[1]="nvme"
BUILT_MODULE_LOCATION[1]="./host/"
DEST_MODULE_LOCATION[1]="/kernel/../updates/"

BUILT_MODULE_NAME[2]="nvme-fabrics"
BUILT_MODULE_LOCATION[2]="./host/"
DEST_MODULE_LOCATION[2]="/kernel/../updates/"

BUILT_MODULE_NAME[3]="nvme-rdma"
BUILT_MODULE_LOCATION[3]="./host/"
DEST_MODULE_LOCATION[3]="/kernel/../updates/"

BUILT_MODULE_NAME[4]="nvme-fc"
BUILT_MODULE_LOCATION[4]="./host/"
DEST_MODULE_LOCATION[4]="/kernel/../updates/"

#
# target
#
BUILT_MODULE_NAME[5]="nvmet"
BUILT_MODULE_LOCATION[5]="./target/"
DEST_MODULE_LOCATION[5]="/kernel/../updates/"

BUILT_MODULE_NAME[6]="nvme-loop"
BUILT_MODULE_LOCATION[6]="./target/"
DEST_MODULE_LOCATION[6]="/kernel/../updates/"

BUILT_MODULE_NAME[7]="nvmet-rdma"
BUILT_MODULE_LOCATION[7]="./target/"
DEST_MODULE_LOCATION[7]="/kernel/../updates/"

BUILT_MODULE_NAME[8]="nvmet-fc"
BUILT_MODULE_LOCATION[8]="./target/"
DEST_MODULE_LOCATION[8]="/kernel/../updates/"

BUILT_MODULE_NAME[9]="nvme-fcloop"
BUILT_MODULE_LOCATION[9]="./target/"
DEST_MODULE_LOCATION[9]="/kernel/../updates/"

MAKE="make -j`MLXNUMC=$(grep ^processor /proc/cpuinfo | wc -l) && echo $(($MLXNUMC<16?$MLXNUMC:16))` KVER=$kernelver K_BUILD=$kernel_source_dir CONFIG_NVME_HOST_WITHOUT_FC="

# Cleanup command-line
CLEAN="make clean"

# disable autoinstall since this module depends on mlnx-ofed-kernel-dkms
# mlnx-ofed-kernel-dkms will build this module on POST_INSTALL
AUTOINSTALL=
