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