Next: Macros Pertaining To Installation
Up: Standard Macros
Previous: Macros Pertaining To Tasks
Contents
The standard Makefile provides direct support for building
shared and/or static libraries which have source files in C,
C++ and/or Fortran. The following family of macros controls
this process:
- HD_LIBRARY_ROOT: The root name of the library, without
the prefix lib and without any suffix. For example, to build
libmylib.so this macro would be simply mylib.
- HD_LIBRARY_SRC_c: A list of C source files with the
suffix .c.
- HD_LIBRARY_SRC_C: A list of C++ source files with the
suffix .C.
- HD_LIBRARY_SRC_cc: A list of C++ source files with the
suffix .cc.
- HD_LIBRARY_SRC_cpp: A list of C++ source files with the
suffix .cpp.
- HD_LIBRARY_SRC_cxx: A list of C++ source files with the
suffix .cxx.
- HD_LIBRARY_SRC_f: A list of Fortran 77 source files
with the suffix .f.
- HD_LIBRARY_SRC_f90: A list of Fortran 90/95 source files
with the suffix .f90.
- HD_LIBRARY_SRC_f03: A list of Fortran 03 source files
with the suffix .f03.
At least one of the source macros must contain at least one
file if the HD_LIBRARY_ROOT macro is defined. With these
macros properly defined, the standard Makefile will build
the library as part of the default target. First all the
source files listed in the source macros will be compiled,
then they will be placed into the relevant shared or static
library.
Next: Macros Pertaining To Installation
Up: Standard Macros
Previous: Macros Pertaining To Tasks
Contents
Bryan Irby
2018-06-27