add: use shell to replace generate .a

This commit is contained in:
kuoi 2023-04-13 02:46:26 +08:00
parent b4dd5d1165
commit c48a3f3964

19
src/staden/gen_a.sh Normal file
View 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