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
|
#===============================
# espresso
#===============================
#
include ../make.sys
#
# MAIN target
#
all:
$(MAKE) libblas_$(BLAS_LIBS_SWITCH)
$(MAKE) liblapack_$(LAPACK_LIBS_SWITCH)
$(MAKE) libelpa_internal
$(MAKE) libiotk
# BLAS
libblas : libblas_$(BLAS_LIBS_SWITCH)
libblas_external : fake_blas_external
fake_blas_external :
touch fake_libblas.a
-rm fake_libblas.a
libblas_internal:
if test ! -d ../BLAS; then \
( gzip -dc ../archive/blas-1.tar.gz |(cd ../; tar -xvf -)); fi
if test -e make_blas.inc; then \
(cp make_blas.inc ../BLAS/make.inc; \
cd ../BLAS; $(MAKE) $(BLASLIB)); else \
(echo "no configuration file found for blas"; \
echo "run configure from main QE dir"); fi
# LAPACK
liblapack : liblapack_$(LAPACK_LIBS_SWITCH)
liblapack_external : fake_lapack_external
fake_lapack_external :
touch fake_liblapack.a
-rm fake_liblapack.a
liblapack_internal:
if test ! -d ../lapack-3.2; then \
( gzip -dc ../archive/lapack-3.2.tar.gz | (cd ../; tar -xvf -)); fi
if test -e make_lapack.inc; then \
(cp make_lapack.inc ../lapack-3.2/make.inc; \
cp Makefile_lapack ../lapack-3.2/SRC/Makefile; \
cp Makefile_lapack_testing_lin ../lapack-3.2/TESTING/LIN/Makefile; \
cd ../lapack-3.2; $(MAKE) lapacklib); else \
(echo "no configuration file found for lapack"; \
echo "run configure from main QE dir"); fi
libiotk:
if test ! -d ../S3DE; then \
(gzip -dc ../archive/iotk-1.2.beta.tar.gz | (cd ../; tar -xvf -)) ; \
if test -e Makefile_iotk; then \
(cp Makefile_iotk ../S3DE/iotk/src/Makefile); fi; \
if test -e iotk_config.h; then \
(cp iotk_config.h ../S3DE/iotk/include/iotk_config.h); fi; fi
cd ../S3DE/iotk/src; $(MAKE) lib+util;
cd ../bin; ln -fs ../S3DE/iotk/tools/iotk .; \
ln -fs ../S3DE/iotk/src/iotk.x .; \
ln -fs ../S3DE/iotk/src/iotk_print_kinds.x .; \
cd ../; ln -fs S3DE/iotk iotk
# ELPA
libelpa : libelpa_$(ELPA_LIBS_SWITCH)
libelpa_ : fake_elpa_external
libelpa_disabled : fake_elpa_external
fake_elpa_external :
touch fake_libelpa.a
-rm fake_libelpa.a
libelpa_enabled:
if test ! -d ../ELPA; then \
( gzip -dc ../archive/ELPA-0.3.tar.gz |(cd ../; tar -xvf -)); fi
cd ../ELPA; $(MAKE)
###################################
# cleaning
###################################
# each lib independently
blas_clean:
if test -d ../BLAS; then (cd ../BLAS; $(MAKE) clean); fi
blas_veryclean:
if test -d ../BLAS; then (rm -R -f ../BLAS); fi
lapack_clean:
if test -d ../lapack-3.2; then (cd ../lapack-3.2; $(MAKE) clean); fi
lapack_veryclean:
if test -d ../lapack-3.2; then (rm -R -f ../lapack-3.2); fi
elpa_clean:
if test -d ../ELPA; then (cd ../ELPA; $(MAKE) clean); fi
elpa_veryclean:
if test -d ../ELPA; then (rm -R -f ../ELPA); fi
iotk_clean:
if test -d ../S3DE; then (cd ../S3DE; $(MAKE) clean); fi
if test -e ../S3DE/iotk/src/iotk.x; then \
rm -f ../S3DE/iotk/src/iotk.x; fi
(rm -f ../bin/iotk; \
rm -f ../bin/iotk.x; \
rm -f ../bin/iotk_print_kinds.x)
iotk_veryclean:
if test -d ../S3DE; then (rm -R -f ../S3DE); fi
if test -e ../S3DE/iotk/src/iotk.x; then (rm -f ../S3DE/iotk/src/iotk.x); fi
rm -f ../bin/iotk; \
rm -f ../bin/iotk.x; \
rm -f ../bin/iotk_print_kinds.x; \
rm -f ../iotk
# general cleaning
clean: blas_clean lapack_clean elpa_clean iotk_clean
veryclean: blas_veryclean lapack_veryclean elpa_veryclean iotk_veryclean
|