Set the environment variable LMODDIR to the directory in which you have placed the lmodel.dat and source code files then cd to $XANADU/spectral/xspec/src and type xmake.