From fcde3149966c815920c6182e6aaa355ae43897c3 Mon Sep 17 00:00:00 2001 From: Ti Leggett Date: Mon, 3 Jun 2024 20:53:19 +0000 Subject: [PATCH] Updating Makefile to accommodate MPI compiler --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 72b6891..087c6ee 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,15 @@ CFLAGS = -I . LIBS = -lm -CC = cc FLAGS = +ifdef $(CC) + ifeq ($(CC), mpicc) + LIBS = -lm -lmpi + endif +else + CC = cc +endif + %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) $(FLAGS)