CPP = cxx

#COMP_FLAGS = -D__USE_STD_IOSTREAM -tune host -arch host -fast -O4 -Wall
COMP_FLAGS = -D__USE_STD_IOSTREAM -omp -tune host -arch host -fast -O4 -Wall
LINK_FLAGS = -D__USE_STD_IOSTREAM -omp -Wall

#MACROS = -DCPPL_VERBOSE -DCPPL_DEBUG

CPPLAPACK_INCLUDE_DIR = $(HOME)/local/lib/cpplapack/include

INCLUDE_DIRS = -I$(CPPLAPACK_INCLUDE_DIR)
LIB_DIRS =

LIBS = -lcxml -lcpml
OBJECTS = main.o

###############################################################################

A.OUT: $(OBJECTS)
	$(CPP) $(OBJECTS) $(LINK_FLAGS) $(LIB_DIRS) $(LIBS) -o $@

.SUFFIXES: .cpp .o

.cpp.o:
	$(CPP) -c $< $(COMP_FLAGS) $(INCLUDE_DIRS) $(MACROS)

do: A.OUT
	./A.OUT > std 2> err

clean:
	rm -f *~ $(OBJECTS)

fullclean:
	rm -f *~ $(OBJECTS) A.OUT std err 

remake: clean A.OUT
