# Makefile for iterativeSystemSolve example

include ../common/common.mk

INCLUDES=-I${CULASPARSE_INC_PATH}
LIBPATH32=-L${CULASPARSE_LIB_PATH_32}
LIBPATH64=-L${CULASPARSE_LIB_PATH_64}

LIBS=-lcula_sparse -lcolamd -lcublas -lcudart -lcusparse -lpthread -liomp5

usage:
	@echo "To build this example, type one of:"
	@echo ""
	@echo "    make build32"
	@echo "    make build64"
	@echo ""
	@echo "where '32' and '64' represent the platform you wish to build for"
	@echo ""
	@echo "Note that this example requires Intel MKL 10.3 or greater to build"

build32:
	sh ../checkenvironment.sh
	g++ -m32 -o iterativeSystemSolve iterativeSystemSolve.cpp $(CFLAGS) $(INCLUDES) $(LIBPATH32) $(LIBS)

build64:
	sh ../checkenvironment.sh
	g++ -m64 -o iterativeSystemSolve iterativeSystemSolve.cpp $(CFLAGS) $(INCLUDES) $(LIBPATH64) $(LIBS)

clean:
	rm -f iterativeSystemSolve

