#
# sample Makefile for MPI (MPI-CH implementation)
#
# B. Massingill, 01/24/2002
#
# usage examples:
#   "make hello" to compile "hello.c" to "hello"
#   "make hello++" to compile "hello++.cpp" to "hello++"
#

MPICC        = /usr/local/mpich-1.2.1/bin/mpicc
MPICXX       = /usr/local/mpich-1.2.1/bin/mpiCC
OPTFLAGS     = -O -Wall -pedantic
IPATH        = /usr/local/mpich-1.2.1/include 

CFLAGS	  = $(OPTFLAGS) -I$(IPATH)
CCFLAGS	  = $(CFLAGS) 

%: %.c
	$(MPICC) -o $@ $(CFLAGS) $<
	-rm $*.o

%: %.cpp
	$(MPICXX) -o $@ $(CCFLAGS) $<
	-rm $*.o