Difference between revisions of "Autotools"
From HCL
(→Configured headers) |
(→Libraries) |
||
Line 12: | Line 12: | ||
* library: static <code>lib_LIBRARIES = library.a</code> or dynamic <code>lib_LTLIBRARIES = library.la</code> | * library: static <code>lib_LIBRARIES = library.a</code> or dynamic <code>lib_LTLIBRARIES = library.la</code> | ||
* sources (internal C data structures and C++ template classes): <code>library_X_SOURCES = library.h ...</code>, where <code>X</code> = <code>a</code> or <code>la</code> | * sources (internal C data structures and C++ template classes): <code>library_X_SOURCES = library.h ...</code>, where <code>X</code> = <code>a</code> or <code>la</code> | ||
− | ** <code>library.h</code> is a [http://en.wikipedia.org/wiki/Precompiled_header precompiled header] (contains common headers and symbols), which is to be included in most of source files of the library | + | ** <code>library.h</code> is like a [http://en.wikipedia.org/wiki/Precompiled_header precompiled header] (contains common headers and symbols), which is to be included in most of source files of the library (there is no need in real precompiled headers for small projects in C) |
For example, http://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/benchmarks/Makefile.am | For example, http://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/benchmarks/Makefile.am |
Revision as of 17:07, 16 February 2010
http://en.wikipedia.org/wiki/Autoconf
http://sources.redhat.com/autobook/autobook/autobook.html
Manuals
- http://www.gnu.org/software/autoconf/manual/index.html
- http://www.gnu.org/software/automake/manual/index.html
- http://www.gnu.org/software/libtool/manual/index.html
Libraries
- includes (for the include directory):
include_HEADERS = ...
- library: static
lib_LIBRARIES = library.a
or dynamiclib_LTLIBRARIES = library.la
- sources (internal C data structures and C++ template classes):
library_X_SOURCES = library.h ...
, whereX
=a
orla
-
library.h
is like a precompiled header (contains common headers and symbols), which is to be included in most of source files of the library (there is no need in real precompiled headers for small projects in C)
-
For example, http://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/benchmarks/Makefile.am
Configured headers
Configured headers (created from *.h.in) must not be included into the package, that is include_HEADERS
or *_SOURCES
-
nodist_include_HEADERS = *.h
for the configured headers as includes -
nodist_*_SOURCES = *.h
orBUILT_SOURCES = *.h
for the configured headers as sources
For example, http://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/collectives/Makefile.am
Extra files
To add extra files into package, use EXTRA_DIST = *
.
For example, http://hcl.ucd.ie/repos/CPM/trunk/MPIBlib/tools/Makefile.am