add: use shell to replace generate .a
This commit is contained in:
parent
b4dd5d1165
commit
c48a3f3964
1 changed files with 19 additions and 0 deletions
19
src/staden/gen_a.sh
Normal file
19
src/staden/gen_a.sh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
for fortran in $(ls *.f)
|
||||||
|
do
|
||||||
|
mkdir -p ${fortran%??}
|
||||||
|
cp $fortran ${fortran%??}
|
||||||
|
|
||||||
|
cd ${fortran%??}
|
||||||
|
fsplit ${fortran}
|
||||||
|
rm ${fortran}
|
||||||
|
|
||||||
|
gfortran -g -fdec -std=legacy -C -c *.f
|
||||||
|
ar rcv ${fortran%??}.a *.o
|
||||||
|
ranlib ${fortran%??}.a
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
cp ${fortran%??}/*.a .
|
||||||
|
rm -rf ${fortran%??}
|
||||||
|
done
|
Loading…
Reference in a new issue