#------------------------------->  Makefile  <--------------------------------#
#- Copyright (C) 199x by International Computer Science Institute            -#
#- This file is part of the GNU Sather package. It is free software; you may -#
#- redistribute  and/or modify it under the terms of the  GNU General Public -#
#- License (GPL)  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 Doc/GPL for more details.        -#
#- The license text is also available from:  Free Software Foundation, Inc., -#
#- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     -#
#------------->  Please email comments to <bug-sather@gnu.org>  <-------------#

SATHER_HOME=$(shell cd ../..;pwd)

include $(SATHER_HOME)/config.default

ARCHITECTURES=sparc_solaris \
	      i386_solaris \
	      i386_linux \
	      i386_cygwin \
	      hppa_hpux \
	      axp_osf \
	      mips_irix5

default: beware
	$(MAKE) -C src ARCH=$(ARCH)
	$(MAKE) -C schedulers ARCH=$(ARCH)

install: beware
	[ -d ../lib ] || mkdir ../lib
	[ -d ../include ] || mkdir ../include
	$(MAKE) -C src install ARCH=$(ARCH)
	$(MAKE) -C schedulers install ARCH=$(ARCH)

tests: beware all
	$(MAKE) -C tests ARCH=$(ARCH)		

clean:
	$(MAKE) -C src clean
	$(MAKE) -C schedulers clean
	$(MAKE) -C tests clean
	$(MAKE) -C ConjunctiveLocks clean

beware:
ifndef ARCH
	@echo ERROR: Variable ARCH has to be specified
	@exit 1
endif
