2022-06-03 19:15:11 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2022-11-01 20:26:26 +00:00
|
|
|
# Copyright (C) 2015 Intel Corporation.
|
2018-10-29 12:17:34 +00:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
|
|
|
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
|
|
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
|
|
|
|
2022-08-22 09:14:48 +00:00
|
|
|
SO_VER := 6
|
2020-02-28 20:47:11 +00:00
|
|
|
SO_MINOR := 0
|
|
|
|
|
2022-06-15 08:02:25 +00:00
|
|
|
ifdef SPDK_FTL_VSS_EMU
|
|
|
|
CFLAGS += -DSPDK_FTL_VSS_EMU
|
|
|
|
endif
|
|
|
|
|
2022-08-18 13:14:54 +00:00
|
|
|
ifdef SPDK_FTL_RETRY_ON_ERROR
|
|
|
|
CFLAGS += -DSPDK_FTL_RETRY_ON_ERROR
|
|
|
|
endif
|
|
|
|
|
2022-06-01 13:18:03 +00:00
|
|
|
ifdef SPDK_FTL_L2P_FLAT
|
|
|
|
CFLAGS += -DSPDK_FTL_L2P_FLAT
|
|
|
|
endif
|
|
|
|
|
2022-06-21 13:45:21 +00:00
|
|
|
ifneq ($(strip $(SPDK_FTL_ZONE_EMU_BLOCKS)),)
|
|
|
|
CFLAGS += -DSPDK_FTL_ZONE_EMU_BLOCKS=$(SPDK_FTL_ZONE_EMU_BLOCKS)
|
|
|
|
endif
|
|
|
|
|
2022-06-22 12:54:05 +00:00
|
|
|
CFLAGS += -I.
|
|
|
|
|
2022-05-27 12:57:35 +00:00
|
|
|
FTL_SUBDIRS := mngt utils upgrade
|
2022-06-22 12:01:59 +00:00
|
|
|
|
2022-07-07 17:53:08 +00:00
|
|
|
C_SRCS = ftl_core.c ftl_init.c ftl_layout.c ftl_debug.c ftl_io.c ftl_sb.c ftl_l2p.c ftl_l2p_flat.c
|
2022-06-15 12:35:46 +00:00
|
|
|
C_SRCS += ftl_nv_cache.c ftl_band.c ftl_band_ops.c ftl_writer.c ftl_rq.c ftl_reloc.c ftl_l2p_cache.c
|
2022-05-25 13:12:52 +00:00
|
|
|
C_SRCS += ftl_p2l.c ftl_trace.c
|
2022-06-21 13:45:21 +00:00
|
|
|
C_SRCS += mngt/ftl_mngt.c mngt/ftl_mngt_bdev.c mngt/ftl_mngt_shutdown.c mngt/ftl_mngt_startup.c
|
2022-07-07 17:53:08 +00:00
|
|
|
C_SRCS += mngt/ftl_mngt_md.c mngt/ftl_mngt_misc.c mngt/ftl_mngt_ioch.c mngt/ftl_mngt_l2p.c
|
2022-07-07 17:32:30 +00:00
|
|
|
C_SRCS += mngt/ftl_mngt_band.c mngt/ftl_mngt_self_test.c mngt/ftl_mngt_p2l.c
|
2022-05-27 12:57:35 +00:00
|
|
|
C_SRCS += mngt/ftl_mngt_recovery.c mngt/ftl_mngt_upgrade.c
|
2022-06-10 08:28:16 +00:00
|
|
|
C_SRCS += utils/ftl_conf.c utils/ftl_md.c utils/ftl_mempool.c utils/ftl_bitmap.c
|
2022-05-25 09:55:36 +00:00
|
|
|
C_SRCS += upgrade/ftl_layout_upgrade.c upgrade/ftl_sb_upgrade.c upgrade/ftl_p2l_upgrade.c
|
|
|
|
C_SRCS += upgrade/ftl_band_upgrade.c upgrade/ftl_chunk_upgrade.c
|
2018-10-29 13:41:51 +00:00
|
|
|
|
2020-04-18 22:11:43 +00:00
|
|
|
SPDK_MAP_FILE = $(abspath $(CURDIR)/spdk_ftl.map)
|
|
|
|
|
2018-10-29 12:17:34 +00:00
|
|
|
LIBNAME = ftl
|
|
|
|
|
|
|
|
include $(SPDK_ROOT_DIR)/mk/spdk.lib.mk
|
2022-06-22 12:01:59 +00:00
|
|
|
|
|
|
|
# TODO: This should be handled by spdk.subdirs.mk
|
|
|
|
CLEAN_FTL_SUBDIRS = $(addprefix clean_ftl_, $(FTL_SUBDIRS))
|
|
|
|
|
|
|
|
clean: $(CLEAN_FTL_SUBDIRS)
|
|
|
|
|
|
|
|
.PHONY: $(CLEAN_FTL_SUBDIRS)
|
|
|
|
$(CLEAN_FTL_SUBDIRS): _Q := $(Q)
|
|
|
|
$(CLEAN_FTL_SUBDIRS): Q :=
|
|
|
|
$(CLEAN_FTL_SUBDIRS): clean_ftl_%:%
|
|
|
|
$(_Q)cd $< && $(CLEAN_C)
|