#	Makefile for iscsi 
#
#	Use this Makefile for creating standalone iSCSI modules for
#	Linux 2.4.x platform. Copy it to Makefile.
#
#	vi: set autoindent tabstop=8 shiftwidth=4 :
#
#
#	Copyright (C) 2001-2003 InterOperability Lab (IOL)
#	University of New Hampshier (UNH)
#	Durham, NH 03824
#
#	This program is free software; you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation; either version 2, or (at your option)
#	any later version.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program; if not, write to the Free Software
#	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
#	USA.
#
#	The name of IOL and/or UNH may not be used to endorse or promote products
#	derived from this software without specific prior written permission.
#


src_d := security common initiator cmd target 

all : iscsi

iscsi:
	@for i in $(src_d); do \
		(if [ -d $$i ] ; \
			then \
				cd $$i; \
				$(MAKE)  ; \
			else \
				: ;\
		fi); \
	done

cscope:
	find . -name "*.[csh]" -print > cscope.files 
	 cscope -b

.PHONY:	clean

clean:

	@for i in $(src_d); do \
		(if [ -d $$i ] ; \
			then \
				cd $$i; \
				$(MAKE)  clean ; \
			else \
				: ;\
		fi); \
	done

rpm: clean
	tar cf /usr/src/redhat/SOURCES/unh_iscsi.tar  .
	gzip -f /usr/src/redhat/SOURCES/unh_iscsi.tar
	rpmbuild -ba unh_iscsi.specfile

# For SuSE && UnitedLinux - Note pathname differences
suse_rpm: clean
	tar cf /usr/src/packages/SOURCES/unh_iscsi.tar  .
	gzip -f /usr/src/packages/SOURCES/unh_iscsi.tar
	rpm -ba unh_iscsi.specfile

tarball: clean
#
# Generate a tarball named from the spec file (unh_iscsi-1.5.03.tar.gz)
#
	cmd/tar.sh






