1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. 3# All rights reserved. 4# 5 6SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) 7include $(SPDK_ROOT_DIR)/mk/spdk.common.mk 8 9SO_VER := 1 10SO_MINOR := 0 11 12SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_rdma_utils.map) 13 14LIBNAME = rdma_utils 15 16C_SRCS = rdma_utils.c 17 18LOCAL_SYS_LIBS += -libverbs -lrdmacm 19#Attach only if FreeBSD and RDMA is specified with configure 20ifeq ($(OS),FreeBSD) 21# Mellanox - MLX4 HBA Userspace Library 22ifneq ("$(wildcard /usr/lib/libmlx4.*)","") 23LOCAL_SYS_LIBS += -lmlx4 24endif 25# Mellanox - MLX5 HBA Userspace Library 26ifneq ("$(wildcard /usr/lib/libmlx5.*)","") 27LOCAL_SYS_LIBS += -lmlx5 28endif 29# Chelsio HBA Userspace Library 30ifneq ("$(wildcard /usr/lib/libcxgb4.*)","") 31LOCAL_SYS_LIBS += -lcxgb4 32endif 33endif 34 35include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk 36