Created
October 9, 2017 00:34
-
-
Save sonesuke/c85d638f9cf5af42c7ca169b890b1d01 to your computer and use it in GitHub Desktop.
install f2c on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://qiita.com/yukiB/items/5ac2e9ccbfa5634d405c | |
setenv INSTALL /usr/local | |
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 | |
cp libf2c.a $INSTALL/lib | |
cd ../src | |
cp makefile.u Makefile | |
rm xsum | |
cc -O xsum.c -o xsum | |
chmod +x xsum | |
make | |
cp f2c $INSTALL/bin | |
cd .. | |
mkdir -p $INSTALL/share/man/man1 | |
cp f2c.1t $INSTALL/share/man/man1 | |
cp fc $INSTALL/bin/f77 | |
chmod +x $INSTALL/bin/f77 | |
cd .. | |
rm -rf f2c | |
echo "==================SUMMARY==================" | |
echo $0 " has built and installed:" | |
find $INSTALL -name '*f2c*' -mmin -5 | |
find $INSTALL -name '*f77*' -mmin -5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment