More Makefile cleanup: targets pwlibs, phlibs added in order to avoid much

uneeded relinking; the mysterious "tldeps" machinery modified accordingly;
added explicit dependencies to GWW targets to prevent (once again) problems
with make -j (seems to work now). make.depend updated (once again).
This commit is contained in:
Paolo Giannozzi 2018-08-21 17:14:04 +02:00
parent ad25497a6f
commit 6f7bbdf452
21 changed files with 58 additions and 62 deletions

View File

@ -14,13 +14,13 @@ heada: libminpack
gwwa:
( cd gww ; $(MAKE) all || exit 1 )
bsea: gwwa
bsea: gwwa pw4gwwa
( cd bse ; $(MAKE) all || exit 1 )
simplea:
simplea: gwwa
( cd simple ; $(MAKE) all || exit 1 )
simple_bsea:
simple_bsea: gwwa
( cd simple_bse ; $(MAKE) all || exit 1 )
simple_ipa:

View File

@ -50,18 +50,14 @@ QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a \
PWOBJS = ../../PW/src/libpw.a
PW4GWWOBJ = ../pw4gww/fft_custom.o ../pw4gww/stop_pp.o ../pw4gww/mp_wave_parallel.o
GWWOBJ = ../gww/libgww.a ../minpack/minpacklib.a
#LIBPWPH = ../../PHonon/Gamma/libcg.a
LIBPWPH =
#PPOBJ= ../../PP/src/libpp.a
PPOBJ=
TLDEPS= bindir libs pw ph mods
TLDEPS= pwlibs gwwlib pw4gwwlib
all : tldeps bse_main.x
bse_main.x : bse_main.o libbse.a $(BSEOBJS) $(PWOBJS) $(QEMODS) $(LIBPWPH) $(GWWOBJ) $(PPOBJ)
bse_main.x : bse_main.o libbse.a $(BSEOBJS) $(PWOBJS) $(QEMODS) $(GWWOBJ)
$(LD) $(LDFLAGS) -o $@ \
bse_main.o libbse.a $(PWOBJS) $(EEOBJS) $(LIBPWPH) $(QEMODS) $(LIBOBJS) $(QELIBS) $(PW4GWWOBJ) $(GWWOBJ) $(PPOBJ)
bse_main.o libbse.a $(PWOBJS) $(QEMODS) $(LIBOBJS) $(QELIBS) $(PW4GWWOBJ) $(GWWOBJ)
- ( cd ../../bin ; ln -fs ../GWW/bse/$@ . )
tldeps:

View File

@ -49,7 +49,7 @@ QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a \
LIBMIN= ../minpack/minpacklib.a
TLDEPS=bindir mods libs libiotk
TLDEPS=pwlibs
all : tldeps gww.x gww_fit.x libgww.a

View File

@ -27,7 +27,7 @@ LIBPWPH = ../../PHonon/PH/libph.a ../..//LR_Modules/liblrmod.a ../../PW/src/lib
LIBMIN= ../minpack/minpacklib.a
TLDEPS= bindir mods libs pw ph
TLDEPS= phlibs
all : tldeps head.x

View File

@ -52,7 +52,7 @@ PWOBJS = ../../PW/src/libpw.a
LIBMIN= ../minpack/minpacklib.a
TLDEPS= bindir libs pw
TLDEPS= pwlibs
all : tldeps pw4gww.x

View File

@ -34,7 +34,7 @@ PWOBJS = ../../PW/src/libpw.a
PW4GWWOBJS = ../pw4gww/libpw4gww.a
GWWOBJ = ../gww/libgww.a
TLDEPS= bindir libs pw
TLDEPS= pwlibs gwwlib
all : tldeps simple.x

View File

@ -23,16 +23,11 @@ spectrum.o \
lanczos.o \
build_eemat.o
#QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../../LAXlib/libqela.a \
../../LAXlib/libqela.a ../../UtilXlib/libutil.a
QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a \
../../KS_Solvers/libks_solvers.a \
../../LAXlib/libqela.a ../../UtilXlib/libutil.a
TLDEPS=bindir mods libs libiotk
TLDEPS=bindir mods libs gwwlib
all : tldeps simple_bse.x libsimple_exc.a

View File

@ -27,7 +27,7 @@ PWOBJS = ../../PW/src/libpw.a
LIBMIN=
TLDEPS=bindir mods libs libiotk pw
TLDEPS=pwlibs
all : tldeps simple_ip.x libsimple_ip.a

View File

@ -69,7 +69,7 @@ default :
# 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
pw : bindir libs mods libks_solvers dftd3
pw : pwlibs
if test -d PW ; then \
( cd PW ; $(MAKE) TLDEPS= all || exit 1) ; fi
@ -77,27 +77,27 @@ cp : bindir libs mods
if test -d CPV ; then \
( cd CPV ; $(MAKE) TLDEPS= all || exit 1) ; fi
ph : pw lrmods
ph : phlibs
if test -d PHonon; then \
(cd PHonon; $(MAKE) all || exit 1) ; fi
( cd PHonon; $(MAKE) all || exit 1) ; fi
neb : pw
neb : pwlibs
if test -d NEB; then \
(cd NEB; $(MAKE) all || exit 1) ; fi
( cd NEB; $(MAKE) all || exit 1) ; fi
tddfpt : pw
tddfpt : phlibs
if test -d TDDFPT; then \
(cd TDDFPT; $(MAKE) all || exit 1) ; fi
( cd TDDFPT; $(MAKE) all || exit 1) ; fi
pp : pw
pp : pwlibs
if test -d PP ; then \
( cd PP ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
pwcond : pp
pwcond : pwlibs
if test -d PWCOND ; then \
( cd PWCOND ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
acfdt : ph
acfdt : phlibs
if test -d ACFDT ; then \
( cd ACFDT ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
@ -105,14 +105,14 @@ acfdt : ph
gww:
@echo '"make gww" is obsolete, use "make gwl" instead '
gwl : ph
gwl : phlibs
if test -d GWW ; then \
( cd GWW ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
gipaw : pw
gipaw : pwlibs
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
d3q : ph
d3q : phlibs
( cd install ; $(MAKE) -f plugins_makefile $@ || exit 1 )
ld1 : bindir libs mods
@ -123,11 +123,11 @@ upf : libs mods
if test -d upftools ; then \
( cd upftools ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
pw_export : pw
pw_export : pwlibs
if test -d PP ; then \
( cd PP ; $(MAKE) TLDEPS= pw_export.x || exit 1 ) ; fi
xspectra : pw
xspectra : pwlibs
if test -d XSpectra ; then \
( cd XSpectra ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
@ -135,7 +135,7 @@ couple : pw cp
if test -d COUPLE ; then \
( cd COUPLE ; $(MAKE) TLDEPS= all || exit 1 ) ; fi
epw: ph
epw: phlibs
if test -d EPW ; then \
( cd EPW ; $(MAKE) all || exit 1; \
cd ../bin; ln -fs ../EPW/bin/epw.x . ); fi
@ -160,6 +160,22 @@ all : pwall cp ld1 upf tddfpt xspectra gwl
# compile modules, libraries, directory for binaries, etc
###########################################################
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
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
mods : libiotk libfox libutil libla libfft
( cd Modules ; $(MAKE) TLDEPS= all || exit 1 )
@ -178,7 +194,7 @@ libutil :
libs :
( cd clib ; $(MAKE) TLDEPS= all || exit 1 )
lrmods : mods pw
lrmods : mods pwlibs
( cd LR_Modules ; $(MAKE) TLDEPS= all || exit 1 )
dftd3 : mods

View File

@ -451,20 +451,6 @@ xc_vdW_DF.o : kernel_table.o
xc_vdW_DF.o : kind.o
xc_vdW_DF.o : mp_bands.o
xc_vdW_DF.o : recvec.o
xml_io_base.o : ../FFTXlib/fft_types.o
xml_io_base.o : ../UtilXlib/mp.o
xml_io_base.o : ../iotk/src/iotk_module.o
xml_io_base.o : control_flags.o
xml_io_base.o : fft_base.o
xml_io_base.o : hdf5_qe.o
xml_io_base.o : io_files.o
xml_io_base.o : io_global.o
xml_io_base.o : kind.o
xml_io_base.o : mp_bands.o
xml_io_base.o : mp_global.o
xml_io_base.o : mp_images.o
xml_io_base.o : mp_wave.o
xml_io_base.o : parser.o
xsf.o : constants.o
xsf.o : kind.o
ylmr2.o : constants.o

View File

@ -38,7 +38,7 @@ QEMODS=../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a \
../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../../UtilXlib/libutil.a ../../dft-d3/libdftd3qe.a
PWOBJS= ../../PW/src/libpw.a
TLDEPS=bindir mods libs liblapack libblas pw
TLDEPS=pwlibs
all : tldeps neb.x path_interpolation.x

View File

@ -17,7 +17,7 @@ QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a \
PWOBJS = ../../PW/src/libpw.a
TLDEPS= bindir libs pw
TLDEPS= pwlibs
all : tldeps fd.x fd_ifc.x fd_ef.x

View File

@ -40,7 +40,7 @@ PWOBJS = ../../PW/src/libpw.a
QEMODS = ../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a \
../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../../UtilXlib/libutil.a ../../dft-d3/libdftd3qe.a
TLDEPS= bindir mods libs pw
TLDEPS= pwlibs
all : tldeps phcg.x libcg.a

View File

@ -8,6 +8,9 @@ all: phonon phgamma_only finite_diffs
phonon:
( cd PH ; $(MAKE) all || exit 1 )
ph-lib:
( cd PH ; $(MAKE) libs-ph || exit 1 )
phgamma_only:
( cd Gamma ; $(MAKE) all || exit 1 )

View File

@ -180,7 +180,7 @@ PWOBJS = ../../PW/src/libpw.a
QEMODS = ../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a \
../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../../UtilXlib/libutil.a ../../dft-d3/libdftd3qe.a
TLDEPS= bindir libs mods libks_solvers lrmods
TLDEPS= phlibs
all : tldeps libs-ph ph.x dynmat.x matdyn.x q2r.x q2trans.x q2trans_fd.x lambda.x fqha.x q2qstar.x \
alpha2f.x epa.x

View File

@ -53,7 +53,7 @@ QEOBJS = ../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a \
MODULES = $(PWOBJS) $(QEOBJS)
TLDEPS= bindir mods libs pw
TLDEPS= pwlibs
all : tldeps open_grid.x average.x bands.x dos.x epsilon.x initial_state.x fs.x \
plan_avg.x plotband.x plotproj.x plotrho.x pmw.x pp.x projwfc.x \

View File

@ -10,7 +10,7 @@ QEMODS = ../../Modules/libqemod.a ../../FFTXlib/libqefft.a \
../../LAXlib/libqela.a ../../UtilXlib/libutil.a
PWOBJS = ../src/libpw.a
TLDEPS= bindir mods libs pw libfft libla libutil
TLDEPS= pwlibs
LIBOBJS = ../../clib/clib.a ../../iotk/src/libiotk.a

View File

@ -51,7 +51,7 @@ QEMODS = ../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a \
../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../../UtilXlib/libutil.a \
../../dft-d3/libdftd3qe.a
TLDEPS= bindir mods libs pw pp
TLDEPS= pwlibs
all : tldeps pwcond.x

View File

@ -59,7 +59,7 @@ lr_test_restart.o\
lr_dav_debug.o\
plugin_tddfpt_potential.o
TLDEPS=bindir libs mods lrmods
TLDEPS=phlibs
all : tldeps libtddfpt.a turbo_lanczos.x turbo_davidson.x turbo_eels.x

View File

@ -11,7 +11,7 @@ QEMODS = ../../Modules/libqemod.a \
../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../../UtilXlib/libutil.a
PWOBJS = ../../PW/src/libpw.a
TLDEPS=bindir libs pw
TLDEPS=pwlibs
all : tldeps turbo_spectrum.x

View File

@ -8,7 +8,7 @@ MODFLAGS= $(BASEMOD_FLAGS)
OBJS = write_upf.o read_upf.o
QEMODS = ../Modules/libqemod.a ../FFTXlib/libqefft.a ../UtilXlib/libutil.a
TLDEPS = mods libs libiotk libfox
TLDEPS = mods libs libfox
all : tldeps casino2upf.x cpmd2upf.x fhi2upf.x fpmd2upf.x \
ncpp2upf.x oldcp2upf.x read_upf_tofile.x rrkj2upf.x upf2casino.x \