#
# makefile for UED3 analysis
#
CC = gcc
#
LAPACK = /opt/intel/mkl/10.1.2.024/lib/em64t
INCLUDES = -I$(LAPACK)/../../include/
#
CFLAGS = -O3 \
	-ffast-math -fomit-frame-pointer -funroll-loops \
	-march=core2 -mtune=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4\
#	-march=nocona -mtune=nocona -mmmx -mssse3 \
	-Wall
#
#LIBS = -lm
LIBS = -lm -L$(LAPACK) -lmkl_lapack -lmkl -lmkl_intel_thread -liomp5 -lpthread
#LIBS = -lm -L$(LAPACK) -lmkl_lapack -lmkl -lguide -lpthread

OBJS =  calculate.o evaluate.o empirical.o \
	readpredata.o readdata.o readzmatrix.o \
	errors.o outputs.o writezmatrix.o setzmatrix.o \
	mathematical.o gaussjordan.o jacobi.o profile.o \
	leastsquare.o radial.o \
	numericalfit.o fitjacobieigen.o fitmarquardt.o montecarlo.o \
	readinternal.o coordinates.o transform.o interface.o \
	setstructure.o fitinternal.o \
	ueda.o commandstext.o tools.o

ued:	$(OBJS)
	$(CC) $(OBJS) $(LIBS) -o ueda.x

clean:
	$(RM) $(OBJS)

cleared:
	$(RM) $(OBJS) ueda.x
