CC=gcc CC_OMP=gcc -fopenmp CC_MPI=mpicc CFLAGS=-Wall -lm -std=c99 SRC=src BUILD=build BIN=bin all: sequential mpi_line mpi_line_async omp sse sequential: config utils main ${CC} ${CFLAGS} \ ${BUILD}/config.o \ ${BUILD}/utils.o \ ${BUILD}/main.o \ ${SRC}/impl/sequential.c \ -o ${BIN}/jacobi_sequential sse: config utils main ${CC_OMP} ${CFLAGS} \ ${BUILD}/config.o \ ${BUILD}/utils.o \ ${BUILD}/main.o \ ${SRC}/impl/sse.c \ -o ${BIN}/jacobi_sse omp: config utils main ${CC_OMP} ${CFLAGS} \ ${BUILD}/config.o \ ${BUILD}/utils.o \ ${BUILD}/main.o \ ${SRC}/impl/omp.c \ -o ${BIN}/jacobi_omp mpi_line: config utils main_mpi ${CC_MPI} ${CFLAGS} \ ${BUILD}/config.o \ ${BUILD}/utils.o \ ${BUILD}/main_mpi.o \ ${SRC}/impl/mpi_line.c \ -o ${BIN}/jacobi_mpi_line mpi_line_async: config utils main_mpi ${CC_MPI} ${CFLAGS} \ ${BUILD}/config.o \ ${BUILD}/utils.o \ ${BUILD}/main_mpi.o \ ${SRC}/impl/mpi_line_async.c \ -o ${BIN}/jacobi_mpi_line_async main: ${SRC}/main/main.c ${CC_MPI} -c ${CFLAGS} \ ${SRC}/main/main.c \ -o ${BUILD}/main.o main_mpi: ${SRC}/main/main_mpi.c ${CC_MPI} -c ${CFLAGS} \ ${SRC}/main/main_mpi.c \ -o ${BUILD}/main_mpi.o config: ${SRC}/config.c ${CC_MPI} -c ${CFLAGS} \ ${SRC}/config.c \ -o ${BUILD}/config.o utils: ${SRC}/utils.c ${CC_MPI} -c ${CFLAGS} \ ${SRC}/utils.c \ -o ${BUILD}/utils.o .PHONY: clean clean: rm build/[^.]* bin/[^.]*