Wednesday, September 30, 2009

Fortran to C - Copy and paste in linux - and it will do everything

setenv INSTALL path/to/your/local/install/directory
curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar"
tar -xvf f2c.tar
gunzip -rf f2c/*
cd f2c
mkdir libf2c
mv libf2c.zip libf2c
cd libf2c
unzip libf2c.zip
cp makefile.u Makefile
make
cp f2c.h $INSTALL/include
cd ../src
cp makefile.u Makefile
make
cp f2c $INSTALL/bin