1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
# Copyright (C) 2001-2020 Quantum ESPRESSO group
#
# 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.
#
# Makefile for plugins
sinclude ../make.inc
include plugins_list
include install_utils
###########################################################
# D3Q
###########################################################
d3q: uncompress-d3q
if test -d ../D3Q; then \
cd ../D3Q; $(MAKE) || exit 1; \
fi
touch make-d3q
uncompress-d3q:
$(call download_and_unpack,$(D3Q),$(D3Q_URL),D3Q,d3q)
touch uncompress-d3q
d3q_clean:
if test -d ../D3Q; then (cd ../D3Q; $(MAKE) clean); fi
rm -f ../bin/d3q.x
rm -f ../bin/d3_*.x
rm -f ../bin/diffd3.x
rm -f ../bin/xml2giorgia.x
d3q_veryclean: d3q_clean
# delete unpacked directory and its links, keep the archive
test -e ../D3Q/protect || \
(cd ..; \
i=D3Q; \
while j=$$(readlink $$i);do rm -rf $$i; i=$$j;done;\
rm -rf $$i\
);
d3q_distclean: d3q_veryclean
# also delete the tgz archive
rm -f ../archive/$(D3Q); \
rm -f make-d3q uncompress-d3q
##########################################################
# GIPAW
###########################################################
gipaw: uncompress-gipaw configure-gipaw
if test -d ../GIPAW; then \
cd ../GIPAW; $(MAKE) all || exit 1; cd ../bin; ln -fs ../GIPAW/src/gipaw.x . ; fi
touch make-gipaw
uncompress-gipaw:
$(call download_and_unpack,$(GIPAW),$(GIPAW_URL),GIPAW,qe-gipaw)
touch uncompress-gipaw
configure-gipaw:
cd ../GIPAW ; \
./configure --with-qe-source=${TOPDIR}
touch ./configure-gipaw
gipaw_clean:
if test -d ../GIPAW; then (cd ../GIPAW; $(MAKE) clean); fi
rm -f ../bin/gipaw.x
rm -rf ./make-gipaw
gipaw_veryclean: gipaw_clean
if test -d ../GIPAW; then (cd ../GIPAW; \
rm -f config.log config.status ); fi
rm -rf ./configure-gipaw
gipaw_distclean:
#if test -d ../GIPAW; then (rm -R -f ../GIPAW ); fi
#if test -d ../$(GIPAW); then (rm -R -f ../$(GIPAW) ); fi
rm -f ../archive/$(GIPAW).tar.gz
###########################################################
# wannier90
###########################################################
w90: uncompress-w90 configure-w90
if test -d ../W90; then \
cd ../W90; $(MAKE) || exit 1; cd ../bin; ln -fs ../W90/wannier90.x . ; fi
-(cd ../bin; ln -fs ../W90/wannier90.x .)
touch make-w90
uncompress-w90:
$(call download_and_unpack,$(W90),$(W90_URL),W90,wannier90)
touch uncompress-w90
configure-w90:
cd ../W90 ; \
if (test -e ../install/make_wannier90.inc) || (test -d ../W90); then \
(cp ../install/make_wannier90.inc ../W90/make.inc); fi
touch ./configure-w90
w90_clean:
if test -d ../W90; then (cd ../W90; \
$(MAKE) veryclean); fi
rm -f ../bin/wannier90.x
rm -rf ./make-w90 ./configure-w90
w90_veryclean: w90_clean
if test -d ../W90; then (rm -R -f ../W90); fi
if test -d ../$(W90); then (rm -R -f ../$(W90)); fi
rm -f ../bin/wannier90.x
rm -rf ./uncompress-w90
w90_distclean:
rm -f ../archive/$(W90).tar.gz
###########################################################
# WANT
###########################################################
want: uncompress-want configure-want
if test -d ../WANT; then \
cd ../WANT; $(MAKE) all || exit 1; fi
touch ./make-want
uncompress-want:
$(call download_and_unpack,$(WANT),$(WANT_URL),WANT,want)
touch uncompress-want
configure-want:
cd ../WANT ; \
./configure \
CC="$(CC)" \
F90="$(F90)" \
MPIF90="$(MPIF90)" \
LD="$(LD)" \
LDFLAGS="$(LDFLAGS)" \
AR="$(AR)" \
ARFLAGS="$(ARFLAGS)" \
RANLIB="$(RANLIB)" \
LAPACK_LIBS="$(LAPACK_LIBS)" \
BLAS_LIBS="$(BLAS_LIBS)" \
FFT_LIBS="$(FFT_LIBS)"
touch ./configure-want
want_clean:
if test -d ../WANT; then (cd ../WANT; \
$(MAKE) clean); fi
- rm -rf ./make-want ./configure-want
want_veryclean: want_clean
if test -d ../WANT; then (rm -R -f ../WANT); fi
if test -d ../$(WANT); then (rm -R -f ../$(WANT)); fi
if test -e ../archive/$(WANT).tar.gz ; then (rm -f ../archive/$(WANT).tar.gz); fi
- rm -rf ./uncompress-want ./configure.h
want_distclean:
rm -f ../archive/$(WANT).tar.gz
###########################################################
# YAMBO
###########################################################
yambo: uncompress-yambo configure-yambo
if test -d ../YAMBO; then \
cd ../YAMBO; $(MAKE) yambo interfaces ypp || exit 1; fi
touch ./make-yambo
uncompress-yambo:
$(call download_and_unpack,$(YAMBO),$(YAMBO_URL),YAMBO,yambo)
touch uncompress-yambo
configure-yambo:
@(if test -z "$(F90)" ; then \
echo "*** F90 is not defined; please define F90 or edit make.inc" ; exit 1 ; fi)
cd ../YAMBO ; \
./configure \
--with-blas-libs="$(BLAS_LIBS)" \
--with-lapack-libs="$(LAPACK_LIBS) $(BLAS_LIBS)" \
--with-fft-libs="$(FFT_LIBS)" \
--with-scalapack-libs="$(SCALAPACK_LIBS)" \
--with-blacs-libs="$(SCALAPACK_LIBS)" \
PFC="$(MPIF90)" \
FC="$(F90)"
touch ./configure-yambo
yambo_clean:
if test -d ../YAMBO; then (cd ../YAMBO; \
$(MAKE) clean); fi
- rm -rf ./make-yambo ./configure-yambo
yambo_veryclean: yambo_clean
if test -d ../YAMBO; then (rm -R -f ../YAMBO); fi
if test -d ../$(YAMBO); then (rm -R -f ../$(YAMBO)); fi
- rm -rf ./uncompress-yambo
yambo_distclean:
if test -e ../archive/$(YAMBO).tar.gz ; then \
rm -f ../archive/$(YAMBO).tar.gz; fi
###########################################################
# cleaning
###########################################################
clean: w90_clean want_clean yambo_clean gipaw_clean d3q_clean
veryclean: w90_veryclean want_veryclean yambo_veryclean \
gipaw_veryclean d3q_veryclean
distclean: w90_distclean want_distclean yambo_distclean \
gipaw_distclean d3q_distclean
|