Before giving a full exposition of all the features available through the standard Makefile, it will be useful to give a simple example. The most common situation for a developer is that he/she would like to add a new standalone compiled task to an existing (probably mission-specific) component. If this is the reader's need, understanding this example should suffice, and there will be no need for a deeper understanding of the more general options which are available.
Note that when using a standard HEASOFT installation, a Makefile generator utility ("hdmk") is available for use on the command line. hdmk prompts the developer for some basic information and then scans the current directory for source code files (.c, .cxx, .f90, etc.), scripts, parameter files, (.par), and help files (.html, .txt) which it uses to put together a first attempt ("Makefile.new").