Spdk/mk/spdk.nvmecli.mk
Jim Harris 488570ebd4 Replace most BSD 3-clause license text with SPDX identifier.
Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in every source file.  This patch replaces
the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause
identifier.

Almost all of these files share the exact same license text,
and this patch only modifies the files that contain the
most common license text.  There can be slight variations
because the third clause contains company names - most say
"Intel Corporation", but there are instances for Nvidia,
Samsung, Eideticom and even "the copyright holder".

Used a bash script to automate replacement of the license text
with SPDX identifier which is checked into scripts/spdx.sh.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>
2022-06-09 07:35:12 +00:00

84 lines
2.0 KiB
Makefile

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Intel Corporation.
# All rights reserved.
#
SPDK_ROOT_DIR ?= $(abspath $(CURDIR)/..)
SPDK_LIB_DIR ?= $(SPDK_ROOT_DIR)/build/lib
include $(SPDK_ROOT_DIR)/mk/config.mk
DPDK_LIB_DIR ?= $(CONFIG_DPDK_DIR)/lib
DPDK_LIB_LIST = -lrte_eal -lrte_mempool -lrte_ring -lrte_pci -lrte_bus_pci -lrte_mbuf
ifneq (, $(wildcard $(DPDK_LIB_DIR)/librte_kvargs.*))
DPDK_LIB_LIST += -lrte_kvargs
endif
ifneq (, $(wildcard $(DPDK_LIB_DIR)/librte_power.*))
DPDK_LIB_LIST += -lrte_power
endif
ifneq (, $(wildcard $(DPDK_LIB_DIR)/librte_telemetry.*))
DPDK_LIB_LIST += -lrte_telemetry
endif
NVMECLI_SPDK_LIBS = -lspdk_log -lspdk_sock -lspdk_nvme -lspdk_env_dpdk -lspdk_util -lspdk_jsonrpc -lspdk_json -lspdk_rpc
ifeq ($(CONFIG_RDMA),y)
NVMECLI_SPDK_LIBS += -lspdk_rdma
endif
ifeq ($(CONFIG_OCF),y)
NVMECLI_SPDK_LIBS += -lspdk_ocfenv
endif
ifeq ($(CONFIG_VHOST),y)
DPDK_LIB_LIST += -lrte_vhost -lrte_net -lrte_cryptodev -lrte_hash
ifneq (, $(wildcard $(DPDK_LIB_DIR)/librte_dmadev.*))
DPDK_LIB_LIST += -lrte_dmadev
endif
endif
override CFLAGS += -I$(SPDK_ROOT_DIR)/include
override LDFLAGS += \
-Wl,--whole-archive \
-L$(SPDK_LIB_DIR) $(NVMECLI_SPDK_LIBS) \
-L$(DPDK_LIB_DIR) $(DPDK_LIB_LIST) \
-Wl,--no-whole-archive \
-ldl -pthread -lrt -lrdmacm -lnuma -libverbs
ifeq ($(CONFIG_HAVE_LIBBSD),y)
override LDFLAGS += -lbsd
endif
ifeq ($(CONFIG_ISAL), y)
ISAL_DIR=$(SPDK_ROOT_DIR)/isa-l
override LDFLAGS += -L$(ISAL_DIR)/.libs -lisal
override CFLAGS += -I$(ISAL_DIR)/..
endif
ifeq ($(CONFIG_ASAN),y)
override CFLAGS += -fsanitize=address
override LDFLAGS += -fsanitize=address
endif
ifeq ($(CONFIG_UBSAN),y)
override CFLAGS += -fsanitize=undefined
override LDFLAGS += -fsanitize=undefined
endif
ifeq ($(CONFIG_TSAN),y)
override CFLAGS += -fsanitize=thread
override LDFLAGS += -fsanitize=thread
endif
ifeq ($(CONFIG_COVERAGE), y)
override CFLAGS += -fprofile-arcs -ftest-coverage
override LDFLAGS += -fprofile-arcs -ftest-coverage
endif
ifeq ($(CONFIG_ISCSI_INITIATOR),y)
override LDFLAGS += -L/usr/lib64/iscsi -liscsi
endif