# File       : Makefile
# Description: Compile the targets.  You must load appropriate OpenBLAS and
#              Eigen libraries on the cluster before you run make.
# Copyright 2023 Harvard University. All Rights Reserved.
CXX ?= g++
CXXFLAGS = -g -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Isrc
.PHONY: clean

all: power_manual power_cblas power_eigen

power_manual: src/power_manual.cpp
	$(CXX) $(CXXFLAGS) -o $@ $<

power_cblas: src/power_cblas.cpp
	$(CXX) $(CXXFLAGS) -o $@ $< -lopenblas

power_eigen: src/power_eigen.cpp
	$(CXX) $(CXXFLAGS) -Wno-deprecated-copy -o $@ $<

clean:
	rm -f power_manual power_cblas power_eigen manual.dat cblas.dat eigen.dat \
		speedup.dat *.png
