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
|
|
|
|
2018-07-17 17:56:20 +08:00
|
|
|
# execute a target irrespective of the presence of a file or directory
|
|
|
|
# with the same name
|
|
|
|
.PHONY: install
|
|
|
|
|
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'
|
2018-08-29 20:18:10 +08:00
|
|
|
@echo ' hp calculation of the Hubbard parameters from DFPT'
|
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"'
|
2018-06-14 03:30:27 +08:00
|
|
|
@echo ' cp CP code: Car-Parrinello molecular dynamics'
|
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'
|
2018-08-29 20:18:10 +08:00
|
|
|
@echo ' all same as "make pwall cp ld1 upf tddfpt hp"'
|
2016-01-05 23:18:42 +08:00
|
|
|
@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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
pw : pwlibs
|
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
|
|
|
|
2018-08-06 22:26:02 +08:00
|
|
|
cp : bindir libs mods
|
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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
ph : phlibs
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d PHonon; then \
|
2019-02-16 16:18:14 +08:00
|
|
|
( cd PHonon; $(MAKE) TLDEPS= all || exit 1) ; fi
|
2004-09-02 01:56:56 +08:00
|
|
|
|
2018-08-29 20:18:10 +08:00
|
|
|
hp : hplibs
|
|
|
|
if test -d HP; then \
|
2019-02-16 16:18:14 +08:00
|
|
|
( cd HP; $(MAKE) TLDEPS= all || exit 1) ; fi
|
2018-08-29 20:18:10 +08:00
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
neb : pwlibs
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d NEB; then \
|
2019-02-16 16:18:14 +08:00
|
|
|
( cd NEB; $(MAKE) TLDEPS= all || exit 1) ; fi
|
2010-08-30 20:06:17 +08:00
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
tddfpt : phlibs
|
2016-10-02 01:20:29 +08:00
|
|
|
if test -d TDDFPT; then \
|
2019-02-16 16:18:14 +08:00
|
|
|
( cd TDDFPT; $(MAKE) TLDEPS= all || exit 1) ; fi
|
2009-09-18 18:50:10 +08:00
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
pp : pwlibs
|
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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
pwcond : pwlibs
|
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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
acfdt : phlibs
|
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 '
|
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
gwl : phlibs
|
2013-07-16 15:10:03 +08:00
|
|
|
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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
gipaw : pwlibs
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2007-04-28 22:28:54 +08:00
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
d3q : phlibs
|
2016-09-19 21:03:44 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2018-08-06 22:26:02 +08:00
|
|
|
ld1 : bindir libs mods
|
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
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
upf : libs mods
|
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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
xspectra : pwlibs
|
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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
epw: phlibs
|
2016-10-02 01:20:29 +08:00
|
|
|
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 :
|
2019-03-02 01:26:10 +08:00
|
|
|
@if test -d GUI/PWgui ; then \
|
|
|
|
cd GUI/PWgui ; \
|
|
|
|
$(MAKE) TLDEPS= init; \
|
|
|
|
echo ; \
|
|
|
|
echo " PWgui has been built in ./GUI/PWgui/. You may try it either as: "; \
|
|
|
|
echo " ./GUI/PWgui/pwgui" ; \
|
|
|
|
echo " or"; \
|
|
|
|
echo " cd ./GUI/PWgui";\
|
|
|
|
echo " ./pwgui" ; \
|
|
|
|
echo ; \
|
|
|
|
else \
|
|
|
|
echo ; \
|
|
|
|
echo " Sorry, gui works only for git sources !!!" ; \
|
|
|
|
echo ; \
|
|
|
|
fi
|
2012-05-11 21:36:34 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
examples :
|
2016-10-08 21:29:31 +08:00
|
|
|
( 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
|
|
|
|
2018-08-29 20:18:10 +08:00
|
|
|
all : pwall cp ld1 upf tddfpt hp 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
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
pwlibs: bindir libs mods libks_solvers dftd3
|
|
|
|
if test -d PW ; then \
|
|
|
|
( cd PW ; $(MAKE) pw-lib || exit 1) ; fi
|
|
|
|
|
|
|
|
phlibs: pwlibs lrmods
|
|
|
|
if test -d PHonon; then \
|
|
|
|
( cd PHonon; $(MAKE) ph-lib || exit 1) ; fi
|
|
|
|
|
2018-08-29 20:18:10 +08:00
|
|
|
hplibs: pwlibs lrmods
|
|
|
|
if test -d HP; then \
|
|
|
|
( cd HP; $(MAKE) hp-lib || exit 1) ; fi
|
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
gwwlib : phlibs
|
|
|
|
if test -d GWW ; then \
|
|
|
|
( cd GWW ; $(MAKE) gwwa || exit 1 ) ; fi
|
|
|
|
|
|
|
|
pw4gwwlib : phlibs
|
|
|
|
if test -d GWW ; then \
|
|
|
|
( cd GWW ; $(MAKE) pw4gwwa || exit 1 ) ; fi
|
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
mods : libiotk libfox libutil libla libfft
|
|
|
|
( cd Modules ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2018-08-14 07:41:44 +08:00
|
|
|
libks_solvers : libs libutil libla
|
|
|
|
( cd KS_Solvers ; $(MAKE) TLDEPS= all || exit 1 )
|
2018-07-25 14:58:34 +08:00
|
|
|
|
2018-05-22 18:05:33 +08:00
|
|
|
libla : liblapack libutil libcuda
|
2016-01-24 04:09:07 +08:00
|
|
|
( cd LAXlib ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
libfft :
|
2015-11-21 18:37:48 +08:00
|
|
|
( cd FFTXlib ; $(MAKE) TLDEPS= all || exit 1 )
|
2015-12-27 03:45:20 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
libutil :
|
2017-07-26 19:15:20 +08:00
|
|
|
( cd UtilXlib ; $(MAKE) TLDEPS= all || exit 1 )
|
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
libs :
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd clib ; $(MAKE) TLDEPS= all || exit 1 )
|
2008-06-11 18:47:40 +08:00
|
|
|
|
2018-08-21 23:14:04 +08:00
|
|
|
lrmods : mods pwlibs
|
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
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
libblas :
|
2013-11-08 05:06:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2009-10-15 21:23:06 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
liblapack:
|
2013-11-08 05:06:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2012-01-03 19:33:44 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
libiotk:
|
2013-11-08 05:06:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2018-05-16 03:50:31 +08:00
|
|
|
libfox:
|
2017-07-29 04:01:07 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
2009-10-15 21:23:06 +08:00
|
|
|
|
2018-05-22 18:05:33 +08:00
|
|
|
libcuda:
|
2018-02-06 21:21:06 +08:00
|
|
|
cd install ; $(MAKE) -f extlibs_makefile $@
|
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
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
want :
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-03-20 00:16:38 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
SaX :
|
2016-01-08 21:38:50 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
yambo:
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2016-01-08 21:38:50 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
yambo-devel:
|
2015-06-05 21:24:27 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-11-23 19:53:08 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
plumed:
|
2013-11-08 05:06:06 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
2010-12-02 21:47:55 +08:00
|
|
|
|
2018-05-16 03:50:31 +08:00
|
|
|
west: pw
|
2015-06-20 22:54:27 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
2019-02-14 16:45:46 +08:00
|
|
|
SternheimerGW: lrmods
|
2017-07-13 21:36:19 +08:00
|
|
|
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
2018-11-01 16:41:18 +08:00
|
|
|
#############################################################
|
2018-10-02 23:33:50 +08:00
|
|
|
# 'make install' works with "configure --prefix=PREFIX"
|
2018-11-01 16:41:18 +08:00
|
|
|
# - If the PREFIX/bin directory does not exists it creates it
|
|
|
|
#############################################################
|
2014-10-31 00:14:03 +08:00
|
|
|
|
2018-05-18 19:10:50 +08:00
|
|
|
install :
|
2018-11-01 16:41:18 +08:00
|
|
|
mkdir -p $(PREFIX)/bin ; \
|
2016-11-14 22:20:19 +08:00
|
|
|
for x in `find * ! -path "test-suite/*" -name *.x -type f` ; do \
|
2018-11-01 16:41:18 +08:00
|
|
|
cp -v $$x $(PREFIX)/bin/ ; done
|
|
|
|
@echo -e '\nQuantum ESPRESSO binaries are installed in $(PREFIX)/bin\n'
|
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)
|
|
|
|
#########################################################
|
|
|
|
|
2018-05-18 19:10:50 +08:00
|
|
|
test-suite: pw cp
|
2015-12-27 03:45:20 +08:00
|
|
|
( 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 \
|
2018-08-14 07:41:44 +08:00
|
|
|
CPV LAXlib FFTXlib UtilXlib Modules PP PW EPW KS_Solvers \
|
2017-11-11 19:55:35 +08:00
|
|
|
NEB ACFDT COUPLE GWW XSpectra PWCOND dft-d3 \
|
2016-02-29 00:45:02 +08:00
|
|
|
atomic clib LR_Modules pwtools upftools \
|
2019-03-02 06:44:12 +08:00
|
|
|
dev-tools extlibs Environ TDDFPT PHonon HP GWW Doc GUI \
|
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
|
2019-03-02 00:47:47 +08:00
|
|
|
- cd install ; rm -f config.log configure.msg config.status
|
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-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
|
2018-06-14 03:30:27 +08:00
|
|
|
- cd pseudo; ./clean_ps ; cd -
|
2016-01-08 18:51:21 +08:00
|
|
|
( 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 ; \
|
2019-03-02 01:26:10 +08:00
|
|
|
$(MAKE) TLDEPS= clean init 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 ; \
|
2019-03-02 01:26:10 +08:00
|
|
|
echo " Sorry, tar-gui works only for git 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 ; \
|
2019-03-02 01:26:10 +08:00
|
|
|
echo " Sorry, tar-qe-modes works only for git sources !!!" ; \
|
2016-08-03 00:29:58 +08:00
|
|
|
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.
|
2018-05-18 19:10:50 +08:00
|
|
|
doc :
|
2009-07-17 16:39:11 +08:00
|
|
|
if test -d Doc ; then \
|
2019-03-02 00:47:47 +08:00
|
|
|
( cd Doc ; $(MAKE) VERSION=6.4 TLDEPS= all ) ; fi
|
2013-11-08 05:06:06 +08:00
|
|
|
for dir in */Doc; do \
|
|
|
|
( if test -f $$dir/Makefile ; then \
|
2019-03-02 00:47:47 +08:00
|
|
|
( cd $$dir; $(MAKE) VERSION=6.4 TLDEPS= all ) ; fi ) ; done
|
2013-11-08 05:06:06 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
2018-03-08 01:06:27 +08:00
|
|
|
depend: libiotk
|
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)
|