BuildTools

Introduction of Automake Concepts

The language of the Automake Makefile.am input files is essentially that of a usual Makefile: One can have comments (everything in a line following a “#”), set Makefile variables, and write rules.

Some of the Makefile variables in a Makefile.am file have a special meaning. For example, the SUBDIRS variable can be set to the list of directories, into which the generated Makefile should recurse.

The things that should be built, are listed in variable names that have a primary, and possibly a prefix. Typical examples are

bin_PROGRAMS = super_solver
super_solver_SOURCES = super_solver.cpp super_solver.hpp

lib_LTLIBRARIES = libgreatlib.la
libgreatlib_la_SOURCES = greatlib1.cpp greatlib1.hpp greatlib2.cpp greatlib2.hpp

include_HEADERS = ../inc/config_supersolver.h greatlib1.hpp

AM_LDFLAGS = $(LT_LDFLAGS)

The primaries in this example are the parts of the Makefile variables that are capitalized, and the prefixes are the strings before the primaries.

These are the primaries that are important for a COIN-OR project:

Automake provides the following features:

Some more important Automake Makefile variables are the following: