mk: move the bdev modules under module directory.
This is more accurate to what they are, and will make defining library dependencies much simpler. This change in directory does not affect the final placement of naming of libraries at the end of time. Change-Id: Ic48a9233dff564e39ce357a9ea0a111ea2b6414b Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465454 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
f12587433a
commit
07fe6a43d6
6
Makefile
6
Makefile
@ -37,6 +37,7 @@ SPDK_ROOT_DIR := $(CURDIR)
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||
|
||||
DIRS-y += lib
|
||||
DIRS-y += module
|
||||
DIRS-$(CONFIG_SHARED) += shared_lib
|
||||
DIRS-y += examples app include
|
||||
DIRS-$(CONFIG_TESTS) += test
|
||||
@ -59,7 +60,7 @@ endif
|
||||
ifeq ($(CONFIG_SHARED),y)
|
||||
LIB = shared_lib
|
||||
else
|
||||
LIB = lib
|
||||
LIB = module
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IPSEC_MB),y)
|
||||
@ -86,8 +87,9 @@ ifneq ($(SKIP_DPDK_BUILD),1)
|
||||
dpdkbuild: $(DPDK_DEPS)
|
||||
endif
|
||||
|
||||
shared_lib: lib
|
||||
lib: $(DPDKBUILD)
|
||||
module: lib
|
||||
shared_lib: module
|
||||
app: $(LIB)
|
||||
test: $(LIB)
|
||||
examples: $(LIB)
|
||||
|
@ -28,7 +28,7 @@ if [ "$SPDK_TEST_OCF" -eq 1 ]; then
|
||||
# So we precompile OCF now for further use as standalone static library
|
||||
./configure $(echo $config_params | sed 's/--enable-coverage//g')
|
||||
$MAKE $MAKEFLAGS include/spdk/config.h
|
||||
CC=gcc CCAR=ar $MAKE $MAKEFLAGS -C lib/bdev/ocf/env exportlib O=$rootdir/build/ocf.a
|
||||
CC=gcc CCAR=ar $MAKE $MAKEFLAGS -C module/bdev/ocf/env exportlib O=$rootdir/build/ocf.a
|
||||
# Set config to use precompiled library
|
||||
config_params="$config_params --with-ocf=/$rootdir/build/ocf.a"
|
||||
fi
|
||||
|
@ -42,33 +42,4 @@ C_SRCS = bdev.c bdev_rpc.c part.c scsi_nvme.c
|
||||
C_SRCS-$(CONFIG_VTUNE) += vtune.c
|
||||
LIBNAME = bdev
|
||||
|
||||
DIRS-y += delay error gpt lvol malloc null nvme passthru raid rpc split
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO),y)
|
||||
DIRS-y += crypto
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OCF), y)
|
||||
DIRS-y += ocf
|
||||
DIRS-y += ocf/env
|
||||
DEPDIRS-ocf := ocf/env
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_REDUCE),y)
|
||||
DIRS-y += compress
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_URING),y)
|
||||
DIRS-y += uring
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
DIRS-y += aio
|
||||
DIRS-$(CONFIG_ISCSI_INITIATOR) += iscsi
|
||||
DIRS-$(CONFIG_VIRTIO) += virtio
|
||||
DIRS-$(CONFIG_PMDK) += pmem
|
||||
endif
|
||||
|
||||
DIRS-$(CONFIG_RBD) += rbd
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk
|
||||
|
@ -38,6 +38,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.mock.unittest.mk
|
||||
C_SRCS = $(TEST_FILE)
|
||||
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/module
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/test
|
||||
CFLAGS += -ffunction-sections
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
44
module/Makefile
Normal file
44
module/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
#
|
||||
# BSD LICENSE
|
||||
#
|
||||
# Copyright (c) Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Intel Corporation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/..)
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||
|
||||
DIRS-y = bdev
|
||||
|
||||
.PHONY: all clean $(DIRS-y)
|
||||
|
||||
all: $(DIRS-y)
|
||||
clean: $(DIRS-y)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk
|
71
module/bdev/Makefile
Normal file
71
module/bdev/Makefile
Normal file
@ -0,0 +1,71 @@
|
||||
#
|
||||
# BSD LICENSE
|
||||
#
|
||||
# Copyright (c) Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of Intel Corporation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||
|
||||
DIRS-y += delay error gpt lvol malloc null nvme passthru raid rpc split
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO),y)
|
||||
DIRS-y += crypto
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OCF), y)
|
||||
DIRS-y += ocf
|
||||
DIRS-y += ocf/env
|
||||
DEPDIRS-ocf := ocf/env
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_REDUCE),y)
|
||||
DIRS-y += compress
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_URING),y)
|
||||
DIRS-y += uring
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
DIRS-y += aio
|
||||
DIRS-$(CONFIG_ISCSI_INITIATOR) += iscsi
|
||||
DIRS-$(CONFIG_VIRTIO) += virtio
|
||||
DIRS-$(CONFIG_PMDK) += pmem
|
||||
endif
|
||||
|
||||
DIRS-$(CONFIG_RBD) += rbd
|
||||
|
||||
.PHONY: all clean $(DIRS-y)
|
||||
|
||||
all: $(DIRS-y)
|
||||
clean: $(DIRS-y)
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk
|
@ -76,17 +76,17 @@ all: ocf_inc ocf_src
|
||||
$(Q)$(MAKE) $(LIB)
|
||||
|
||||
ocf_inc:
|
||||
$(Q)$(MAKE) -C "$(CONFIG_OCF_PATH)" inc O="$(SPDK_ROOT_DIR)/lib/bdev/ocf/env/" --quiet
|
||||
$(Q)$(MAKE) -C "$(CONFIG_OCF_PATH)" inc O="$(SPDK_ROOT_DIR)/module/bdev/ocf/env/" --quiet
|
||||
|
||||
ocf_src: ocf_inc
|
||||
$(Q)$(MAKE) -C "$(CONFIG_OCF_PATH)" src O="$(SPDK_ROOT_DIR)/lib/bdev/ocf/env/" CMD=cp --quiet
|
||||
$(Q)$(MAKE) -C "$(CONFIG_OCF_PATH)" src O="$(SPDK_ROOT_DIR)/module/bdev/ocf/env/" CMD=cp --quiet
|
||||
|
||||
ocf_distclean:
|
||||
$(Q)$(MAKE) -C "$(CONFIG_OCF_PATH)" distclean O="$(SPDK_ROOT_DIR)/lib/bdev/ocf/env/" --quiet
|
||||
$(Q)$(MAKE) -C "$(CONFIG_OCF_PATH)" distclean O="$(SPDK_ROOT_DIR)/module/bdev/ocf/env/" --quiet
|
||||
|
||||
clean: ocf_distclean
|
||||
$(Q)rm -rf "$(SPDK_ROOT_DIR)/lib/bdev/ocf/env/include" \
|
||||
"$(SPDK_ROOT_DIR)/lib/bdev/ocf/env/src" \
|
||||
$(Q)rm -rf "$(SPDK_ROOT_DIR)/module/bdev/ocf/env/include" \
|
||||
"$(SPDK_ROOT_DIR)/module/bdev/ocf/env/src" \
|
||||
$(LIB) $(OBJS);
|
||||
|
||||
$(LIB): $(OBJS)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user