#Makefile for IterSolvers test code
#define variables
objects= UFMatrixParse.o AMG.o PCG.o RICH.o JGS.o SLAF.o  
CPP= g++              #compiler
opt= -O3              #optimization flags
prof= -g -pg          #profiling flags
warn= -pedantic       #warning flags
execname= UFMatrixParse
ARCH      := $(shell uname)  #ifeq ($(ARCH),Linux


#compile
$(execname): $(objects)
	$(CPP) $(opt) $(prof) $(warn) -o $(execname) $(objects)


AMG.o: AMG.cpp
	$(CPP) $(opt) $(prof) $(warn) -c AMG.cpp
PCG.o: PCG.cpp
	$(CPP) $(opt) $(prof) $(warn) -c PCG.cpp
#GMRES.o: GMRES.cpp
#	$(CPP) $(opt) $(prof) $(warn) -c GMRES.cpp
RICH.o: RICH.cpp
	$(CPP) $(opt) $(prof) $(warn) -c RICH.cpp
JGS.o: JGS.cpp
	$(CPP) $(opt) $(prof) $(warn) -c JGS.cpp
SLAF.o: SLAF.cpp
	$(CPP) $(opt) $(prof) $(warn) -c SLAF.cpp
UFMatrixParse.o: UFMatrixParse.cpp
	$(CPP) $(opt) $(prof) $(warn) -c UFMatrixParse.cpp


#remove object files
clean:
	rm $(objects)
#end of Makefile
