# File       : Makefile
# Description: Makefile utility to compile Cannon's algorithm
# Copyright 2023 Harvard University. All Rights Reserved.

CXX = mpic++
CXXFLAGS = -Wall -Wextra -Wpedantic
SRC = main.cpp Cannon2D.cpp
DEP = Cannon2D.h
.PHONY: clean

all: main

main: $(SRC) $(DEP)
	$(CXX) $(CXXFLAGS) -O3 -g -DOMPI_SKIP_MPICXX -DNDEBUG $(SRC) -o $@

debug: $(SRC) $(DEP)
	$(CXX) $(CXXFLAGS) -O0 -g -DOMPI_SKIP_MPICXX $(SRC) -o $@

clean:
	rm -f main debug *.o
