ALL: default
##### User configurable options #####

ARCH        = @ARCH@
MPIR_HOME   = @MPIR_HOME@
CC          = @CC@
CLINKER     = $(CC)
CCC         = @CPP_COMPILER@
CCLINKER    = $(CCC)
F77         = @F77@
FLINKER     = $(F77)
AR          = @AR@
RANLIB      = @RANLIB@
PROFILING   = $(PMPILIB)
OPTFLAGS    = @OPTFLAGS@
MPE_GRAPH   = @MPE_GRAPHICS@
#
DEVICE      = @DEVICE@

### End User configurable options ###
SHELL = /bin/sh

# Were not ready to do contrib by default yet.
SUBDIRS = test perftest
TESTDIRS = test
EXECS = sendchar

default: subdirs

subdirs:
	@for dir in $(SUBDIRS) ;\
		do \
			echo " " ;\
			echo Making in directory $$dir ;\
			(cd $$dir; $(MAKE)) ;\
		done

testing:
	@for dir in $(TESTDIRS) ;\
		do \
			if [ ! -d $$dir -o ! -s $$dir/Makefile ] ; then \
				continue ; fi ; \
			echo " " ;\
			echo Making tests in directory $$dir ;\
			(cd $$dir; $(MAKE) testing) ;\
		done

linktest:
	@for dir in $(SUBDIRS) ;\
		do \
			if [ ! -d $$dir -o ! -s $$dir/Makefile ] ; then \
				continue ; fi ; \
			echo " " ;\
			echo Making linktest in directory $$dir ;\
			(cd $$dir; $(MAKE) linktest) ;\
		done

all: subdirs testing

clean:
	/bin/rm -f $(EXECS) *.o
	@for dir in $(SUBDIRS) ;\
		do \
			if [ ! -d $$dir -o ! -s $$dir/Makefile ] ; then \
				continue ; fi ; \
			echo " " ;\
			echo Making clean in directory $$dir ;\
			(cd $$dir; $(MAKE) clean) ;\
		done
