diff --git a/GoDuck b/GoDuck index 8fd6ace..5d75c88 100755 Binary files a/GoDuck and b/GoDuck differ 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/