ift630_sts3/Makefile
2024-04-10 23:29:23 -04:00

31 lines
491 B
Makefile

.PHONY: all omp mpi runmpi runomp
SRCMPI = src/mpi.c
SRCOMP = src/openmp.c
OJB = $(SRC:.c=.o)
OUT = build
CC = /usr/bin/gcc
MPICC = /usr/bin/mpicc
MPIRUN = /usr/bin/mpirun
CFLAGS = -ansi -Wall -std=c99 -O3
OMP = -fopenmp
RM = /bin/rm -fr
all: mpi openmp
cp ./stop_times.txt build
runmpi: mpi
cd build ; $(MPIRUN) -np 8 ./mpi
runomp: omp
cd build ; ./omp
mpi:
$(MPICC) $(SRCMPI) $(CFLAGS) -o $(OUT)/mpi
omp:
$(CC) $(SRCOMP) $(OMP) -o $(OUT)/omp
clean:
$(RM) $(OUT)/*