Author: Michael Banck <mbanck@debian.org>
Reviewed-By: Daniel Leidert <dleidert@debian.org>
Description: Set the compiler, compiler flags and linker flags. Get the flags
 from dpkg-buildpackage to support DEB_BUILD_OPTIONS and hardening as well.
 .
 Fix clean targets.
 .
 Enable MPI support.
 .
 Enable libxc support.

Index: elkcode/make.inc
===================================================================
--- /dev/null
+++ elkcode/make.inc.in
@@ -0,0 +1,23 @@
+F90 = mpif90
+F90_OPTS :=
+F90_OPTS += `dpkg-buildflags --get FFLAGS`
+F90_OPTS += `dpkg-buildflags --get CPPFLAGS`
+F90_OPTS += -Wall -ffast-math -funroll-loops -fopenmp -fallow-argument-mismatch
+F90_OPTS += `dpkg-buildflags --get LDFLAGS`
+F77 = mpif77
+F77_OPTS :=
+F77_OPTS += `dpkg-buildflags --get FFLAGS`
+F77_OPTS += `dpkg-buildflags --get CPPFLAGS`
+F77_OPTS += -Wall -ffast-math -funroll-loops -fopenmp -fallow-argument-mismatch
+F77_OPTS += `dpkg-buildflags --get LDFLAGS`
+AR = ar
+LIB_SYS =
+LIB_LPK = -llapack -lblas
+SRC_MPI =
+SRC_FFT = zfftifc_fftw.f90
+LIB_FFT = `pkg-config --cflags --libs fftw3`
+SRC_libxc = libxc_funcs.f90 libxc.f90 libxcifc.f90
+LIB_libxc  = `pkg-config --cflags --libs libxc` -lxcf90
+SRC_MKL = mkl_stub.f90
+SRC_OBLAS = oblas_stub.f90
+SRC_BLIS = blis_stub.f90
Index: elkcode/src/Makefile
===================================================================
--- elkcode.orig/src/Makefile
+++ elkcode/src/Makefile
@@ -209,7 +209,7 @@ lapack:
 fft:
 	cd fftlib; $(MAKE); cp fftlib.a ..
 
-all:	blas lapack fft elk
+all:	elk
 
 clean:
 	rm -f *.o *.mod *~ ifc* *.gcno gmon.out *.aux *.dvi *.log \
