ccflags-y :=	-I$(src)/../include			\
		-Wall					\
		-Wextra					\
		-Wno-type-limits			\
		-Wno-missing-field-initializers		\
		-Wno-unused-parameter			\
		-Wformat				\
		-O2					\
		-Werror=format-security			\
		-Werror=implicit-function-declaration	\
		-pipe					\
		-g					\
		-grecord-gcc-switches			\
		-Wstrict-prototypes

ccflags-y +=	$(shell [ -n "${BUILD_DATE}" ] && echo -DSCST_BUILD_DATE=${BUILD_DATE})		\
		$(shell [ -n "${BUILD_NUMBER}" ] && echo -DSCST_BUILD_NUMBER=${BUILD_NUMBER})	\
		$(shell [ -n "${GIT_COMMIT}" ] && echo -DSCST_GIT_COMMIT=${GIT_COMMIT})		\
		$(shell [ -n "${KVER}" ] && echo -DSCST_KVER=${KVER})				\
		$(shell [ -n "${ARCH_TYPE}" ] && echo -DSCST_ARCH_TYPE=${ARCH_TYPE})		\
		$(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM)

#ccflags-y += -DCONFIG_SCST_STRICT_SERIALIZING
#ccflags-y += -DCONFIG_SCST_USE_EXPECTED_VALUES
#ccflags-y += -DCONFIG_SCST_TEST_IO_IN_SIRQ
#ccflags-y += -DCONFIG_SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
#ccflags-y += -DCONFIG_SCST_DEBUG_RETRY
#ccflags-y += -DCONFIG_SCST_DEBUG_OOM
#ccflags-y += -DCONFIG_SCST_DEBUG_SN
#ccflags-y += -DCONFIG_SCST_DEBUG_SYSFS_EAGAIN

# If defined, makes SCST zero allocated data buffers.
# Undefining it considerably improves performance and eases CPU load,
# but could create a security hole (information leakage), so
# enable it if you have strict security requirements.
#ccflags-y += -DSCST_STRICT_SECURITY

obj-m := scst.o

scst-y +=	scst_copy_mgr.o		\
		scst_debug.o		\
		scst_dlm.o		\
		scst_event.o		\
		scst_lib.o		\
		scst_local_cmd.o	\
		scst_main.o		\
		scst_mem.o		\
		scst_no_dlm.o		\
		scst_pres.o		\
		scst_sysfs.o		\
		scst_targ.o		\
		scst_tg.o

obj-$(CONFIG_SCST) += scst.o dev_handlers/
