# (-*-makefile-*-)
#
# This makefile is included from 'makefile'.  It defines the
# various machine dependent things such as compiler commands,
# directories, libraries, etc.
#

# ipd: i want to call these basis (kenel) llibraries which should be
#      pluggable for PW/WL, of course first WL need to evolve a bit
#
# FFTW directories
#
#FFTW_DIR = /home/ivan/LIB/FFTW/fftw-2.1.3/fftw
FFTW_LIB_OPTS =  -lfftw 
#FFTW_INCL_OPTS = -I${FFTW_DIR}
#BASIS_INCL_OPTS = ${FFTW_INCL_OPTS}


#IPD: we should exclude these from the wavelet compilation
# we could also wrap the wl kernels in a separate library
# which should be swithcable w/ the fft

#
# The matrix diagonalization libraries, object, and and compile options
# (LAPACK, ESSL, or the in-house supplied Jacobi diagonalizer).
# 
# MATDIAG_OBJ must be either matdiagC.o or jacobi.o
# depending on which library you are going to use.
#
# MATDIAG_OPTS tells the system which library you will be using.
# Set it to one of -DDFT_USE_LAPACK or -DDFT_USE_JACOBI
# jacobi.o is self contained diag library, which may be somewhat slower
# If you are going to use LAPACK include the interface files 
# matdiagC.o

#
# MATDIAG_LIB_DIR is the directory where the lapack library lives
#                 (needed if the complier can't find it automatically)
#                 If using jacobi.o, set it to ".".
#
#
# MATDIAG_OBJ = jacobi.o
# MATDIAG_OPTS = -DDFT_USE_JACOBI
#MATDIAG_LIB_DIR = 
#MATDIAG_LIB = 

MATDIAG_OBJ =  matdiagC.o
MATDIAG_OPTS = -DDFT_USE_LAPACK
#MATDIAG_LIB_DIR = -L/usr/lib/3dnow -L/usr/lib/3dnow/atlas 
MATDIAG_LIB_DIR = #-L/usr/lib/ 
MATDIAG_LIB_OPTS =  -llapack  -lf77blas -latlas

#
# Parallelization options: machine dependent ones go here, **PLUS**
#
#    put -DDFT_THREAD to use POSIX threads (SMP)
#    put -DDFT_MPI to use MPI (DMP)
# (you can specify both if needed)
#
# --- MPI AND THREADS ---
# PARALLEL_OPTS =  -DDFT_MPI -DDFT_THREAD 
# PARALLEL_LIBS = -lmpich -lpthread
# PARALLEL_LIBDIR = -L/usr/lib/mpich/lib
# PARALLEL_INCDIR = -I/usr/lib/mpich/include


# PARALLEL_OPTS = -DDFT_THREAD 
# PARALLEL_LIBS = -lpthread

# PARALLEL_OPTS =  -DDFT_MPI
# PARALLEL_LIBS = -lmpich 
# PARALLEL_LIBDIR = -L/usr/lib/mpich/lib
# PARALLEL_INCDIR = -I/usr/lib/mpich/include


# Our libraries:  FFTW, math library, and possible LAPACK/BLAS libraries
#
LIBS = ${FFTW_LIB_OPTS} ${PARALLEL_LIBS} ${MATDIAG_LIB_DIR} $(MATDIAG_LIB_OPTS) -lg2c
#       -lf77lapack -lf77blas -lfftw -lm -lf2c

#
# Optimization options for all compilers
#
# use -ggdb for debugging
OPTIM_OPTS = -O3 -march=athlon-mp -fomit-frame-pointer

#
# Compiler flags for all compilers
#
COMPILE_OPTS = -ansi  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Icommands ${PARALLEL_INCDIR} ${BASIS_INCL_OPTS} \
	${OPTIM_OPTS} ${PARALLEL_OPTS} ${MATDIAG_OPTS}# -DDFT_PROFILING

#
# C++ compiler and options
#
CPLUSPLUS = g++-3.2
CPLUSPLUSOPTS = ${COMPILE_OPTS} 

#
# Linker to use
#
# Note:  on some linux platforms, using ${F77} as the linker works
# better (then you exclude any -lf2c libraries).
#
LINKER = ${CPLUSPLUS}

#
# Linking options: static/dynamic flags, etc., if any
#
LINKOPTS = -s ${CPLUSPLUSOPTS} ${PARALLEL_LIBDIR} #-lefence


syntax highlighted by Code2HTML, v. 0.9.1