#
# $Id:$
#	Makefile for R^2mark : build 
#	Copyright (C) 2000 YAMAUCHI Hitoshi »³Æâ ÀÆ
#
MAKE=make

all:
	@echo "This Makefile trys to build R^2mark."
	@echo "Type make r2mark"
	@echo ""
	@echo "Notice:"
	@echo "	1. Some environment needs to input mpich path at building mpiJava."
	@echo ""
	@echo "good luck..."

#
# build all executable
#
r2mark: cppversion mpijava javaversion

#
# build C++ version
#
cppversion:
	(cd C++; ./configure; ${MAKE})

#
# Java version
#
mpijava:
	(cd mpiJava-1.2; ./configure; ${MAKE})

javaversion: 
	(cd Java/jp/ac/tohoku/is/archi/mpi2; ./configure; ${MAKE})

#
# clean
#
clean :
	(cd C++; 	 ${MAKE} clean)
	(cd mpiJava-1.2; ${MAKE} clean)
	(cd Java/jp/ac/tohoku/is/archi/mpi2; ${MAKE} clean)

#
# distclean
#
DISTCLEANFILE="config.cache config.log config.status"

distclean :
	(cd C++; ${MAKE} clean; ${MAKE} distclean; ${RM} ${DISTCLEANFILE};)
	(cd mpiJava-1.2; ${MAKE} clean)
	(cd Java/jp/ac/tohoku/is/archi/mpi2; ${MAKE} clean; ${MAKE} distclean; \
	 ${RM} ${DISTCLEANFILE})


#
# make arc
#
arcs :
	tar cvf arcs.tar C++ Makefile benchscript mpiJava-1.2 Java README
	gzip --best -v arcs.tar
