Using .sh file to compile commands in source code
I am using FORTRAN to solve partial differentiate equations. Main program
and subroutines have been put in .f file. And I got a .sh file to compile
the commands in source code in linux operating system. This file has been
attached. But I failed to run this. After struggling for a week, I really
need some help on this. Please any help would be greatly appreciated!!!
#!/bin/bash
#
mkdir temp
cd temp
rm *
~/binc/$ARCH/f77split ../fishpack.f
#
for FILE in `ls -1 *.f`;
do
gfortran -c -g $FILE >& compiler.txt
if [ $? -ne 0 ]; then
echo "Errors compiling " $FILE
exit
fi
rm compiler.txt
done
rm *.f
#
ar qc libfishpack.a *.o
rm *.o
#
mv libfishpack.a ~/libf77/$ARCH
cd ..
rmdir temp
#
echo "Library installed as ~/libf77/$ARCH/libfishpack.a."
No comments:
Post a Comment