[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.14.3.1 How the Linker is Chosen
When a program or library mixes several languages, Automake choose the linker according to the following priorities. (The names in parentheses are the variables containing the link command.)
-
Native Java (
GCJLINK
) -
Objective C++ (
OBJCXXLINK
) -
C++ (
CXXLINK
) -
Fortran 77 (
F77LINK
) -
Fortran (
FCLINK
) -
Objective C (
OBJCLINK
) -
Unified Parallel C (
UPCLINK
) -
C (
LINK
)
For example, if Fortran 77, C and C++ source code is compiled
into a program, then the C++ linker will be used. In this case, if the
C or Fortran 77 linkers required any special libraries that weren’t
included by the C++ linker, then they must be manually added to an
_LDADD
or _LIBADD
variable by the user writing the
‘Makefile.am’.
Automake only looks at the file names listed in ‘_SOURCES’
variables to choose the linker, and defaults to the C linker.
Sometimes this is inconvenient because you are linking against a
library written in another language and would like to set the linker
more appropriately. See section Libtool Convenience Libraries, for a
trick with nodist_EXTRA_…_SOURCES
.
A per-target _LINK
variable will override the above selection.
Per-target link flags will cause Automake to write a per-target
_LINK
variable according to the language chosen as above.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 25, 2014 using texi2html 5.0.