ift630_sts3/Makefile

32 lines
491 B
Makefile
Raw Normal View History

2024-04-11 03:29:23 +00:00
.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)/*