Automake

by Daniel Pimentel — Tue 07 July 2015

Automake is a tool for automatically generating Makefile.ins from files called Makefile.am. Each Makefile.am is basically a series of make variable definitions1, with rules being thrown in occasionally. The generated Makefile.ins are compliant with the GNU Makefile standards.

Makefile.am

SUBDIRS = src
dist_doc_DATA = README

src/Makefile.am

bin_PROGRAMS = hello
hello_SOURCES = main.c

configure.ac

AC_INIT([amhello], [1.0], [bug-automake@gnu.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
 Makefile
 src/Makefile
])
AC_OUTPUT

Running

autoreconf --install
GNU Automake
2000-2016 by Daniel Pimentel under GFDL