#
# Copyright (c) 2011-2015, Emulex
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without 
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, 
#    this list of conditions and the following disclaimer.
# 
# 2. 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.
# 
# 3. Neither the name of the copyright holder 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 HOLDER 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.
#

PROG_NAME	= "ocs_fc_ramd"
DOC_TAR		= $(PROG_NAME)-doc.tgz

OS		= ../common
OCS		= ../../common/ocs
HAL		= ../../common/hal
XPORT		= ../../common/ocs_fc
TARGET		= ../../common/ocs_ramd
INITIATOR	= ../../common/ocs_ini_stub
USPACE		= ../../linux/ocs_uspace

DEFINES		= -DOCS_INCLUDE_DEBUG -DENABLE_FABRIC_EMULATION -DOCS_EXCLUDE_BE3

SRCS	 =  \
	ocs_driver.c \
	$(OS)/ocsu_main.c \
	$(OS)/ocs_ocsu.c \
	$(OS)/ocs_os.c \
	$(OS)/ocs_impl_uspace.c \
	$(OS)/dslab.c \
	$(OS)/ocs_socket.c \
	$(OS)/crc32.c \
	$(OS)/ocsu_ioctl.c \
	$(XPORT)/ocs_nvme_stub.c \
	$(XPORT)/ocs_debug.c \
	$(XPORT)/ocs_domain.c \
	$(XPORT)/ocs_sport.c \
	$(XPORT)/ocs_node.c \
	$(XPORT)/ocs_unsol.c \
	$(XPORT)/ocs_io.c \
	$(XPORT)/ocs_scsi.c \
	$(XPORT)/ocs_els.c \
	$(XPORT)/ocs_fabric.c \
	$(XPORT)/ocs_device.c \
	$(XPORT)/ocs_ddump.c \
	$(XPORT)/ocs_mgmt.c \
	$(XPORT)/ocs_xport.c \
	$(XPORT)/ocs_elxu.c \
	$(XPORT)/ocs_femul.c \
	$(XPORT)/spv.c \
	$(HAL)/sli4.c \
	$(HAL)/sli4_fc.c \
	$(HAL)/ocs_sm.c \
	$(HAL)/ocs_hal.c \
	$(HAL)/ocs_hal_queues.c \
	$(HAL)/ocs_hal_rqpair.c \
	$(HAL)/ocs_hal_workaround.c \
	$(TARGET)/ocs_ramdisc.c \
	$(TARGET)/ocs_ramd.c \
	$(TARGET)/ocs_ramd_thread.c \
	$(TARGET)/mode_sense.c \
	$(INITIATOR)/ocs_ini_stub.c \
	$(OCS)/ocs_textbuf.c \
	$(OCS)/ocs_dif.c \
	$(OCS)/t10crc16.c \
	$(OCS)/ocs_list.c \
	$(OCS)/ocs_ramlog.c \
	$(OCS)/ocs_mgmt_common.c \
	$(OCS)/ocs_ioctl.c \
	$(OCS)/ocs_ioctl_fc.c \
	$(OCS)/ocs_ddumplib.c \
	$(OCS)/ocs_gendump.c \
	$(OCS)/ocs_cbuf.c \
	$(OCS)/ocs_array.c \
	$(OCS)/ocs_pool.c \
	$(OCS)/ocs_ras.c \
	$(OCS)/ocs_recovery.c \


include ../common/Makefile.incl

RELEASE_FILES = \
	Makefile \
	version.h \
	ocs_driver.c \
	ocs.h \
	README \
	ocs_fc_ramd-doc.tgz \
	Doxyfile \
	DoxygenLayout.xml \
	main.doxygen

docdist:
	@echo "Creating document tar file: ${PROG_NAME}-doc.tgz"
	@doxygen > doxygen.log 2>&1
	@cp ../../common/doxy/images/uspace_ocs_fc_ramd/*.jpg doc/html
	@cp ../../common/doxy/images/common/*.png doc/html
	@tar cfz ${DOC_TAR} doc
