Skip to main content

Come analyze HEASARC, IRSA, and MAST data in the cloud! The Fornax Initiative is now welcoming all interested beta users.

Xspec Home Page

Third-Party Libraries In Local Models Build

The Makefile that initpackage creates for building your local models library is based on the template file

heasoft-[ver]/Xspec/src/tools/initpackage/xspackage.tmpl
If you need to add a path to a third-party library's header files, add:
-I/path/to/your/3rdParty/library/include
to the HD_CXXFLAGS setting. Then type hmake and hmake install from the
heasoft-[ver]/Xspec/src/tools/initpackage
directory.

To make sure the linker pulls in the library on Mac OS X further edit the xspackage.tmpl file by adding a “-l” flag for the library (e.g. -lgsl) in the HD_SHLIB_LIBS settings. Then reinstall xspackage.tmpl as mentioned above. On Linux/Unix the XSPEC executable itself should be relinked with the new library included. So, edit the file

heasoft-[ver]/Xspec/src/main/Makefile
by adding a “-l” flag for the library to the HD_CXXLIBS setting. Then from the same directory do:
rm xspec
hmake local
hmake publish
hmake install
After these modifications, you should be able to use initpackage and lmod in the normal way to build and load your local models library.