From a415a301d4f333c596e2f2ae51fddeb732fc8e2e Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Tue, 13 Oct 2020 20:59:03 +0200 Subject: [PATCH] int directory --- GoDuck | Bin 3342232 -> 3342232 bytes int/.gitignore | 0 libxc-tools/install_libxc.sh | 5 ++--- src/.gitignore | 2 ++ src/Makefile | 1 - src/make_ninja.py | 22 ++++++++++++++++------ utils/install_numgrid.sh | 2 +- 7 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 int/.gitignore diff --git a/GoDuck b/GoDuck index 8fd6ace0acbef002494ad952e94dd9a76ff9eb9c..5d75c8879a8b23f22c54babb9ed258b840763eb2 100755 GIT binary patch delta 630 zcmXYsJ7^S96o#3-`$%>&F~(P7+!*8YoOO&^DPh5WS;58>i$nygF^$;hGKt797UP0X zW@Qa%WwDS-m?BJ}f(XNcg_Uu!v{)@HC9Hbq+%10i_`iGZxwrK%v06HJVIc#BEON-B zfDw$M2peN?FpeFVz)nnJ7j|P0_F^BVFpd3~!2y&oi-VZMAzr&0*zRdBcP=A?+_jRtZD_ywdaaUyL2KzZPaFZ)$t#^w{(uKiojzw1Q@Ia*$R#%6U zGi&Tf6_xJ|uZ`*fuUj&({g9okko}lz8Rh8j)St3%XzO|Uq_k_d^af*JvTF$i>wKjs h)PKW%KBWiV2J4h{PU^Tir*sx{PV1bByp6N&rT6ita|UcDSr6){(H{3&3~!W)VU1@87O3tLmmYT zU=T&P*aQzl*oWmnQX6GnT?@T#Q{ZW+|dPKE?daWsZLKR2a^eI&))O+pRH^x0* zL|lDK4W$-4GjaNX{EX20NAiRsH`T2v!<4+7Q0p`OvIF54>RK0krH&)*)Hf>Gw*H;` z0XzGHeEV+oC)Kjz+~1VgHvK~l>#Bb#$*3iL&2_k266%ff!m!ZnBv*<;t7o{Mw{(`f zo>1!?FBF8z7dROd>RsZEeeKKai;LC*?x=_QMEfc?azf?nT*(LpH@GA&3U6{Es(Oq2 z%1~6D+n5}iXHQgIzGK#!ZS|0s9ijDm>}7@A`&_eo>kqhLX>G}T$xO7G`huN(%)X-{ n?ZRcgSQP3#<3`@l-C%`v$~wn%e4XPulR77KPR7B?DgXR`$#@0J diff --git a/int/.gitignore b/int/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/libxc-tools/install_libxc.sh b/libxc-tools/install_libxc.sh index 0462915..c156d9c 100755 --- a/libxc-tools/install_libxc.sh +++ b/libxc-tools/install_libxc.sh @@ -1,9 +1,8 @@ #!/bin/bash -###git clone --single-branch --branch master https://gitlab.com/libxc/libxc.git -tar -xzvf libxc-5.0.0.tar.gz +wget https://gitlab.com/libxc/libxc/-/archive/5.0.0/libxc-5.0.0.tar.gz +tar -xzf libxc-5.0.0.tar.gz cd libxc-5.0.0 -###autoreconf -i ./configure --prefix=$QUACK_ROOT make make check diff --git a/src/.gitignore b/src/.gitignore index 9681dd8..a5a9757 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,2 +1,4 @@ *. +.ninja_log +build.ninja */Makefile diff --git a/src/Makefile b/src/Makefile index 7c72710..a5e2ac1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,6 +9,5 @@ default: clean: python3 make_ninja.py - ninja -t clean for i in */ ; do ninja -t clean ; done diff --git a/src/make_ninja.py b/src/make_ninja.py index adc41f9..0d81747 100755 --- a/src/make_ninja.py +++ b/src/make_ninja.py @@ -66,10 +66,9 @@ rule build_lib description = Linking $out """ - +LIBS="$LDIR/libxcf90.a $LDIR/libxc.a $LDIR/libnumgrid.a " rule_build_exe = """ - -LIBS = $LDIR/libxcf90.a $LDIR/libxc.a $LDIR/libnumgrid.a $LAPACK $STDCXX +LIBS = {0} $LAPACK $STDCXX rule build_exe command = $FC $in $LIBS -o $out @@ -81,7 +80,7 @@ rule build_lib pool = console description = Compiling $out -""" +""".format(LIBS) rule_git_clone = """ rule git_clone @@ -100,6 +99,15 @@ rule make_numgrid build $LDIR/libnumgrid.a: make_numgrid """ +build_libxc = """ +rule make_libxc + command = cd $QUACK_ROOT/libxc-tools ; QUACK_ROOT="$QUACK_ROOT" CC="$CC" CXX="$CXX" FC="$FC" ./install_libxc.sh + description = Building libxc + pool = console + +build $LDIR/libxc.a $LDIR/libxcf90.a $IDIR/xc.h $IDIR/xc_funcs_removed.h $IDIR/xc_f90_lib_m.mod $IDIR/xc_funcs_worker.h $IDIR/xc_funcs.h $IDIR/xc_version.h: make_libxc + +""" build_in_lib_dir = "\n".join([ header, @@ -114,6 +122,7 @@ build_in_exe_dir = "\n".join([ compiler, rule_fortran, rule_build_exe, + build_libxc, ]) build_main = "\n".join([ @@ -121,6 +130,7 @@ build_main = "\n".join([ compiler, rule_git_clone, build_numgrid, + build_libxc, ]) exe_dirs = [ "QuAcK", "eDFT" ] @@ -163,14 +173,14 @@ def create_ninja_in_exedir(directory): objects = " ".join(objects) for libname in lib_dirs: f.write("build $LDIR/{0}.a: build_lib\n dir = $SDIR/{0}\n".format(libname)) - libs = " ".join([ "$LDIR/{0}.a".format(x) for x in lib_dirs]) + libs = " ".join([ "$LDIR/{0}.a".format(x) for x in lib_dirs]) + " "+LIBS f.write("build $BDIR/{0}: build_exe {1} {2}\n".format(directory,libs,objects)) f.write("default $BDIR/{0}\n".format(directory)) def create_main_ninja(): - libs = " ".join([ "$LDIR/{0}.a".format(x) for x in lib_dirs]) + libs = " ".join([ "$LDIR/{0}.a".format(x) for x in lib_dirs]) + " "+LIBS with open("build.ninja","w") as f: f.write(build_main) f.write(""" diff --git a/utils/install_numgrid.sh b/utils/install_numgrid.sh index 0fe411f..208dd72 100755 --- a/utils/install_numgrid.sh +++ b/utils/install_numgrid.sh @@ -6,5 +6,5 @@ cd numgrid cd build make cp lib/libnumgrid.a $LDIR/ -cp ..//numgrid/numgrid.f90 $SDIR/numgrid/ +cp ../numgrid/numgrid.f90 $SDIR/numgrid/