# This file is part of "VirtuaMUnstaz Demo Distribution".
#
# This 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.
#
# "VirtuaMUnstaz Demo Distribution" 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 software; see the file COPYING.  If not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

# $Id: Makefile,v 2.3 2000/03/03 09:49:56 leo Exp $ 

OBJECT	:=	util.o vmu.o vmi.o vms.o
DATE	:=	`date +%Y%m%d`

ifeq ($(OSTYPE),cygwin32)
  OBJECT	:=	$(OBJECT) getopt.o
  CFLAGS	:=	-mno-cygwin
endif

vmu: $(OBJECT) vmi.h
	$(CC) $(CFLAGS) -o $@ $(OBJECT)

clean:
	$(RM) $(OBJECT) vmu 

dist: clean
	/bin/mkdir vmi-$(DATE)
	/bin/cp *.[ch] Makefile README vmi-$(DATE)
	tar cvfz vmi.tgz vmi-$(DATE)
	(cd vmi-$(DATE); \
	 for i in *.[ch] Makefile README; do recode Latin-1..IBM-PC $$i; done)
	zip -r vmi.zip vmi-$(DATE)
	$(RM) -r vmi-$(DATE)

# dependencies
vmi.o: vmi.h util.h vmi.c
vms.o: vms.h util.h vms.c
