Blame view

lab3/Makefile 497 Bytes
2b4ce206b   kmazouzi   Add Makefile
1
  GCC      = gcc
a67a1dd2b   kmazouzi   rewrite error wit...
2
3
  CFLAGS   = -O3 -fopenmp 
  LDFLAG   = -lm
2b4ce206b   kmazouzi   Add Makefile
4
5
  OMP_FLAG = -fopenmp
  RM       =  rm -rf
3604dfae0   kmazouzi   MPI version
6
7
8
  MPI      = mpicc
  MPI_FLAG = -O1 -g
  EXE = omp_heat2D ser_heat2D mpi_heat2D
2b4ce206b   kmazouzi   Add Makefile
9
10
11
12
  
  all : $(EXE) 
  
  #.PHONY: all  clean purge
3604dfae0   kmazouzi   MPI version
13
  ser_heat2D: ser_heat2D.o
a67a1dd2b   kmazouzi   rewrite error wit...
14
  	$(GCC) $(CFLAGS) -o $@ $^ $(LDFLAG)
2b4ce206b   kmazouzi   Add Makefile
15

3604dfae0   kmazouzi   MPI version
16
  omp_heat2D: omp_heat2D.o
a67a1dd2b   kmazouzi   rewrite error wit...
17
  	$(GCC) $(CFLAGS) -o $@ $^ $(LDFLAG)
2b4ce206b   kmazouzi   Add Makefile
18

3604dfae0   kmazouzi   MPI version
19
  mpi_heat2D:
a67a1dd2b   kmazouzi   rewrite error wit...
20
  	$(MPI) $(MPI_FLAG) mpi_heat2D.c  -o $@ $(LDFLAG) 
3604dfae0   kmazouzi   MPI version
21

2b4ce206b   kmazouzi   Add Makefile
22
23
24
25
26
27
28
29
30
31
  
  %.o :%.c
  	$(GCC) $(CFLAGS) -c -o $@ $<
  
  
  clean:
  	$(RM) *.o *.dat
  
  purge: clean
  	$(RM) $(EXE)