2015-12-27 03:45:20 +08:00
|
|
|
# Copyright (C) 2001-2016 Quantum ESPRESSO group
|
2016-10-08 21:29:31 +08:00
|
|
|
#
|
2015-12-27 03:45:20 +08:00
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License. See the file `License' in the root directory
|
|
|
|
# of the present distribution.
|
|
|
|
|
2016-06-25 15:26:50 +08:00
|
|
|
include make.inc
|
2009-07-22 23:17:21 +08:00
|
|
|
|
2003-12-02 23:47:00 +08:00
|
|
|
default :
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo 'to install Quantum ESPRESSO, type at the shell prompt:'
|
|
|
|
@echo ' ./configure [--prefix=]'
|
|
|
|
@echo ' make [-j] target'
|
|
|
|
@echo ' '
|
|
|
|
@echo 'where target identifies one or multiple CORE PACKAGES:'
|
2003-11-20 01:10:26 +08:00
|
|
|
@echo ' pw basic code for scf, structure optimization, MD'
|
2016-01-08 18:51:21 +08:00
|
|
|
@echo ' ph phonon code, Gamma-only and third-order derivatives'
|
2012-07-01 16:58:47 +08:00
|
|
|
@echo ' pwcond ballistic conductance'
|
2010-10-23 00:36:36 +08:00
|
|
|
@echo ' neb code for Nudged Elastic Band method'
|
2003-11-20 01:10:26 +08:00
|
|
|
@echo ' pp postprocessing programs'
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' pwall same as "make pw ph pp pwcond neb"'
|
2012-07-01 16:58:47 +08:00
|
|
|
@echo ' cp CP code: CP MD with ultrasoft pseudopotentials'
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' tddfpt time dependent dft code'
|
|
|
|
@echo ' gwl GW with Lanczos chains'
|
2004-05-14 20:55:23 +08:00
|
|
|
@echo ' ld1 utilities for pseudopotential generation'
|
2003-11-20 01:10:26 +08:00
|
|
|
@echo ' upf utilities for pseudopotential conversion'
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' xspectra X-ray core-hole spectroscopy calculations'
|
|
|
|
@echo ' couple Library interface for coupling to external codes'
|
2016-10-02 01:20:29 +08:00
|
|
|
@echo ' epw Electron-Phonon Coupling with wannier functions'
|
2016-09-27 17:12:16 +08:00
|
|
|
@echo ' gui Graphical User Interface'
|
2016-10-02 17:32:22 +08:00
|
|
|
@echo ' examples fetch from web examples for all core packages'
|
|
|
|
@echo ' test-suite run semi-automated test-suite for regression testing'
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' all same as "make pwall cp ld1 upf tddfpt"'
|
|
|
|
@echo ' '
|
|
|
|
@echo 'where target identifies one or multiple THIRD-PARTIES PACKAGES:'
|
2012-07-01 16:58:47 +08:00
|
|
|
@echo ' gipaw NMR and EPR spectra'
|
|
|
|
@echo ' w90 Maximally localised Wannier Functions'
|
|
|
|
@echo ' want Quantum Transport with Wannier functions'
|
2015-09-24 02:19:46 +08:00
|
|
|
@echo ' west Many-body perturbation corrections Without Empty STates'
|
2016-01-09 00:15:18 +08:00
|
|
|
# @echo ' SaX Standard GW-BSE with plane waves'
|
2012-07-01 16:58:47 +08:00
|
|
|
@echo ' yambo electronic excitations with plane waves'
|
2015-06-05 21:24:27 +08:00
|
|
|
@echo ' yambo-devel yambo devel version'
|
2017-07-13 21:36:19 +08:00
|
|
|
@echo ' SternheimerGW calculate GW using Sternheimer equations'
|
2012-07-01 16:58:47 +08:00
|
|
|
@echo ' plumed Metadynamics plugin for pw or cp'
|
2016-09-19 21:03:44 +08:00
|
|
|
@echo ' d3q general third-order code and thermal transport codes'
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' '
|
|
|
|
@echo 'where target is one of the following suite operation:'
|
2009-07-22 21:32:23 +08:00
|
|
|
@echo ' doc build documentation'
|
2010-04-07 23:40:03 +08:00
|
|
|
@echo ' links create links to all executables in bin/'
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' tar create a tarball of the source tree'
|
2016-08-03 00:29:58 +08:00
|
|
|
@if test -d GUI/; then \
|
|
|
|
echo ' tar-gui create a standalone PWgui tarball from the GUI sources'; \
|
|
|
|
echo ' tar-qe-modes create a tarball for QE-modes (Emacs major modes for Quantum ESPRESSO)'; fi
|
2016-01-05 23:18:42 +08:00
|
|
|
@echo ' clean remove executables and objects'
|
2016-01-08 18:51:21 +08:00
|
|
|
@echo ' veryclean remove files produced by "configure" as well'
|
|
|
|
@echo ' distclean revert distribution to the original status'
|
2003-01-20 05:58:50 +08:00
|
|
|
|
2010-04-07 23:40:03 +08:00
|
|
|
###########################################################
|
|
|
|
# Main targets
|
|
|
|
###########################################################
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2013-11-08 05:06:06 +08:00
|
|
|
# The syntax "( cd PW ; $(MAKE) TLDEPS= all || exit 1)" below
|
2013-11-06 22:11:52 +08:00
|
|
|
# guarantees that error code 1 is returned in case of error and make stops
|
|
|
|
# If "|| exit 1" is not present, the error code from make in subdirectories
|
|
|
|
# is not returned and make goes on even if compilation has failed
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2017-10-13 21:40:04 +08:00
|
|
|
pw : bindir libfft libdavid libcg libla libutil mods liblapack libs libiotk dftd3
|
2005-01-14 19:32:21 +08:00
|
|
|
if test -d PW ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd PW ; $(MAKE) TLDEPS= all || exit 1) ; fi
|
2004-09-02 01:56:56 +08:00
|
|
|
|
KS_Solvers directory has been created with three subdirectories:
KS_Solvers/CG, KS_Solvers/Davidson, KS_Solvers/Davidson_RCI.
Two are currently used by QE, the third one implements the Davidson
diagonalization within the Reverse Communication Interface paradigm,
courtesy of Micael Oliveira.
KS_Solvers routines depend only on lower level libraries, notably UtilXlib,
LAXlib, (SCA)LAPACK, and BLAS.
reorganization can be improved. For instance some duplicated routines like
cdiaghg and rdiaghg could/should be moved in LAXlib. This could reduce the need
to include KS_Solvers directories in the link step of many codes.
Minimal changes to calling sequence have been made, essentially just adding
h_psi,s_psi,g_psi and h_1psi,s_1psi routines names as arguments (with a
specific calling sequence ihardcode inside the routines that agree with PWSCF one).
This could be avoided adopting the RCI paradigm.
Compiled in serial and parallel, 177/182 pw tests passed (3 that were failing
even before on my laptop pw-berry, pw-langevin, pw-pawatom + 2 unknown==not tested),
12 /17 cp tests passed (some o2-us-para-pbe-X fail but the same was for the
original version)
I assume the modified calling procedure is working and the problem lies somewhere else.
Randomly tested some examples in pw, ph, pwcond and it seams to work.
Please report any problem.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13644 c92efa57-630b-4861-b058-cf58834340f0
2017-07-29 20:19:19 +08:00
|
|
|
pw-lib : bindir libdavid libcg libfft libla libutil mods liblapack libs libiotk
|
2014-08-04 23:54:35 +08:00
|
|
|
if test -d PW ; then \
|
|
|
|
( cd PW ; $(MAKE) TLDEPS= pw-lib || exit 1) ; fi
|
|
|
|
|
2017-10-19 13:55:59 +08:00
|
|
|
cp : bindir libdavid libcg libfft libla libutil mods liblapack libs libiotk libfox
|
2005-01-14 19:32:21 +08:00
|
|
|
if test -d CPV ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd CPV ; $(MAKE) TLDEPS= all || exit 1) ; fi
|
2003-01-20 05:58:50 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
ph : bindir libfft libla libutil mods libs pw lrmods
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d PHonon; then \
|
|
|
|
(cd PHonon; $(MAKE) all || exit 1) ; fi
|
2004-09-02 01:56:56 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
neb : bindir libfft libla libutil mods libs pw
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d NEB; then \
|
|
|
|
(cd NEB; $(MAKE) all || exit 1) ; fi
|
2010-08-30 20:06:17 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
tddfpt : bindir libfft libla libutil mods libs pw
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d TDDFPT; then \
|
|
|
|
(cd TDDFPT; $(MAKE) all || exit 1) ; fi
|
2009-09-18 18:50:10 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
pp : bindir libfft libla libutil mods libs pw
|
2005-01-14 19:32:21 +08:00
|
|
|
if test -d PP ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd PP ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2004-09-03 01:07:31 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
pwcond : bindir libfft libla libutil mods libs pw pp
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d PWCOND ; then \
|
|
|
|
( cd PWCOND ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2004-09-02 01:56:56 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
acfdt : bindir libfft libla libutil mods libs pw ph
|
2010-08-19 21:40:32 +08:00
|
|
|
if test -d ACFDT ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd ACFDT ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2010-08-19 21:40:32 +08:00
|
|
|
|
2015-12-27 03:45:20 +08:00
|
|
|
# target still present for backward compatibility
|
|
|
|
gww:
|
|
|
|
@echo '"make gww" is obsolete, use "make gwl" instead '
|
|
|
|
|
2013-07-16 15:10:03 +08:00
|
|
|
gwl : ph
|
|
|
|
if test -d GWW ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd GWW ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2013-07-16 15:10:03 +08:00
|
|
|
|
|
|
|
gipaw : pw
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2007-04-28 22:28:54 +08:00
|
|
|
|
2016-09-19 21:03:44 +08:00
|
|
|
d3q : pw ph
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
ld1 : bindir liblapack libfft libla libutil mods libs
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d atomic ; then \
|
|
|
|
( cd atomic ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2004-09-02 01:56:56 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
upf : libfft libla libutil mods libs liblapack
|
2005-01-14 19:32:21 +08:00
|
|
|
if test -d upftools ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd upftools ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2003-09-24 17:59:22 +08:00
|
|
|
|
2015-11-21 18:37:48 +08:00
|
|
|
pw_export : libiotk bindir libfft mods libs pw
|
2005-01-14 19:32:21 +08:00
|
|
|
if test -d PP ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd PP ; $(MAKE) TLDEPS= pw_export.x || exit 1 ) ; fi
|
2004-10-16 01:25:56 +08:00
|
|
|
|
2015-11-21 18:37:48 +08:00
|
|
|
xspectra : bindir libfft mods libs pw
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d XSpectra ; then \
|
|
|
|
( cd XSpectra ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2008-06-20 00:15:17 +08:00
|
|
|
|
2013-09-27 22:37:51 +08:00
|
|
|
couple : pw cp
|
|
|
|
if test -d COUPLE ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd COUPLE ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
|
2013-09-27 22:37:51 +08:00
|
|
|
|
2016-10-08 21:29:31 +08:00
|
|
|
# EPW needs to invoke make twice due to a Wannier90 workaround
|
2016-10-02 01:20:29 +08:00
|
|
|
epw: pw ph ld1
|
|
|
|
if test -d EPW ; then \
|
2017-01-08 00:42:26 +08:00
|
|
|
( cd EPW ; $(MAKE) all || exit 1; \
|
2016-10-08 21:29:31 +08:00
|
|
|
cd ../bin; ln -fs ../EPW/bin/epw.x . ); fi
|
2016-10-02 01:20:29 +08:00
|
|
|
|
2017-01-11 18:27:43 +08:00
|
|
|
travis : pwall epw
|
|
|
|
if test -d test-suite ; then \
|
|
|
|
( cd test-suite ; make run-travis || exit 1 ) ; fi
|
|
|
|
|
2016-10-02 18:01:15 +08:00
|
|
|
gui :
|
|
|
|
@echo 'Check "GUI/README" how to access the Graphical User Interface'
|
2016-10-02 22:19:08 +08:00
|
|
|
#@echo 'Check "PWgui-X.Y/README" how to access the Graphical User Interface'
|
2012-05-11 21:36:34 +08:00
|
|
|
|
2016-10-08 21:29:31 +08:00
|
|
|
examples : touch-dummy
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2016-10-02 17:32:22 +08:00
|
|
|
|
2012-05-10 22:56:08 +08:00
|
|
|
pwall : pw neb ph pp pwcond acfdt
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2017-05-25 22:36:54 +08:00
|
|
|
all : pwall cp ld1 upf tddfpt xspectra gwl
|
2003-01-20 05:58:50 +08:00
|
|
|
|
2010-04-07 23:40:03 +08:00
|
|
|
###########################################################
|
|
|
|
# Auxiliary targets used by main targets:
|
|
|
|
# compile modules, libraries, directory for binaries, etc
|
|
|
|
###########################################################
|
2015-12-27 03:45:20 +08:00
|
|
|
|
KS_Solvers directory has been created with three subdirectories:
KS_Solvers/CG, KS_Solvers/Davidson, KS_Solvers/Davidson_RCI.
Two are currently used by QE, the third one implements the Davidson
diagonalization within the Reverse Communication Interface paradigm,
courtesy of Micael Oliveira.
KS_Solvers routines depend only on lower level libraries, notably UtilXlib,
LAXlib, (SCA)LAPACK, and BLAS.
reorganization can be improved. For instance some duplicated routines like
cdiaghg and rdiaghg could/should be moved in LAXlib. This could reduce the need
to include KS_Solvers directories in the link step of many codes.
Minimal changes to calling sequence have been made, essentially just adding
h_psi,s_psi,g_psi and h_1psi,s_1psi routines names as arguments (with a
specific calling sequence ihardcode inside the routines that agree with PWSCF one).
This could be avoided adopting the RCI paradigm.
Compiled in serial and parallel, 177/182 pw tests passed (3 that were failing
even before on my laptop pw-berry, pw-langevin, pw-pawatom + 2 unknown==not tested),
12 /17 cp tests passed (some o2-us-para-pbe-X fail but the same was for the
original version)
I assume the modified calling procedure is working and the problem lies somewhere else.
Randomly tested some examples in pw, ph, pwcond and it seams to work.
Please report any problem.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13644 c92efa57-630b-4861-b058-cf58834340f0
2017-07-29 20:19:19 +08:00
|
|
|
libdavid_rci : touch-dummy libla clib libutil
|
|
|
|
( cd KS_Solvers/Davidson_RCI ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
|
|
|
libdavid : touch-dummy libla clib libutil
|
|
|
|
( cd KS_Solvers/Davidson ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
|
|
|
libcg : touch-dummy libla clib libutil
|
|
|
|
( cd KS_Solvers/CG ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2017-07-28 22:21:28 +08:00
|
|
|
libla : touch-dummy liblapack libutil
|
2016-01-24 04:09:07 +08:00
|
|
|
( cd LAXlib ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2015-11-21 18:37:48 +08:00
|
|
|
libfft : touch-dummy
|
|
|
|
( cd FFTXlib ; $(MAKE) TLDEPS= all || exit 1 )
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
libutil : touch-dummy
|
|
|
|
( cd UtilXlib ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2017-07-29 04:01:07 +08:00
|
|
|
mods : libiotk libfox libla libfft libutil
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd Modules ; $(MAKE) TLDEPS= all || exit 1 )
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2010-11-18 23:49:00 +08:00
|
|
|
libs : mods
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd clib ; $(MAKE) TLDEPS= all || exit 1 )
|
2008-06-11 18:47:40 +08:00
|
|
|
|
2017-07-26 19:15:20 +08:00
|
|
|
lrmods : libs libla libfft libutil
|
2016-10-02 01:20:29 +08:00
|
|
|
( cd LR_Modules ; $(MAKE) TLDEPS= all || exit 1 )
|
2016-01-19 03:32:00 +08:00
|
|
|
|
2017-10-13 21:40:04 +08:00
|
|
|
dftd3 : mods
|
|
|
|
( cd dft-d3 ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2010-04-07 23:40:03 +08:00
|
|
|
bindir :
|
|
|
|
test -d bin || mkdir bin
|
2008-06-11 18:47:40 +08:00
|
|
|
|
2009-10-15 21:23:06 +08:00
|
|
|
#############################################################
|
2010-04-07 23:40:03 +08:00
|
|
|
# Targets for external libraries
|
2009-10-15 21:23:06 +08:00
|
|
|
############################################################
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2012-01-03 19:33:44 +08:00
|
|
|
libblas : touch-dummy
|
2013-11-08 05:06:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2009-10-15 21:23:06 +08:00
|
|
|
|
2012-01-03 19:33:44 +08:00
|
|
|
liblapack: touch-dummy
|
2013-11-08 05:06:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2012-01-03 19:33:44 +08:00
|
|
|
|
|
|
|
libiotk: touch-dummy
|
2013-11-08 05:06:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2017-07-29 04:01:07 +08:00
|
|
|
libfox: touch-dummy
|
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2009-10-15 21:23:06 +08:00
|
|
|
|
2010-12-22 01:36:32 +08:00
|
|
|
# In case of trouble with iotk and compilers, add
|
|
|
|
# FFLAGS="$(FFLAGS_NOOPT)" after $(MFLAGS)
|
2009-10-30 19:52:24 +08:00
|
|
|
|
2009-09-14 00:48:24 +08:00
|
|
|
#########################################################
|
|
|
|
# plugins
|
|
|
|
#########################################################
|
|
|
|
|
2016-09-09 22:27:10 +08:00
|
|
|
w90: bindir liblapack
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2009-09-14 00:48:24 +08:00
|
|
|
|
2010-11-23 19:53:08 +08:00
|
|
|
want : touch-dummy
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-03-20 00:16:38 +08:00
|
|
|
|
2016-01-08 21:38:50 +08:00
|
|
|
SaX : touch-dummy
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2010-11-23 19:53:08 +08:00
|
|
|
yambo: touch-dummy
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2016-01-08 21:38:50 +08:00
|
|
|
|
2015-06-05 21:24:27 +08:00
|
|
|
yambo-devel: touch-dummy
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-11-23 19:53:08 +08:00
|
|
|
|
2010-12-02 21:47:55 +08:00
|
|
|
plumed: touch-dummy
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-12-02 21:47:55 +08:00
|
|
|
|
2015-06-20 22:54:27 +08:00
|
|
|
west: pw touch-dummy
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2017-07-13 21:36:19 +08:00
|
|
|
SternheimerGW: pw lrmods touch-dummy
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2010-11-23 19:53:08 +08:00
|
|
|
touch-dummy :
|
|
|
|
$(dummy-variable)
|
2010-04-01 16:28:04 +08:00
|
|
|
|
2009-09-14 00:48:24 +08:00
|
|
|
#########################################################
|
2012-05-03 22:36:29 +08:00
|
|
|
# "make links" produces links to all executables in bin/
|
2010-04-07 23:40:03 +08:00
|
|
|
#########################################################
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2014-11-07 21:24:01 +08:00
|
|
|
# Contains workaround for name conflicts (dos.x and bands.x) with WANT
|
2010-04-07 23:40:03 +08:00
|
|
|
links : bindir
|
|
|
|
( cd bin/ ; \
|
2010-06-25 19:27:01 +08:00
|
|
|
rm -f *.x ; \
|
2012-05-03 22:36:29 +08:00
|
|
|
for exe in ../*/*/*.x ../*/bin/* ; do \
|
2010-06-25 19:27:01 +08:00
|
|
|
if test ! -L $$exe ; then ln -fs $$exe . ; fi \
|
2014-11-07 21:24:01 +08:00
|
|
|
done ; \
|
2016-01-08 18:51:21 +08:00
|
|
|
[ -f ../WANT/wannier/dos.x ] && \
|
|
|
|
ln -fs ../WANT/wannier/dos.x ../bin/dos_want.x ; \
|
|
|
|
[ -f ../PP/src/dos.x ] && \
|
|
|
|
ln -fs ../PP/src/dos.x ../bin/dos.x ; \
|
|
|
|
[ -f ../WANT/wannier/bands.x ] && \
|
|
|
|
ln -fs ../WANT/wannier/bands.x ../bin/bands_want.x ; \
|
2014-11-07 21:24:01 +08:00
|
|
|
[ -f ../PP/src/dos.x ] && ln -fs ../PP/src/bands.x ../bin/bands.x ; \
|
2016-01-08 18:51:21 +08:00
|
|
|
[ -f ../W90/wannier90.x ] && ln -fs ../W90/wannier90.x ../bin/wannier90.x ;\
|
2010-04-07 23:40:03 +08:00
|
|
|
)
|
|
|
|
|
2014-10-31 00:14:03 +08:00
|
|
|
#########################################################
|
|
|
|
# 'make install' works based on --with-prefix
|
|
|
|
# - If the final directory does not exists it creates it
|
|
|
|
#########################################################
|
|
|
|
|
|
|
|
install : touch-dummy
|
2016-08-16 20:35:38 +08:00
|
|
|
@if test -d bin ; then mkdir -p $(PREFIX)/bin ; \
|
2016-11-14 22:20:19 +08:00
|
|
|
for x in `find * ! -path "test-suite/*" -name *.x -type f` ; do \
|
2016-08-16 20:35:38 +08:00
|
|
|
cp $$x $(PREFIX)/bin/ ; done ; \
|
2014-10-31 00:14:03 +08:00
|
|
|
fi
|
2016-08-16 20:35:38 +08:00
|
|
|
@echo 'Quantum ESPRESSO binaries installed in $(PREFIX)/bin'
|
2014-10-31 00:14:03 +08:00
|
|
|
|
2015-12-27 03:45:20 +08:00
|
|
|
#########################################################
|
|
|
|
# Run test-suite for numerical regression testing
|
2016-10-08 21:29:31 +08:00
|
|
|
# NB: it is assumed that reference outputs have been
|
2015-12-27 03:45:20 +08:00
|
|
|
# already computed once (usualy during release)
|
|
|
|
#########################################################
|
|
|
|
|
|
|
|
test-suite: pw cp touch-dummy
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-04-07 23:40:03 +08:00
|
|
|
|
|
|
|
#########################################################
|
|
|
|
# Other targets: clean up
|
|
|
|
#########################################################
|
2009-09-14 00:48:24 +08:00
|
|
|
|
2003-11-20 01:10:26 +08:00
|
|
|
# remove object files and executables
|
2016-10-08 21:29:31 +08:00
|
|
|
clean :
|
|
|
|
touch make.inc
|
2004-09-14 20:55:07 +08:00
|
|
|
for dir in \
|
2017-07-26 19:15:20 +08:00
|
|
|
CPV LAXlib FFTXlib UtilXlib Modules PP PW EPW \
|
|
|
|
KS_Solvers/CG KS_Solvers/Davidson KS_Solvers/Davidson_RCI \
|
2017-11-11 16:59:58 +08:00
|
|
|
NEB ACFDT COUPLE GWW XSpectra PWCOND dft_d3 \
|
2016-02-29 00:45:02 +08:00
|
|
|
atomic clib LR_Modules pwtools upftools \
|
2016-10-02 21:11:16 +08:00
|
|
|
dev-tools extlibs Environ TDDFPT PHonon GWW \
|
2004-09-14 20:55:07 +08:00
|
|
|
; do \
|
2004-03-16 22:47:58 +08:00
|
|
|
if test -d $$dir ; then \
|
2006-09-22 01:49:53 +08:00
|
|
|
( cd $$dir ; \
|
2013-11-08 05:06:06 +08:00
|
|
|
$(MAKE) TLDEPS= clean ) \
|
2004-03-16 22:47:58 +08:00
|
|
|
fi \
|
2003-11-20 01:10:26 +08:00
|
|
|
done
|
2013-11-08 05:06:06 +08:00
|
|
|
- @(cd install ; $(MAKE) -f plugins_makefile clean)
|
|
|
|
- @(cd install ; $(MAKE) -f extlibs_makefile clean)
|
2017-07-25 21:40:25 +08:00
|
|
|
- /bin/rm -rf bin/*.x tempdir
|
2003-11-20 01:10:26 +08:00
|
|
|
|
2016-01-08 18:51:21 +08:00
|
|
|
# remove files produced by "configure" as well
|
|
|
|
veryclean : clean
|
2013-11-08 05:06:06 +08:00
|
|
|
- @(cd install ; $(MAKE) -f plugins_makefile veryclean)
|
|
|
|
- @(cd install ; $(MAKE) -f extlibs_makefile veryclean)
|
2010-12-02 21:47:55 +08:00
|
|
|
- rm -rf install/patch-plumed
|
2012-06-16 15:47:18 +08:00
|
|
|
- cd install ; rm -f config.log configure.msg config.status \
|
2016-08-03 00:29:58 +08:00
|
|
|
CPV/version.h ChangeLog* intel.pcl */intel.pcl
|
2016-09-11 23:41:38 +08:00
|
|
|
- rm -rf include/configure.h install/make_wannier90.inc
|
2012-06-16 15:47:18 +08:00
|
|
|
- cd install ; rm -fr autom4te.cache
|
2012-08-24 15:42:20 +08:00
|
|
|
- cd pseudo; ./clean_ps ; cd -
|
2012-08-20 22:16:00 +08:00
|
|
|
- cd install; ./clean.sh ; cd -
|
|
|
|
- cd include; ./clean.sh ; cd -
|
2017-07-31 04:54:07 +08:00
|
|
|
- rm -f espresso.tar.gz -
|
|
|
|
- rm -rf make.inc -
|
|
|
|
- rm -rf FoX
|
2016-10-05 01:37:33 +08:00
|
|
|
# remove everything not in the original distribution
|
2016-01-08 18:51:21 +08:00
|
|
|
distclean : veryclean
|
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2003-12-02 23:47:00 +08:00
|
|
|
tar :
|
2008-05-23 01:13:35 +08:00
|
|
|
@if test -f espresso.tar.gz ; then /bin/rm espresso.tar.gz ; fi
|
2016-10-08 21:29:31 +08:00
|
|
|
# do not include unneeded stuff
|
2016-04-27 22:53:38 +08:00
|
|
|
find ./ -type f | grep -v -e /.svn/ -e'/\.' -e'\.o$$' -e'\.mod$$'\
|
2016-08-03 00:29:58 +08:00
|
|
|
-e /.git/ -e'\.a$$' -e'\.d$$' -e'\.i$$' -e'_tmp\.f90$$' -e'\.x$$' \
|
|
|
|
-e'~$$' -e'\./GUI' -e '\./tempdir' | xargs tar rvf espresso.tar
|
2004-12-22 00:55:34 +08:00
|
|
|
gzip espresso.tar
|
2003-11-13 19:40:18 +08:00
|
|
|
|
2010-04-07 23:40:03 +08:00
|
|
|
#########################################################
|
|
|
|
# Tools for the developers
|
|
|
|
#########################################################
|
2004-02-20 04:10:15 +08:00
|
|
|
tar-gui :
|
2004-02-20 23:21:16 +08:00
|
|
|
@if test -d GUI/PWgui ; then \
|
2004-03-16 22:47:58 +08:00
|
|
|
cd GUI/PWgui ; \
|
2013-11-08 05:06:06 +08:00
|
|
|
$(MAKE) TLDEPS= clean svninit pwgui-source; \
|
2004-03-16 22:47:58 +08:00
|
|
|
mv PWgui-*.tgz ../.. ; \
|
2004-02-20 04:10:15 +08:00
|
|
|
else \
|
2004-03-16 22:47:58 +08:00
|
|
|
echo ; \
|
2011-06-30 23:29:11 +08:00
|
|
|
echo " Sorry, tar-gui works only for svn sources !!!" ; \
|
2004-03-16 22:47:58 +08:00
|
|
|
echo ; \
|
2004-02-20 04:10:15 +08:00
|
|
|
fi
|
2004-09-06 23:52:02 +08:00
|
|
|
|
2016-08-03 00:29:58 +08:00
|
|
|
tar-qe-modes :
|
|
|
|
@if test -d GUI/QE-modes ; then \
|
|
|
|
cd GUI/QE-modes ; \
|
|
|
|
$(MAKE) TLDEPS= veryclean tar; \
|
|
|
|
mv QE-modes-*.tar.gz ../.. ; \
|
|
|
|
else \
|
|
|
|
echo ; \
|
|
|
|
echo " Sorry, tar-qe-modes works only for svn sources !!!" ; \
|
|
|
|
echo ; \
|
|
|
|
fi
|
|
|
|
|
2009-07-22 21:32:23 +08:00
|
|
|
# NOTICE about "make doc": in order to build the .html and .txt
|
|
|
|
# documentation in Doc, "tcl", "tcllib", "xsltproc" are needed;
|
|
|
|
# in order to build the .pdf files in Doc, "pdflatex" is needed;
|
|
|
|
# in order to build html files for user guide and developer manual,
|
|
|
|
# "latex2html" and "convert" (from Image-Magick) are needed.
|
2012-05-04 19:06:16 +08:00
|
|
|
doc : touch-dummy
|
2009-07-17 16:39:11 +08:00
|
|
|
if test -d Doc ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd Doc ; $(MAKE) TLDEPS= all ) ; fi
|
|
|
|
for dir in */Doc; do \
|
|
|
|
( if test -f $$dir/Makefile ; then \
|
|
|
|
( cd $$dir; $(MAKE) TLDEPS= all ) ; fi ) ; done
|
|
|
|
|
|
|
|
doc_clean :
|
|
|
|
if test -d Doc ; then \
|
|
|
|
( cd Doc ; $(MAKE) TLDEPS= clean ) ; fi
|
2012-01-20 20:32:31 +08:00
|
|
|
for dir in */Doc; do \
|
2013-07-16 15:10:03 +08:00
|
|
|
( if test -f $$dir/Makefile ; then \
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd $$dir; $(MAKE) TLDEPS= clean ) ; fi ) ; done
|
2009-07-17 16:39:11 +08:00
|
|
|
|
2016-08-29 20:42:14 +08:00
|
|
|
depend: libiotk version
|
2006-09-22 01:49:53 +08:00
|
|
|
@echo 'Checking dependencies...'
|
2010-07-06 00:39:50 +08:00
|
|
|
- ( if test -x install/makedeps.sh ; then install/makedeps.sh ; fi)
|
2016-08-29 20:42:14 +08:00
|
|
|
# update file containing version number before looking for dependencies
|
2016-10-02 18:01:15 +08:00
|
|
|
|
2016-08-29 20:42:14 +08:00
|
|
|
version:
|
|
|
|
- ( cd Modules; make version )
|