Blame view
lab3/Makefile
451 Bytes
2b4ce206b Add Makefile |
1 2 3 4 |
GCC = gcc CFLAGS = -O3 -fopenmp OMP_FLAG = -fopenmp RM = rm -rf |
3604dfae0 MPI version |
5 6 7 |
MPI = mpicc MPI_FLAG = -O1 -g EXE = omp_heat2D ser_heat2D mpi_heat2D |
2b4ce206b Add Makefile |
8 9 10 11 |
all : $(EXE) #.PHONY: all clean purge |
3604dfae0 MPI version |
12 |
ser_heat2D: ser_heat2D.o |
2b4ce206b Add Makefile |
13 |
$(GCC) $(CFLAGS) -o $@ $^ |
3604dfae0 MPI version |
14 |
omp_heat2D: omp_heat2D.o |
2b4ce206b Add Makefile |
15 |
$(GCC) $(CFLAGS) -o $@ $^ |
3604dfae0 MPI version |
16 17 |
mpi_heat2D: $(MPI) $(MPI_FLAG) mpi_heat2D.c -o $@ |
2b4ce206b Add Makefile |
18 19 20 21 22 23 24 25 26 27 |
%.o :%.c $(GCC) $(CFLAGS) -c -o $@ $< clean: $(RM) *.o *.dat purge: clean $(RM) $(EXE) |