mirror of
https://github.com/pfloos/quack
synced 2024-11-04 05:03:49 +01:00
int directory
This commit is contained in:
parent
e05ac0a1e8
commit
a415a301d4
0
int/.gitignore
vendored
Normal file
0
int/.gitignore
vendored
Normal file
@ -1,9 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
###git clone --single-branch --branch master https://gitlab.com/libxc/libxc.git
|
wget https://gitlab.com/libxc/libxc/-/archive/5.0.0/libxc-5.0.0.tar.gz
|
||||||
tar -xzvf libxc-5.0.0.tar.gz
|
tar -xzf libxc-5.0.0.tar.gz
|
||||||
cd libxc-5.0.0
|
cd libxc-5.0.0
|
||||||
###autoreconf -i
|
|
||||||
./configure --prefix=$QUACK_ROOT
|
./configure --prefix=$QUACK_ROOT
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
|
2
src/.gitignore
vendored
2
src/.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
*.
|
*.
|
||||||
|
.ninja_log
|
||||||
|
build.ninja
|
||||||
*/Makefile
|
*/Makefile
|
||||||
|
@ -9,6 +9,5 @@ default:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
python3 make_ninja.py
|
python3 make_ninja.py
|
||||||
ninja -t clean
|
|
||||||
for i in */ ; do ninja -t clean ; done
|
for i in */ ; do ninja -t clean ; done
|
||||||
|
|
||||||
|
@ -66,10 +66,9 @@ rule build_lib
|
|||||||
description = Linking $out
|
description = Linking $out
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
LIBS="$LDIR/libxcf90.a $LDIR/libxc.a $LDIR/libnumgrid.a "
|
||||||
rule_build_exe = """
|
rule_build_exe = """
|
||||||
|
LIBS = {0} $LAPACK $STDCXX
|
||||||
LIBS = $LDIR/libxcf90.a $LDIR/libxc.a $LDIR/libnumgrid.a $LAPACK $STDCXX
|
|
||||||
|
|
||||||
rule build_exe
|
rule build_exe
|
||||||
command = $FC $in $LIBS -o $out
|
command = $FC $in $LIBS -o $out
|
||||||
@ -81,7 +80,7 @@ rule build_lib
|
|||||||
pool = console
|
pool = console
|
||||||
description = Compiling $out
|
description = Compiling $out
|
||||||
|
|
||||||
"""
|
""".format(LIBS)
|
||||||
|
|
||||||
rule_git_clone = """
|
rule_git_clone = """
|
||||||
rule git_clone
|
rule git_clone
|
||||||
@ -100,6 +99,15 @@ rule make_numgrid
|
|||||||
build $LDIR/libnumgrid.a: 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([
|
build_in_lib_dir = "\n".join([
|
||||||
header,
|
header,
|
||||||
@ -114,6 +122,7 @@ build_in_exe_dir = "\n".join([
|
|||||||
compiler,
|
compiler,
|
||||||
rule_fortran,
|
rule_fortran,
|
||||||
rule_build_exe,
|
rule_build_exe,
|
||||||
|
build_libxc,
|
||||||
])
|
])
|
||||||
|
|
||||||
build_main = "\n".join([
|
build_main = "\n".join([
|
||||||
@ -121,6 +130,7 @@ build_main = "\n".join([
|
|||||||
compiler,
|
compiler,
|
||||||
rule_git_clone,
|
rule_git_clone,
|
||||||
build_numgrid,
|
build_numgrid,
|
||||||
|
build_libxc,
|
||||||
])
|
])
|
||||||
|
|
||||||
exe_dirs = [ "QuAcK", "eDFT" ]
|
exe_dirs = [ "QuAcK", "eDFT" ]
|
||||||
@ -163,14 +173,14 @@ def create_ninja_in_exedir(directory):
|
|||||||
objects = " ".join(objects)
|
objects = " ".join(objects)
|
||||||
for libname in lib_dirs:
|
for libname in lib_dirs:
|
||||||
f.write("build $LDIR/{0}.a: build_lib\n dir = $SDIR/{0}\n".format(libname))
|
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("build $BDIR/{0}: build_exe {1} {2}\n".format(directory,libs,objects))
|
||||||
f.write("default $BDIR/{0}\n".format(directory))
|
f.write("default $BDIR/{0}\n".format(directory))
|
||||||
|
|
||||||
|
|
||||||
def create_main_ninja():
|
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:
|
with open("build.ninja","w") as f:
|
||||||
f.write(build_main)
|
f.write(build_main)
|
||||||
f.write("""
|
f.write("""
|
||||||
|
@ -6,5 +6,5 @@ cd numgrid
|
|||||||
cd build
|
cd build
|
||||||
make
|
make
|
||||||
cp lib/libnumgrid.a $LDIR/
|
cp lib/libnumgrid.a $LDIR/
|
||||||
cp ..//numgrid/numgrid.f90 $SDIR/numgrid/
|
cp ../numgrid/numgrid.f90 $SDIR/numgrid/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user