GCC = gcc CFLAGS = -O3 -fopenmp LDFLAG = -lm OMP_FLAG = -fopenmp RM = rm -rf MPI = mpicc MPI_FLAG = -O1 -g EXE = omp_heat2D ser_heat2D mpi_heat2D all : $(EXE) #.PHONY: all clean purge ser_heat2D: ser_heat2D.o $(GCC) $(CFLAGS) -o $@ $^ $(LDFLAG) omp_heat2D: omp_heat2D.o $(GCC) $(CFLAGS) -o $@ $^ $(LDFLAG) mpi_heat2D: $(MPI) $(MPI_FLAG) mpi_heat2D.c -o $@ $(LDFLAG) %.o :%.c $(GCC) $(CFLAGS) -c -o $@ $< clean: $(RM) *.o *.dat purge: clean $(RM) $(EXE)