From 1f8622da9248797af64a576709586c41574bc5e7 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Fri, 30 Apr 2021 14:09:13 -0600 Subject: [PATCH] improve Makefile --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 94238dc..bc86c61 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ -TARGETS = main +TARGETS = main one-sided all: ${TARGETS} -main: main.cpp - mpicxx -Wall -Wextra $< -o $@ \ No newline at end of file +.PHONY: clean +clean: + rm -f ${TARGETS} *.o + +MPICXX := mpicxx +CXXFLAGS := -std=c++11 -Wall -Wextra -Wshadow -pedantic -O2 + +main: main.cpp Makefile + $(MPICXX) $(CXXFLAGS) $< -o $@ + +one-sided: one_sided.cpp Makefile + $(MPICXX) $(CXXFLAGS) $< -o $@ \ No newline at end of file