# $Id: Makefile.in,v 1.3 2000/07/18 15:29:10 m-hirano Exp $
# $RWC_Release: Omni-1.6 $
# $RWC_Copyright:
#  Omni Compiler Software Version 1.5-1.6
#  Copyright (C) 2002 PC Cluster Consortium
#  
#  This software is free software; you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License version
#  2.1 published by the Free Software Foundation.
#  
#  Omni Compiler Software Version 1.0-1.4
#  Copyright (C) 1999, 2000, 2001.
#   Tsukuba Research Center, Real World Computing Partnership, Japan.
#  
#  Please check the Copyright and License information in the files named
#  COPYRIGHT and LICENSE under the top  directory of the Omni Compiler
#  Software release kit.
#  
#  
#  $
NPBDIRS=BT CG EP FT LU MG SP

prefix = @prefix@
exec_prefix = @exec_prefix@
OMPF77=${exec_prefix}/bin/omf77 -omp

all:	test

fullbuild:
	@for i in $(NPBDIRS); do \
		echo "Making $$i.."; \
		(cd $$i; rm -f *.o a.out; $(OMPF77) *.f); \
		echo "Making $$i done."; \
	done

build:
	@for i in $(NPBDIRS); do \
		echo; \
		echo "Making $$i.."; \
		(cd $$i; \
			if test -x ./a.out; then \
				true; \
			else \
				rm -f *.o a.out; $(OMPF77) *.f; \
			fi); \
		echo "Making $$i done."; \
		echo; \
	done

test:	build
	@for i in $(NPBDIRS); do \
		echo; \
		echo "Run $$i.."; \
		(cd $$i; \
			if test -x ./a.out; then \
				./a.out; \
				exit 0; \
			else \
				echo "Can't run $$i."; \
				exit 1; \
			fi); \
		if test $$? -eq 0; then \
			echo "Testing $$i OK."; \
		else \
			echo "Testing $$i failed."; \
		fi; \
		echo; \
	done

install:
	true

clean:
	for i in $(NPBDIRS); do \
		(cd $$i; rm -f *.o a.out core *~); \
	done
	rm -f *~ core

distclean:	clean
	rm -f ./Makefile
	
Makefile::
	(cd ../..; sh ./config.status)
