###############################################################################
# Makefile - makefile for all of tkisem
#
# $Id: Makefile 1.1 Sat, 13 Sep 1997 12:04:11 -0600 maccabe $
###############################################################################

#  ISEM - Instructional Sparc EMulator and tkisem
#  Copyright (C) 1993-2001
#	Department of Computer Science,
#      The University of New Mexico

#   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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA.

SHELL = /bin/sh
# Leave build last!
SUBDIRS = src generic tests build

all clean realclean depend install: configure
	@for i in $(SUBDIRS); do \
	    (cd $$i ; echo "making" $@ "in $$i..."; \
	    $(MAKE) $(MFLAGS) $@); \
	done

configure: build/make.config

build/make.config:
	@echo "--------------------------------------------"
	@echo "  Configuring using all default values"
	@echo "  (You can also configure explicitly.  For example,"
	@echo "     ./configure --prefix=/home/foo/tkisem"
	@echo "  will arrange to install tkisem in "
	@echo "  '/home/foo/tkisem/bin' and '/home/foo/tkisem/lib'."
	@echo "--------------------------------------------"
	./configure

distrib: realclean
	@rm -f *~ core
	(dir=`basename \`pwd\`` ; echo "$$dir"; cd .. ; tar -cvzf $$dir.tgz $$dir )
