next up previous contents
Next: Simplest case: A Makefile Up: HEADAS Makefiles Previous: HEADAS Makefiles   Contents

Introduction

HEADAS Makefiles are designed so that the most common steps needed to build and install software can be accomplished with minimal effort, but the flexibility exists to override and extend standard behavior. This is accomplished by including a "standard Makefile" in every HEADAS Makefile. In this way, developers can perform most functions simply by filling in definitions for a standard set of macros before the standard Makefile is included. Most of the time, there is no need to add explicit targets. In fact, explicit targets should be avoided whenever possible because it increases the possibility for breakage if/when the standard Makefile is changed.

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").


next up previous contents
Next: Simplest case: A Makefile Up: HEADAS Makefiles Previous: HEADAS Makefiles   Contents
Bryan Irby 2018-06-27