GNU Astronomy Utilities

11.1 Loading the Gnuastro Make functions

To load Gnuastro’s Make functions in your Makefile, you should use the load command of GNU Make in your Makefile. The load command should be given Gnuastro’s dynamic library, which has been specifically written for being called by GNU Make. The generic command looks like this (the /PATH/TO part should be changed):

load /PATH/TO/lib/

Here are the possible replacements of the /PATH/TO component:


If you installed Gnuastro from source and did not use the --prefix option at configuration time, you should use this base directory.


If you installed Gnuastro through your operating system’s package manager, it is highly likely that Gnuastro’s library is here.


If you installed Gnuastro from source, but used --prefix to install Gnuastro in your home directory (as described in Installation directory).

If you cannot find in the locations above, the command below should give you its location. It assumes that the libraries are in the same base directory as the programs (which is usually the case).

$ which astfits | sed -e's|bin/astfits|lib/|'