1.下载软件包(http://www.xcrysden.org/Download.html)
选择source package下载(如果下载编译好的版本,在运行的时候会报错,提示系统的某个库文件不够新。)
并且解压,进入解压后的目录
tar -zxvf xcrysden-1.5.60.tar.gz
cd xcrysden-1.5.60
#------------------------------------------------------------------------
# if you have a GNU make it is better to set the MAKE variable to point
# to gnu make
#------------------------------------------------------------------------
MAKE = make
#------------------------------------------------------------------------
# X-libraries & include files
#
# for STATIC compilation one should add: -lpthread
#------------------------------------------------------------------------
X_LIB = -L/usr/X11R6/lib -lXmu -lX11 -lXext
X_INCDIR = -I/usr/X11R6/include
#-Possibility-2-----------------------------------------------------------
#
# XCRYSDEN package may contain the tcl, tk & Mesa sources !!!
# If you would like to compile and use these then uncomment below lines and
# comment lines "Possibility-1" (see above).
#
#------------------------------------------------------------------------
COMPILE_TCLTK = yes
COMPILE_MESA = yes
#
# #
# # Do we want a shared library version of Tcl/Tk/Mesa or static?
# # If we want shared then set the following flags to: --enable-shared
# # else set the following flag to: --disable-shared
# #
TCLTK_OPTIONS = --enable-shared
MESA_TARGET = linux
#
# #
# # Libraries (dynamic loading)
# # for shared linking the libraries postfix should be .so
# # for static linking the libraries postfix should be .a
# #
TCL_LIB = -L$(TOPDIR)/external/lib -ltcl$(TCL_VER2)
TK_LIB = -L$(TOPDIR)/external/lib -ltk$(TCL_VER2)
GLU_LIB = -L$(TOPDIR)/external/lib -lGLU
GL_LIB = -L$(TOPDIR)/external/lib -lGL
FFTW3_LIB = -lfftw3
#
# #
# # Include directories
# #
TCL_INCDIR = -I$(TOPDIR)/external/src/tcl$(TCL_VER3)/generic
TK_INCDIR = -I$(TOPDIR)/external/src/tk$(TCL_VER3)/generic
GL_INCDIR = -I$(TOPDIR)/external/include