configure.info: Write Makefile.am
Go forward to Write acconfig.h
Go backward to Write configure.in
Go up to Getting Started
Go to the top op configure
Write Makefile.am
You must write the file `Makefile.am'. This is an automake input
file, and the automake manual describes in detail what this file should
look like.
The automake commands in `Makefile.am' mostly look like variable
assignments in a `Makefile'. automake recognizes special variable
names, and automatically add make rules to the output as needed.
There will be one `Makefile.am' file for each directory in your
package. For each directory with subdirectories, the `Makefile.am'
file should contain the line
SUBDIRS = DIR DIR ...
where each DIR is the name of a subdirectory.
For each `Makefile.am', there should be a corresponding `Makefile'
in the `AC_OUTPUT' macro in `configure.in'.
Every `Makefile.am' written at Cygnus should contain the line
AUTOMAKE_OPTIONS = cygnus
This puts automake into Cygnus mode. See the automake manual for
details.
You may to include the version number of `automake' that you are
using on the `AUTOMAKE_OPTIONS' line. For example,
AUTOMAKE_OPTIONS = cygnus 1.3
This will prevent users from running an earlier version of `automake'
and perhaps getting an invalid `Makefile.in'.
If your package builds a program, then in the directory where that
program is built you will normally want a line like
bin_PROGRAMS = PROGRAM
where PROGRAM is the name of the program. You will then want a line
like
PROGRAM_SOURCES = FILE FILE ...
where each FILE is the name of a source file to link into the program
(e.g., `foo.c').
If your package builds a library, and you do not want the library to
ever be built as a shared library, then in the directory where that
library is built you will normally want a line like
lib_LIBRARIES = libNAME.a
where `libNAME.a' is the name of the library. You will then want a
line like
libNAME_a_SOURCES = FILE FILE ...
where each FILE is the name of a source file to add to the library.
If your package builds a library, and you want to permit building the
library as a shared library, then in the directory where that library is
built you will normally want a line like
lib_LTLIBRARIES = libNAME.la
The use of `LTLIBRARIES', and the `.la' extension, indicate a
library to be built using libtool. As usual, you will then want a line
like
libNAME_la_SOURCES = FILE FILE ...
The strings `bin' and `lib' that appear above in `bin_PROGRAMS' and
`lib_LIBRARIES' are not arbitrary. They refer to particular
directories, which may be set by the `--bindir' and `--libdir' options
to `configure'. If those options are not used, the default values are
based on the `--prefix' or `--exec-prefix' options to `configure'. It
is possible to use other names if the program or library should be
installed in some other directory.
The `Makefile.am' file may also contain almost anything that may
appear in a normal `Makefile'. automake also supports many other
special variables, as well as conditionals.
See the automake manual for more information.
Created Wed Sep 1 16:41:59 2004 on bee with info_to_html version 0.9.6.