# # sample Makefile for MPI (OpenMPI implementation) # # usage examples: # "make hello" to compile "hello.c" to "hello" # "make hello++" to compile "hello++.cpp" to "hello++" # MPICC = mpicc CFLAGS = -O -Wall -pedantic -std=c99 MPICXX = mpiCC CCFLAGS = -O -Wall -std=c++98 %: %.c $(MPICC) -o $@ $(CFLAGS) $< %: %.cpp $(MPICXX) -o $@ $(CCFLAGS) $<