Makefile 457 Bytes
GCC      = gcc
MPI      = mpicc
CFLAGS   = -O3 -fopenmp
OMP_FLAG = -fopenmp
RM       =  rm -rf


EXE = pi_ser pi_omp pi_task pi_mpi

all : $(EXE) 

#.PHONY: all  clean purge


pi_ser: pi_ser.o
	$(GCC) $(CFLAGS) -o $@ $^

pi_task: pi_task.o
	$(GCC) $(CFLAGS) -o $@ $^

pi_omp: pi_omp.o
	$(GCC) $(CFLAGS) $(OMP_FLAG)  -o $@ $^

pi_mpi: 
	$(MPI) $(CFLAGS) -o $@  pi_mpi.c

%.o :%.c
	$(GCC) $(CFLAGS) -c -o $@ $<


clean:
	$(RM) *.o

purge: clean
	$(RM) $(EXE)