|
Packit Service |
c5cf8c |
# -*- Mode: Makefile; -*-
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# (C) 2011 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
# See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
## TODO: need to write an automakefile that handles two primary cases:
|
|
Packit Service |
c5cf8c |
## 1) that ROMIO is being embedded within the MPI library, as in MPICH or Open
|
|
Packit Service |
c5cf8c |
## MPI
|
|
Packit Service |
c5cf8c |
## 2) that ROMIO is being built standalone, old-school style. This case is
|
|
Packit Service |
c5cf8c |
## basically unused in modern practice.
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# help autoreconf and friends realize where the macros live
|
|
Packit Service |
c5cf8c |
ACLOCAL_AMFLAGS = -I confdb
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# empty variable initializations so that later code can append (+=)
|
|
Packit Service |
c5cf8c |
include_HEADERS =
|
|
Packit Service |
c5cf8c |
nodist_include_HEADERS =
|
|
Packit Service |
c5cf8c |
noinst_HEADERS =
|
|
Packit Service |
c5cf8c |
AM_CFLAGS = @VISIBILITY_CFLAGS@
|
|
Packit Service |
c5cf8c |
AM_CPPFLAGS =
|
|
Packit Service |
c5cf8c |
EXTRA_DIST =
|
|
Packit Service |
c5cf8c |
SUFFIXES =
|
|
Packit Service |
c5cf8c |
doc1_src_txt =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
external_subdirs = @mpl_srcdir@
|
|
Packit Service |
c5cf8c |
external_dist_subdirs = @mpl_dist_srcdir@
|
|
Packit Service |
c5cf8c |
external_includes = @mpl_includedir@
|
|
Packit Service |
c5cf8c |
external_ldflags = @mpl_libdir@
|
|
Packit Service |
c5cf8c |
external_libs = @mpl_lib@
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# ------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# variables to be populated by the included Makefile.mk fragments:
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# These are files that contain MPI routines (e.g., MPI_File_open).
|
|
Packit Service |
c5cf8c |
# In MPICH these will have an MPI_ and a PMPI_ version. Other implementations
|
|
Packit Service |
c5cf8c |
# (like OMPI) only want these to be MPI_ routines, possibly with some
|
|
Packit Service |
c5cf8c |
# name-shifting prefix.
|
|
Packit Service |
c5cf8c |
romio_mpi_sources =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# regular old source files that implement ROMIO, such as ADIO code
|
|
Packit Service |
c5cf8c |
romio_other_sources =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# code that may need to be "up" called from the MPI library and/or is
|
|
Packit Service |
c5cf8c |
# MPI-implementation-specific in some way
|
|
Packit Service |
c5cf8c |
glue_sources =
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# ------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# when building under MPICH we must be able to find mpi.h
|
|
Packit Service |
c5cf8c |
AM_CPPFLAGS += $(MPI_H_INCLUDE)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# ------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# handle the "include" directory here
|
|
Packit Service |
c5cf8c |
AM_CPPFLAGS += -I$(top_builddir)/include -I$(top_srcdir)/include $(external_includes)
|
|
Packit Service |
c5cf8c |
# nodist_ b/c these are created by config.status and should not be distributed
|
|
Packit Service |
c5cf8c |
nodist_include_HEADERS += include/mpio.h include/mpiof.h
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# ------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
SUBDIRS = $(external_subdirs)
|
|
Packit Service |
c5cf8c |
DIST_SUBDIRS = test test-internal $(external_dist_subdirs)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# for the sake of parallel make and avoiding an excessive number of convenience
|
|
Packit Service |
c5cf8c |
# libs, we use a subdir automake fragment strategy
|
|
Packit Service |
c5cf8c |
include mpi-io/Makefile.mk
|
|
Packit Service |
c5cf8c |
include adio/Makefile.mk
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
EXTRA_DIST += autogen.sh
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if BUILD_ROMIO_EMBEDDED
|
|
Packit Service |
c5cf8c |
# Build a libtool convenience library that the enclosing MPI implementation can
|
|
Packit Service |
c5cf8c |
# use by adding it to the right _LIBADD variable.
|
|
Packit Service |
c5cf8c |
noinst_LTLIBRARIES = libromio.la
|
|
Packit Service |
c5cf8c |
libromio_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
## NOTE: ROMIO's old build system builds a bunch of _foo.o objects that contain
|
|
Packit Service |
c5cf8c |
## PMPI_ implementations as well as calls to only other PMPI routines. In
|
|
Packit Service |
c5cf8c |
## MPICH, these are the objects that need to go into libmpi, while the foo.o
|
|
Packit Service |
c5cf8c |
## objects should go into libpmpi. Furthermore, the -D option for ROMIO's
|
|
Packit Service |
c5cf8c |
## source files is different and inverted (in the boolean sense) compared with
|
|
Packit Service |
c5cf8c |
## MPICH's defintion. And ROMIO was dumping all of the symbols into the main
|
|
Packit Service |
c5cf8c |
## libmpi library, regardless of the separate profiling library's existence.
|
|
Packit Service |
c5cf8c |
##
|
|
Packit Service |
c5cf8c |
## Annoying, right?
|
|
Packit Service |
c5cf8c |
if BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
# The current best strategy for now is to build the PMPI symbols as a separate
|
|
Packit Service |
c5cf8c |
# convenience lib to permit adding the special "-D..." argument for all objects.
|
|
Packit Service |
c5cf8c |
# MPICH will then link in both convenience library into libmpi, since it
|
|
Packit Service |
c5cf8c |
# won't work very well the other way around.
|
|
Packit Service |
c5cf8c |
noinst_LTLIBRARIES += libpromio.la
|
|
Packit Service |
c5cf8c |
libpromio_la_SOURCES = $(romio_mpi_sources)
|
|
Packit Service |
c5cf8c |
libpromio_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPIO_BUILD_PROFILING
|
|
Packit Service |
c5cf8c |
libpromio_la_LDFLAGS = $(external_ldflags)
|
|
Packit Service |
c5cf8c |
libpromio_la_LIBADD = $(external_libs)
|
|
Packit Service |
c5cf8c |
else !BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
libromio_la_LDFLAGS = $(external_ldflags)
|
|
Packit Service |
c5cf8c |
libromio_la_LIBADD = $(external_libs)
|
|
Packit Service |
c5cf8c |
endif !BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
else !BUILD_ROMIO_EMBEDDED
|
|
Packit Service |
c5cf8c |
lib_LTLIBRARIES = libromio.la
|
|
Packit Service |
c5cf8c |
libromio_la_SOURCES = $(romio_mpi_sources) $(romio_other_sources) $(glue_sources)
|
|
Packit Service |
c5cf8c |
if BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
libpromio_la_SOURCES = $(romio_mpi_sources)
|
|
Packit Service |
c5cf8c |
libpromio_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPIO_BUILD_PROFILING
|
|
Packit Service |
c5cf8c |
endif BUILD_PROFILING_LIB
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
.PHONY: coverage
|
|
Packit Service |
c5cf8c |
gcov_sources = $(libmpl_la_SOURCES)
|
|
Packit Service |
c5cf8c |
# assumes that these sources were compiled appropriately ("-fprofile-arcs"
|
|
Packit Service |
c5cf8c |
# and "-ftest-coverage")
|
|
Packit Service |
c5cf8c |
coverage:
|
|
Packit Service |
c5cf8c |
@for file in $(gcov_sources) ; do \
|
|
Packit Service |
c5cf8c |
dir=`dirname $$file` ; \
|
|
Packit Service |
c5cf8c |
bname=`basename $$file` ; \
|
|
Packit Service |
c5cf8c |
aux=`echo $$bname | sed -e 's,\.*$$,,'` ; \
|
|
Packit Service |
c5cf8c |
echo "( $(GCOV) -b -f -o $$file $$file && mv $${bname}.gcov $$dir )" ; \
|
|
Packit Service |
c5cf8c |
( $(GCOV) -b -f -o $$file $$file && mv $${bname}.gcov $$dir ) ; \
|
|
Packit Service |
c5cf8c |
rm -f *.gcov ; \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
for subdir in $(SUBDIRS) - ; do \
|
|
Packit Service |
c5cf8c |
if test $$subdir = "-" ; then break ; fi ; \
|
|
Packit Service |
c5cf8c |
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) coverage ) ; \
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
.PHONY: mandoc mandoc-local htmldoc htmldoc-local
|
|
Packit Service |
c5cf8c |
SUFFIXES += .man-phony .html-phony .man1-phony .html1-phony .txt
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# "make V=1" support for our documentation recipes
|
|
Packit Service |
c5cf8c |
doctextman_verbose = $(doctextman_verbose_$(V))
|
|
Packit Service |
c5cf8c |
doctextman_verbose_ = $(doctextman_verbose_$(AM_DEFAULT_VERBOSITY))
|
|
Packit Service |
c5cf8c |
doctextman_verbose_0 = @echo " DOCTEXTMAN " $@;
|
|
Packit Service |
c5cf8c |
doctexthtml_verbose = $(doctexthtml_verbose_$(V))
|
|
Packit Service |
c5cf8c |
doctexthtml_verbose_ = $(doctexthtml_verbose_$(AM_DEFAULT_VERBOSITY))
|
|
Packit Service |
c5cf8c |
doctexthtml_verbose_0 = @echo " DOCTEXTHTML " $@;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Build dir paths where the man pages will be created. Will usually be
|
|
Packit Service |
c5cf8c |
# overridden by MPICH make.
|
|
Packit Service |
c5cf8c |
mandoc_path1=$(abs_top_builddir)/man/man1
|
|
Packit Service |
c5cf8c |
mandoc_path3=$(abs_top_builddir)/man/man3
|
|
Packit Service |
c5cf8c |
htmldoc_path1=$(abs_top_builddir)/www/www1
|
|
Packit Service |
c5cf8c |
htmldoc_path3=$(abs_top_builddir)/www/www3
|
|
Packit Service |
c5cf8c |
doctext_docnotes=
|
|
Packit Service |
c5cf8c |
# Provide an easily replaced url root for the generated index file.
|
|
Packit Service |
c5cf8c |
# You can override this with URL desired in the index file generated by doctext.
|
|
Packit Service |
c5cf8c |
# You can ignore this if you don't use mapnames or tohtml to add links
|
|
Packit Service |
c5cf8c |
# to the MPI manual pages to documents.
|
|
Packit Service |
c5cf8c |
htmldoc_root3="--your-url-here--"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.c.man-phony:
|
|
Packit Service |
c5cf8c |
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
.c.html-phony:
|
|
Packit Service |
c5cf8c |
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation \
|
|
Packit Service |
c5cf8c |
-index $(htmldoc_path3)/mpi.cit -indexdir $(htmldoc_root3) \
|
|
Packit Service |
c5cf8c |
$(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.txt.man1-phony:
|
|
Packit Service |
c5cf8c |
$(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path1) -ext 1 \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
.txt.html1-phony:
|
|
Packit Service |
c5cf8c |
$(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path1) \
|
|
Packit Service |
c5cf8c |
-heading MPI -quotefmt -nolocation $(doctext_docnotes) $<
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# use mandoc-local target to force directory creation before running DOCTEXT
|
|
Packit Service |
c5cf8c |
mandoc:
|
|
Packit Service |
c5cf8c |
test -d $(mandoc_path1) || $(MKDIR_P) $(mandoc_path1)
|
|
Packit Service |
c5cf8c |
test -d $(mandoc_path3) || $(MKDIR_P) $(mandoc_path3)
|
|
Packit Service |
c5cf8c |
$(MAKE) $(AM_MAKEFLAGS) mandoc-local
|
|
Packit Service |
c5cf8c |
mandoc-local: $(romio_mpi_sources:.c=.man-phony) $(doc1_src_txt:.txt=.man1-phony)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# use htmldoc-local target to force directory creation before running DOCTEXT
|
|
Packit Service |
c5cf8c |
htmldoc:
|
|
Packit Service |
c5cf8c |
test -d $(top_builddir)/www/www1 || $(MKDIR_P) $(top_builddir)/www/www1
|
|
Packit Service |
c5cf8c |
test -d $(top_builddir)/www/www3 || $(MKDIR_P) $(top_builddir)/www/www3
|
|
Packit Service |
c5cf8c |
$(MAKE) $(AM_MAKEFLAGS) htmldoc-local
|
|
Packit Service |
c5cf8c |
htmldoc-local: $(romio_mpi_sources:.c=.html-phony) $(doc1_src_txt:.txt=.html1-phony)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# --------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# sometimes helpful when debugging macros to see the preprocessed output.
|
|
Packit Service |
c5cf8c |
# Also using '-CC' because comments provide useful landmarks
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
SUFFIXES += .i
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
.c.i:
|
|
Packit Service |
c5cf8c |
$(COMPILE) -CC -E -o $@ $<
|
|
Packit Service |
c5cf8c |
|