# create Makefile from this file with configure script
##### User configurable options #####
ALL: mpi
LARCH       = @ARCH@
COMM        = @COMM@
DEVICE      = @DEVICE@
BOPT        = @BOPT@
P4_DIR      = @P4_DIR@
TOOLS_DIR   = @TOOLS_DIR@
MPIR_HOME   = @MPIR_HOME@
INCLUDE_DIR = @INCLUDE_PATH@ -Impid/@DEVICE@ -Iinclude
PREFIX	    = @PREFIX@
MAKE        = @MAKE@
CPRP        = @CPRP@
RSH_COMMAND = @RSH_COMMAND@
DEFAULT_MACHINE = @DEFAULT_MACHINE@
### End User configurable options ###

SHELL = /bin/sh

MPIDIRS  = src/pt2pt src/env src/dmpi src/util src/context src/coll \
	   src/topol src/profile
DIRS     = $(MPIDIRS) mpid/$(DEVICE) @CPP_DIR@ @MPE_DIR@ \
	   examples examples/basic examples/test/pt2pt examples/test/coll \
	   examples/test/topol examples/test/context \
	   examples/test/env examples/test \
	   examples/contrib examples/perftest \
           profiling/examples profiling/lib profiling/wrappergen
# 
# This is a list of the devices that are available
DEVICES  = mpid/ch2 \
	   mpid/chameleon mpid/ch_nx mpid/ch_p4 mpid/ch_nc mpid/ch_cmmd \
	   mpid/ch_mpl mpid/meiko mpid/t3d mpid/ch_meiko mpid_ch_shmem \
	   mpid/ch_tcp mpid/sgi mpid/nx mpid/ch_nexus mpid/ch_lfshmem \
	   mpid/ch_cenju3
# Change this in util/maketar also
OTHERDEVICES  = mpid/ch_nx mpid/ch_p4 mpid/ch_nc mpid/ch_cmmd mpid/ch_mpl \
		mpid/ch_meiko mpid/ch_shmem mpid/ch_lfshmem mpid/t3d \
		mpid/sgi mpid/nx mpid/ch_nexus mpid/ch_cenju3
# 
# Build the device FIRST in case the device include, used in mpiimpl.h, 
# needs to be built (e.g., ch_p4 device)
CODEDIRS = mpid/$(DEVICE) $(MPIDIRS) @CPP_DIR@ @MPE_DIR@

#
# The order here was chosen to identify problems early in the build
# In particular, we try a linktest as soon as the libraries are available,
# with a second link test after the profiling libraries are built just to
# be sure that they still succeed.  There are "make clean"s around the 
# whole thing so that there is reduced danger of finding the "wrong" 
# object files .
mpi:
	$(MAKE) clean
	$(MAKE) rmlib
	$(MAKE) mpilib
	$(MAKE) mpiflib
	@echo "Testing that MPI applications can be linked..."
	$(MAKE) linktest
	$(MAKE) clean
	$(MAKE) profile
	$(MAKE) clean
	@if [ $(COMM) = "ch_p4" ] ; then \
	    echo "You may want to do" ; \
	    echo "    $(MAKE) serv_p4" ; \
	    echo "as well." ; \
	fi
	/bin/rm -f util/mpirun
	$(MAKE) mpirun
	/bin/rm -f util/mpireconfig
	$(MAKE) mpireconfig
	$(MAKE) mpiman
	$(MAKE) upshot
	@echo "Completed build of MPI.  Check the output for errors"
	@echo "Also try executing 'make testing' in examples/test"
	@echo "(This relies on mpirun, which currently works for many"
	@echo "but not all systems.  mpirun requires that you first"
	@echo "setup the util/machines/machines.$(LARCH) file for the"
	@echo "ch_p4 device.  Other devices do not need that file)."
	@echo " "
	@echo "Send bugs and comments to mpi-bugs@mcs.anl.gov"
	@echo "With any bug report, please send"
	@echo "     The version of MPICH (e.g., 1.0.12)"
	@echo " "
	@echo "The output of running your program with the -mpiversion argument"
	@echo "(e.g., mpirun -np 1 a.out -mpiversion)"
	@echo " "
	@echo "The output of "
	@echo "        uname -a"
	@echo "for your system.  If you are on an SGI system, also"
	@echo "	       hinv"
	@echo " "
	@echo "If the problem is with a script like configure or mpirun, run the"
	@echo "script with the -echo argument "
	@echo "(e.g., mpirun -echo -np 4 a.out )"
	@echo " "
	@echo "If you are using a network of workstations, also send the output of"
	@echo "bin/tstmachines or util/tstmachines."


examples: util/mpirun
	( cd examples ; $(MAKE) default )

linktest:
	( cd examples/test/pt2pt; $(MAKE) linktest )

#
# This is the target for the report function.  The optional lines on the make
# are
#   AUTHOR=string
#   CONFIGLOG=file
#
report:
	( if [ -n "$(AUTHOR)" ] ; then auth=-author="$(AUTHOR)" ; fi ; \
	  if [ -n "$(CONFIGLOG)" ] ; then conf=-config=$(CONFIGLOG) ; fi ; \
	doc/port -dotest $$auth $$conf ; )
	doc/docgather
	mv doc.tar doc$(ARCH)$(DEVICE).tar
	@echo "Final location of tar file is doc$(DEVICE).tar"
	@echo "util/insttest -prefix=install_directory"
	@echo "may be run to complete the testing.  This must be run"
	@echo "in the foreground.  It will try to start Upshot and Nupshot."
	@echo "It also does an installation into 'install_directory'"


#
# Make sure that a failure during the make causes the make to stop at 
# that point.
mpilib: Makefile.in
	@for dir in $(CODEDIRS) ;\
	  do \
	  echo " " ;\
	  echo making mpir in directory $$dir ;\
	  (cd $$dir; \
	  $(MAKE) default_all ; if [ $$? != 0 ] ; then \
		echo "Exit status from make was $$?" ; exit 1 ; fi ;) ;\
	  done
	@RANLIB@ lib/$(LARCH)/$(COMM)/libmpi.a
	@if test -w lib/$(LARCH)/$(COMM)/libmpi++.a ; then \
		@RANLIB@ lib/$(LARCH)/$(COMM)/libmpi++.a ; fi
	@if test -w lib/$(LARCH)/$(COMM)/libmpe.a ; then \
		@RANLIB@ lib/$(LARCH)/$(COMM)/libmpe.a ; fi
	@if test -w lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; then \
		@RANLIB@ lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; fi

mpiflib: Makefile.in
	@for dir in $(MPIDIRS) ;\
	  do \
	  echo " " ;\
	  echo making mpir in directory $$dir ;\
	  (cd $$dir; \
	  $(MAKE) wrapperlib ) ;\
	  done
	@RANLIB@ lib/$(LARCH)/$(COMM)/libfmpi.a

#
# This target is used to remove the libraries for this configuration; this
# can lead to better performance when rebuilding.
rmlib:
	/bin/rm -f lib/$(LARCH)/$(COMM)/lib*.a
#
# This is a special target for just the device part of the transport
# (used to speed builds for multiple Chameleon transport layers)
#
# WARNING: THIS DEPENDS ON THE ROUTINES IN MPIDIRS CALLING ROUTINES, NOT
# MACROS, FROM THE ADI.  THIS IS CURRENTLY THE CASE BUT MAY CHANGE
# 
# This uses the "default" entry instead of "default_all" because it is
# usually executed alone, and the RANLIB is needed at the end of this
# target anyway.
mpidevlib:
	(cd mpid/$(DEVICE) ; $(MAKE) clean )
	@for dir in mpid/$(DEVICE) ;\
	  do \
	  echo " " ;\
	  echo making mpir in directory $$dir ;\
	  (cd $$dir; \
	  $(MAKE) default) ;\
	  done

#
# This is mpilib, but with memory leak/usage debugging turned on.
# The command line switch -chmemdebug will enable leak reporting
# when MPI_Finalize is called.
mpilibdebug:
	@for dir in $(CODEDIRS) ;\
	  do \
	  echo " " ;\
	  echo making mpir in directory $$dir ;\
	  (cd $$dir; \
	  $(MAKE) default_all MPIPROFILE="-DMPIR_DEBUG_MEM" ) ;\
	  (cd $$dir ; $(MAKE) clean ; \
	  $(MAKE) profile_all MPIPROFILE="-DMPIR_DEBUG_MEM -DMPI_BUILD_PROFILING");\
	  done 
	@RANLIB@ lib/$(LARCH)/$(COMM)/libmpi.a
	@RANLIB@ lib/$(LARCH)/$(COMM)/libpmpi.a
	@if test -w lib/$(LARCH)/$(COMM)/libmpi++.a ; then \
		@RANLIB@ lib/$(LARCH)/$(COMM)/libmpi++.a ; fi
	@if test -w lib/$(LARCH)/$(COMM)/libmpe.a ; then \
		@RANLIB@ lib/$(LARCH)/$(COMM)/libmpe.a ; fi
	@if test -w lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; then \
		@RANLIB@ lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; fi


profile:
	@for dir in $(MPIDIRS) ;\
	  do \
	  echo " " ;\
	  echo making mpir in directory $$dir ;\
	  (cd $$dir; \
	  $(MAKE) profile_all MPIPROFILE="-DMPI_BUILD_PROFILING" ) ;\
	  done
	@RANLIB@ lib/$(LARCH)/$(COMM)/libpmpi.a

#
# Make mpirun from mpirun.*.in
#
mpirun: util/mpirun

#
# If you change this, ALSO change it in the install target!
# Note that the csh version is no longer built
util/mpirun: util/mpirun.sh.in util/mpirun.pg.in util/mpirun.ch_p4.in
	-(cd util ; for file in mpirun.*.in tstmachines.in ; do \
	bfile=`basename $$file .in` ; \
	/bin/rm -f $$bfile ; \
	cat $$file | sed -e "s%\#MPIR_HOME\#%$(MPIR_HOME)%g" \
		-e "s%\#AUTOMOUNTFIX\#%@AUTOMOUNTFIX@%g" \
		-e "s%\#EXECER_DIR\#%$(MPIR_HOME)/util%g" \
		-e "s%\#DEFAULT_DEVICE\#%$(DEVICE)%g" \
		-e "s%\#RSH_COMMAND\#%$(RSH_COMMAND)%g" \
		-e "s%\#SYNCLOC\#%@SYNCLOC@%g" \
		-e "s%\#CC\#%@CC@%g" \
		-e "s%\#CLINKER\#%@CLINKER@%g" \
	        -e "s%\#MPIRUN_BIN\#%lib/$(LARCH)/$(COMM)%g" \
		-e "s%\#DEFAULT_MACHINE\#%$(DEFAULT_MACHINE)%g" \
		-e "s%\#DEFAULT_ARCH\#%$(LARCH)%g" > $$bfile ; \
	chmod 775 $$bfile ; \
	/bin/rm -f ../lib/$(LARCH)/$(COMM)/$$bfile ; \
	cp $$bfile ../lib/$(LARCH)/$(COMM) ; done ; \
        mv ../lib/$(LARCH)/$(COMM)/mpirun.sh ../lib/$(LARCH)/$(COMM)/mpirun ; \
	mv mpirun.sh mpirun )
#
# If you change this, ALSO change it in the install target!
mpireconfig: util/mpireconfig config.status
util/mpireconfig: util/mpireconfig.in
	cat util/mpireconfig.in | sed -e "s%\#MPIR_HOME\#%$(MPIR_HOME)%g" \
			    -e "s%\#ARCH\#%$(LARCH)%g" \
			    -e "s%\#PREFIX\#%$(PREFIX)%g" \
			    -e "s%\#COMM\#%$(COMM)%g" > \
		    util/mpireconfig ;\
	chmod 775 util/mpireconfig
	-/bin/rm -f lib/$(LARCH)/$(COMM)/mpireconfig \
		lib/$(LARCH)/$(COMM)/config.status 
	-cp util/mpireconfig config.status lib/$(LARCH)/$(COMM)

#
# Make mpiman from mpiman.in
#
mpiman: util/mpiman

#
# If you change this, ALSO change it in the install target!
util/mpiman: util/mpiman.in
	/bin/rm -f util/mpiman
	cat util/mpiman.in \
	    | sed -e "s%\#INSTALL_DIR\#%$(MPIR_HOME)%g" > util/mpiman
	chmod 755 util/mpiman
#
#
# Make upshot from upshot.in
#
upshot: profiling/upshot/bin/upshot

#
# Update the install if you change this!
profiling/upshot/bin/upshot: profiling/upshot/bin/upshot.in
	if [ -z "@wishloc@" ] ; then \
	    echo "Upshot requires the tk wish shell" ; \
	else \
	/bin/rm -f profiling/upshot/bin/upshot ; \
	cat profiling/upshot/bin/upshot.in | sed \
	  -e "s%\#wishloc\#%@wishloc@%g" \
	  -e "s%\#TK_VERSION\#%@TK_VERSION@%g" \
	  -e "s%\#BITMAP_DIR\#%$(MPIR_HOME)/profiling/upshot/bitmaps%g" > \
	    profiling/upshot/bin/upshot;\
	chmod 775 profiling/upshot/bin/upshot ; \
	fi

nupshot:
	(cd profiling/nupshot; \
	if [ ! -s Makefile ] ; then \
	    configure -tcldir=@TCL_DIR@ -tkdir=@TK_DIR@ ; fi ; \
	$(MAKE) )

#
# If you change this, ALSO change it in the install target!
serv_p4:
	( cd mpid/ch_p4/p4-1.4/servers ; $(MAKE) serv_p4 ; \
	  cp ../bin/serv_p4 ../../../../lib/$(LARCH)/ch_p4 )
	/bin/rm -f util/chp4_servs
	cat util/chp4_servs.in | sed -e "s%\#MPIR_HOME\#%$(MPIR_HOME)%g" \
		-e "s%\#DEFAULT_DEVICE\#%$(DEVICE)%g" \
		-e "s%\#RSH_COMMAND\#%$(RSH_COMMAND)%g" \
		-e "s%\#DEFAULT_MACHINE\#%$(DEFAULT_MACHINE)%g" \
		-e "s%\#DEFAULT_ARCH\#%$(LARCH)%g" > \
		    util/chp4_servs ;\
	chmod 775 util/chp4_servs
	-cp util/chp4_servs lib/$(LARCH)/$(COMM)
	-cp util/chkserv lib/$(LARCH)/$(COMM)
	-cp util/chkmachine lib/$(LARCH)/$(COMM)

#
# Changed clean to not remove the library, only the object files
#
# Also, it should not remove the "executables"
clean:
	@-if [ -d profiling/wrappergen ] ; then \
	    /bin/rm -f profiling/wrappergen/*.o ; fi
	@-if [ -s profiling/nupshot/Makefile ] ; then \
	    ( cd profiling/nupshot ; $(MAKE) clean ) ; fi
	@-if [ -d tsuite ] ; then \
	    (cd tsuite ; $(MAKE) clean ) ; fi
	@-if [ -d bugs -a -s bugs/Makefile ] ; then \
	    (cd bugs ; $(MAKE) clean ) ; fi
	@-for dir in $(DIRS) ;\
	  do \
	  echo cleaning $$dir ;\
	  (cd $$dir; if [ -s Makefile ] ; then $(MAKE) clean ; fi ) ;\
	  done
	-if [ -s mpid/ch_shmem/p2ptest/Makefile ] ; then \
	    echo "cleaning mpid/ch_shmem/p2ptest" ; \
	    (cd mpid/ch_shmem/p2ptest ; $(MAKE) clean ) ; fi
	-if [ -d mpid/tests ] ; then \
	    (cd mpid/tests ; $(MAKE) clean ) ; fi
#
# Realclean removes mpirun etc as well as the libraries.
realclean: clean
	@/bin/rm -f *~ *.ln util/mpirun util/mpireconfig util/tstmachines \
			    util/mpicc util/mpiCC util/mpif77 util/mpiinstall \
			    installtest/Makefile \
	  		    profiling/upshot/bin/upshot
	-/bin/rm -f lib/*/*/*.[oa]
	-/bin/rm -f lib/*/*.[oa]
	-/bin/rm -f ID
	if [ -n "$(TOOLS_DIR)" ] ; then  \
	    echo "cleaning mpid/chameleon" ; \
	    (cd mpid/chameleon ; $(MAKE) clean )  ; fi
	@-for dir in $(OTHERDEVICES) ; do echo cleaning $$dir ; \
	     (cd $$dir ; if [ -s Makefile ] ; then $(MAKE) clean ; fi ) ; done
	if [ -s mpid/ch_p4/p4-1.4/Makefile ] ; then \
	    (cd  mpid/ch_p4/p4-1.4 ; $(MAKE) realclean ) ; fi
	@for dir in $(DIRS) ;\
	  do \
	  echo removing Makefile in $$dir ;\
	  (cd $$dir; /bin/rm Makefile) ;\
	  done
	@/bin/rm Makefile
#
# Make an ID database from a suitable subset of the sources
# (Get mkid from sunsite if you want to use this)
#
ID: frc
	find include src/coll src/context src/dmpi src/env src/pt2pt \
		src/topol src/util \
	mpid/ch2 mpid/$(DEVICE) mpid/util -name "*.[hc]" -print | mkid -v -

frc:


# Configure the Makefiles for some popular versions for ANL
anlchp4: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=sun4 -device=ch_p4 -var_pkt -opt="-g"
	-cp config.status lib/sun4/ch_p4
	@-chmod g+ws lib lib/sun4 lib/sun4/ch_p4 >/dev/null 2>&1
anltcp: configure 
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=sun4 -device=ch_tcp -var_pkt -opt="-g" -cc=gcc \
	-devdebug -memdebug \
	-cflags="-Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint -DNEEDS_STDLIB_PROTOTYPES"
	-cp config.status lib/sun4/ch_tcp
	@-chmod g+ws lib lib/sun4 lib/sun4/ch_tcp >/dev/null 2>&1
anlnexus: configure 
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=sun4 -device=ch_nexus -opt="-g" -cc=gcc
	-cp config.status lib/sun4/ch_nexus
	@-chmod g+ws lib lib/sun4 lib/sun4/ch_nexus >/dev/null 2>&1
anlchp4mem: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=sun4 -device=ch_p4 -var_pkt -memdebug -opt="-g" 
	-cp config.status lib/sun4/ch_p4
	@-chmod g+ws lib lib/sun4 lib/sun4/ch_p4 >/dev/null 2>&1
#
# This version turns on aggressive gcc checking.
anlchp4chk: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=sun4 -device=ch_p4 -var_pkt -memdebug -devdebug \
	-opt=-g \
	-cflags="-Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint -DNEEDS_STDLIB_PROTOTYPES" \
	-cc=gcc
	-cp config.status lib/sun4/ch_p4
	@-chmod g+ws lib lib/sun4 lib/sun4/ch_p4 >/dev/null 2>&1
anlchp4sgi: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=IRIX -comm=ch_p4 -device=ch_p4 -no_short_longs
	@-chmod g+ws lib lib/IRIX lib/IRIX/ch_p4 >/dev/null 2>&1
anlchp4alpha: configure
	@if [ `umask` != 002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=alpha -comm=ch_p4 -device=ch_p4 \
		-make=/usr/bin/make -no_short_longs 
	@-chmod g+ws lib lib/alpha lib/alpha/ch_p4 >/dev/null 2>&1
anlchp4alphamem: configure
	@if [ `umask` != 002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=alpha -comm=ch_p4 -device=ch_p4 \
		-make=/usr/bin/make -no_short_longs -memdebug
	@-chmod g+ws lib lib/alpha lib/alpha/ch_p4 >/dev/null 2>&1
anlchp4fbsd: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=freebsd -device=ch_p4 -var_pkt -memdebug \
		-opt="-g" 
	-cp config.status lib/freebsd/ch_p4
	@-chmod g+ws lib lib/freebsd lib/freebsd/ch_p4 >/dev/null 2>&1
# RS6000 sh umask returns 3 digits, not four!
anlchp4ibm: configure
	@if [ `umask` != 002 -a `umask` != 0002 ] ; then \
		echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=rs6000 -comm=ch_p4 -device=ch_p4 -no_short_longs \
		-opt="-O"
	@-chmod g+ws lib lib/rs6000 lib/rs6000/p4 >/dev/null 2>&1
anlshmemibm: configure
	@if [ `umask` != 02 -a `umask` != 0002 ] ; then \
		echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=rs6000 -device=ch_shmem -no_short_longs -opt="-O"
	@-chmod g+ws lib lib/rs6000 lib/rs6000/ch_shmem >/dev/null 2>&1
# mpl is for release 2 MPL for the SPx
anlchmpl: configure
	@if [ `umask` != 002 -a `umask` != 0002 ] ; then \
		echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=rs6000 -device=ch_mpl -opt="-g" \
		-no_short_longs 
	@-chmod g+ws lib lib/rs6000 lib/rs6000/ch_mpl >/dev/null 2>&1
anlchmplg: configure
	@if [ `umask` != 002 -a `umask` != 0002 ] ; then \
		echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=rs6000 -device=ch_mpl -opt="-g" \
		-no_short_longs
	@-chmod g+ws lib lib/rs6000 lib/rs6000/ch_mpl >/dev/null 2>&1
#
# ch_mpl-2 has the proper pkt_size, tiny_buffers, set in the chconfig.h file
anlchmpl2: configure
	@if [ `umask` != 002 -a `umask` != 0002 ] ; then \
		echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=rs6000 -device=ch_mpl-2 -opt="-g" \
		-no_short_longs
	@-chmod g+ws lib lib/rs6000 lib/rs6000/ch_mpl >/dev/null 2>&1
# This is intended to be cross-compiled on, say, a Sun
anlnx: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=intelnx -comm=nx -device=ch_nx -no_mpegraphics \
		-opt="-O"
	@-chmod g+ws lib lib/intelnx lib/intelnx/nx >/dev/null 2>&1
#
# This version allows us to build a version for profiling
anlchp4pg: configure
	@if [ `umask` != 0002 ] ; then echo "Set umask 2 first!" ; exit 1; fi
	configure -arch=sun4 -device=ch_p4 \
		-opt="-pg -O" -var_pkt
	-@chmod g+ws lib lib/sun4 lib/sun4/p4 >/dev/null 2>&1

INSTALLDIR = /usr/local/mpi
#
# The install target really needs to use some for of 'install' program that
# will create directories, set modes and owners, etc.  Alas, such a function
# is not standard.
# Note that clean removes mpirun (!) so we need to make sure that it is
# around before doing the instal
install: mpirun util/mpiinstall
	util/mpiinstall -prefix=$(PREFIX)

installlib: mpirun util/mpiinstall
	util/mpiinstall -prefix-$(PREFIX) -libonly

#
# Install adds ALL of the examples to the installation area
# This is an initial version.
install-all: install
	-$(CPRP) -r examples $(PREFIX)
	# Update the makefiles
	(cd $(PREFIX)/examples ; \
		$(PREFIX)/lib/$(LARCH)/$(COMM)/mpireconfig Makefile ; \
		for dir in `find -type d -print` ; do \
			(cd $$dir ; \
			if [ -s Makefile.in ] ; then \
			$(PREFIX)/lib/$(LARCH)/$(COMM)/mpireconfig Makefile ; \
			fi ) ; \
		done \
	)

