#	common/Makefile
#
#	vi: set autoindent tabstop=4 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.
#


include ../Rules.make

CFLAGS = -O3 -Wall 

EXECUTABLES = iscsi_manage iscsi_config parse iscsi_test

COMMONPATH = ../common

all: $(EXECUTABLES)
 
iscsi_manage: iscsi_manage.c $(COMMONPATH)/debug.c $(COMMONPATH)/iscsi_common.c
	$(CC)	$(CFLAGS) -I $(COMMONPATH)/ -o iscsi_manage iscsi_manage.c \
			$(COMMONPATH)/debug.c $(COMMONPATH)/iscsi_common.c

iscsi_test:	iscsi_test.c
	$(CC)	$(CFLAGS) -o iscsi_test iscsi_test.c

parse:	parse.o
	$(CC)	$(CFLAGS) parse.o -o parse

parse.o:	parse.c
	$(CC)	$(CFLAGS) -c parse.c

geometry:	geometry.o
	$(CC)	$(CFLAGS) geometry.o -o geometry

geometry.o:	geometry.c
	$(CC)	$(CFLAGS) -c geometry.c

iscsi_config: iscsi_config.c $(COMMONPATH)/iscsi_common.h $(COMMONPATH)/debug.h
	$(CC)	$(CFLAGS) -I $(COMMONPATH)/ -o iscsi_config iscsi_config.c


.PHONY: clean

clean:
	$(RM) *.o $(EXECUTABLES) scsi_disk_file_* 

