JacobiHPC/Makefile

30 lines
759 B
Makefile
Raw Normal View History

2016-11-19 14:04:05 +01:00
CC=mpicc
CFLAGS=-Wall -lm -std=c99
SRC=src
BUILD=build
BIN=bin
all: sequential mpi_line
sequential: config utils main
${CC} ${CFLAGS} ${BUILD}/config.o ${BUILD}/utils.o ${BUILD}/main.o ${SRC}/impl/sequential.c -o ${BIN}/jacobi_sequential
2016-11-19 14:49:50 +01:00
mpi_line: config utils main_mpi
${CC} ${CFLAGS} ${BUILD}/config.o ${BUILD}/utils.o ${BUILD}/main_mpi.o ${SRC}/impl/mpi_line.c -o ${BIN}/jacobi_mpi_line
2016-11-19 14:04:05 +01:00
main: ${SRC}/main.c
${CC} -c ${CFLAGS} ${SRC}/main.c -o ${BUILD}/main.o
2016-11-19 14:49:50 +01:00
main_mpi: ${SRC}/main_mpi.c
${CC} -c ${CFLAGS} ${SRC}/main_mpi.c -o ${BUILD}/main_mpi.o
2016-11-19 14:04:05 +01:00
config: ${SRC}/config.c
${CC} -c ${CFLAGS} ${SRC}/config.c -o ${BUILD}/config.o
utils: ${SRC}/utils.c
${CC} -c ${CFLAGS} ${SRC}/utils.c -o ${BUILD}/utils.o
.PHONY: clean
clean:
rm build/* bin/*