# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2010-2011 Sandia National Laboratories. All rights reserved.
# Additional copyrights may follow
EXTRA_DIST = CMakeLists.txt
# We always have C bindings, but do we have profiling?
c_mpi_lib = mpi/c/libmpi_c_mpi.la
c_pmpi_lib = mpi/c/profile/libmpi_c_pmpi.la
# See if we have Fortran mpif.h MPI bindings
mpi_fortran_base_lib = mpi/fortran/base/libmpi_fortran_base.la
# Note that the ordering of "." in SUBDIRS is important: the C++,
# Fortran mpif.h, and use mpi/use mpi_f08 bindings are all in
# standalone .la files that depend on libmpi.la. So we must fully
# build libmpi.la first.
# NOTE: A handful of files in mpi/fortran/base must be included in
# libmpi.la. But we wanted to keep all the Fortran sources together
# in the same tree, so we moved those sources to a separate
# subdirectory with its own Makefile.include that is included in this
# Makefile.am (NOTE: it did *not* work to put all the files -- base
# and non-base -- into mpi/fortran/mpif-h and have both a regular
# Makefile.am for building the mpif.h bindings library and a separate
# Makefile.include that was included in this top-level Makefile.am;
# problems occurred with "make distclean" and files in the
# ompi/mpi/fortran/mpif-h/.deps directory -- it's not clear whether
# this is an AM bug or whether this behavior is simply not supported).
# This ompi/mpi/fortran/base/Makefile.include file makes a convenience
# LT library that is then sucked into libmpi.la (the
# ompi/mpi/fortran/base sources must be compiled with special
# CPPFLAGS; we can't just add the raw sources to libmpi_la_SOURCES,
# The end of the result is that libmpi.la -- including a few sources
# from mpi/fortran/base -- is fully built before the C++, mpif.h, and
# use mpi/use mpi_f08 bindings are built. Therefore, the C++, mpif.h
# and use mpi/use mpi_f08 bindings libraries can all link against
# NOTE: The ordering of this list is VERY CAREFULLY CRAFTED! Do not
# change the ordering unless you really know what you're doing. :-)
SUBDIRS = \
SUBDIRS += \
# The ordering of the DIST_SUBDIRS isn't as important, but note that
# its contents *are* different than SUBDIRS. In particular, the
# MPIEXT subdirs has a different value that is *not* equivalent to the
# union of the various $(OMPI_MPIEXT_*_DIRS) variables from SUBDIRS!
DIST_SUBDIRS = \
# Build the main MPI library
lib_LTLIBRARIES = libmpi.la
libmpi_la_LIBADD = \
libmpi_la_DEPENDENCIES = $(libmpi_la_LIBADD)
libmpi_la_LDFLAGS = \
-version-info $(libmpi_so_version) \
# included subdirectory Makefile.am's and appended-to variables
libmpi_la_SOURCES += $(headers)
# Conditionally install the header files
ompidir = $(includedir)/openmpi/$(subdir)
nobase_ompi_HEADERS = $(headers)
# Ensure that the man page directory exists before we try to make man
# page files (because ompi/mpi/man/man3 has no config.status-generated
dir_stamp = $(top_builddir)/$(subdir)/mpi/man/man3/.dir-stamp
# Also ensure that the man pages are rebuilt if the opal_config.h file
# changes (e.g., configure was run again, meaning that the release
# date or version may have changed)
$(nodist_man_MANS): $(dir_stamp) $(top_builddir)/opal/include/opal_config.h
$(MKDIR_P) `dirname $@`
# Remove the generated man pages
rm -f $(nodist_man_MANS) $(dir_stamp) mpiext/static-components.h