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)