Kien Lhi

OS X Yosemite安装GAMIT

Mac OS X 10.10 Yosemite

GAMIT/GLOBK 10.5


下载Gamit

下载安装 Xcode

下载安装 gfortran

https://gcc.gnu.org/wiki/GFortranBinaries

下载安装 Xquartz

https://xquartz.macosforge.org/landing/


新建目录/opt/gamit

将所有gamit压缩文件放进去


建立链接

sudo ln -s /opt/X11/include/X11 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/


更改命令执行权限

chmod ug+rx install_software


更改libraries/Makefile.config

更改X11 路径

# Specific for MacOSX

X11LIBPATH /usr/X11/lib

X11INCPATH /usr/X11/include/X11


修改编译选项,改为64位

#------ for Mac OSX 5.2-8.8.0 (10.4.8) and Mac OS X Lion 11.0.0

CFLAGS = -g -m64


执行命令

./install_software


在用户目录下新建文件 .bash_profile

内容为:

gamitpath=/opt/gamit

export PATH=$PATH:$gamitpath/gamit/bin

export PATH=$PATH:$gamitpath/kf/bin

export PATH=$PATH:$gamitpath/com

export PATH=$PATH:$gamitpath/gamit/com

export HELP_DIR=$gamitpath/help/

set INSTITUTE KienLhi


测试:

 打开终端,输入 doy


附:

显示 Mac 隐藏文件的命令:

defaults write com.apple.finder AppleShowAllFiles -bool true

killall Finder

隐藏 Mac 隐藏文件的命令:

defaults write com.apple.finder AppleShowAllFiles -bool false

killall Finder


评论