# (-*-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 lapackdiagF77.o, essldiagF77.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, -DDFT_USE_ESSL, or -DDFT_USE_JACOBI
# jacobi.o is self contained diag library, which may be somewhat slower
# If you are going to use LAPACK/ESSL include the interface files
# matdiagC.o lapackdiagF77.o/essldiagF77.o
# IPD: would be nice to call fortran directly, or at least avoid
# matdiagC level
#
# 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 lapackdiagF77.o
MATDIAG_OPTS = -DDFT_USE_LAPACK
MATDIAG_LIB_DIR = -L/usr/lib/sse/atlas -L/usr/lib/sse/
#MATDIAG_LIB_DIR = -L/usr/lib/
MATDIAG_LIB_OPTS = -llapack -lf77blas -lcblas -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) -lm -lg2c
# -lf77lapack -lf77blas -lfftw -lm -lf2c
#
# Optimization options for all compilers
#
# choose from the ones in man eg. pentium3, i686, athlon-xp, athlon-mp
# debug = -ggdb
OPTIM_OPTS = -O3 -march=pentium3 -fomit-frame-pointer
#
# Compiler flags for all compilers
#
#COMPILE_OPTS = -O5 -I. -Icommands ${PARALLEL_INCDIR} ${BASIS_INCL_OPTS} \
# ${OPTIM_OPTS} ${PARALLEL_OPTS} ${MATDIAG_OPTS} -DDFT_PROFILING
COMPILE_OPTS = -I. -Icommands ${PARALLEL_INCDIR} ${BASIS_INCL_OPTS} \
${OPTIM_OPTS} ${PARALLEL_OPTS} ${MATDIAG_OPTS} -Dnewgridtype -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 = ${CPLUSPLUSOPTS} ${PARALLEL_LIBDIR}
syntax highlighted by Code2HTML, v. 0.9.1