ed56e743b7
AM_INIT_AUTOMAKE, instead of the deprecated version. * Work around dumbness in modern AC_INIT that requires the version number to be set at autoconf time (instead of at configure time, as it was before). Set the version number, minus the subversion r number, at autoconf time. Override the internal variables to include the r number (if needed) at configure time. Basically, the right thing should always happen. The only place it might not is the version reported as part of configure --help will not have an r number. * Since AM_INIT_AUTOMAKE taks a list of options, no need to specify them in all the Makefile.am files. * Addes support for subdir-objects, meaning that object files are put in the directory containing source files, even if the Makefile.am is in another directory. This should start making it feasible to reduce the number of Makefile.am files we have in the tree, which will greatly reduce the time to run autogen and configure. This commit was SVN r7211.
131 строка
3.8 KiB
Makefile
131 строка
3.8 KiB
Makefile
#
|
|
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
# All rights reserved.
|
|
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
# All rights reserved.
|
|
# Copyright (c) 2004-2005 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$
|
|
#
|
|
# Additional copyrights may follow
|
|
#
|
|
# $HEADER$
|
|
#
|
|
|
|
|
|
|
|
# This is ugly, but we need it so that people can change things at
|
|
# "make" time (e.g., "make sysconfdir=/foo/bar all") as documented in
|
|
# autoconf.
|
|
|
|
AM_CPPFLAGS = \
|
|
-DOMPI_PREFIX="\"$(prefix)\"" \
|
|
-DOMPI_INCDIR="\"$(includedir)\"" \
|
|
-DOMPI_LIBDIR="\"$(libdir)\"" \
|
|
-DOMPI_FC_MODULE_FLAG="\"$(OMPI_FC_MODULE_FLAG)\""
|
|
|
|
if WANT_INSTALL_HEADERS
|
|
AM_CPPFLAGS += -DOMPI_WANT_DEVEL_HEADERS=1
|
|
else
|
|
AM_CPPFLAGS += -DOMPI_WANT_DEVEL_HEADERS=0
|
|
endif
|
|
|
|
EXTRA_DIST = wrap.cc wrap_engine.cc $(pkgdata_DATA)
|
|
|
|
pkgdata_DATA = help-wrapper.txt
|
|
|
|
bin_PROGRAMS = mpicc mpic++ mpif77 mpif90
|
|
|
|
libs = \
|
|
$(top_builddir)/opal/libopal.la
|
|
|
|
wrap_sources = wrap.cc wrap_engine.cc ompi_wrap.h
|
|
|
|
mpicc_SOURCES = mpicc.cc ompi_wrap.h $(wrap_sources)
|
|
mpicc_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
|
mpicc_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
|
mpicc_DEPENDENCIES = $(libs)
|
|
|
|
mpic___SOURCES = mpicxx.cc ompi_wrap.h $(wrap_sources)
|
|
mpic___LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
|
mpic___LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
|
mpic___DEPENDENCIES = $(libs)
|
|
|
|
mpif77_SOURCES = mpif77.cc ompi_wrap.h $(wrap_sources)
|
|
mpif77_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
|
mpif77_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
|
mpif77_DEPENDENCIES = $(libs)
|
|
|
|
mpif90_SOURCES = mpif90.cc ompi_wrap.h $(wrap_sources)
|
|
mpif90_LDADD = $(libs) $(LIBMPI_EXTRA_LIBS)
|
|
mpif90_LDFLAGS = $(LIBMPI_EXTRA_LDFLAGS)
|
|
mpif90_DEPENDENCIES = $(libs)
|
|
|
|
# Since this is C++ and we use templates (the STL), also ditch the
|
|
# template repository directory
|
|
|
|
clean-local:
|
|
test -z "$(OMPI_CXX_TEMPLATE_REPOSITORY)" || $(RM) -rf $(OMPI_CXX_TEMPLATE_REPOSITORY)
|
|
|
|
if WANT_DEPRECATED_EXECUTABLE_NAMES
|
|
if CASE_SENSITIVE_FS
|
|
install-exec-hook:
|
|
(cd $(DESTDIR)$(bindir); rm -f hcc; ln -s mpicc hcc)
|
|
(cd $(DESTDIR)$(bindir); rm -f hcp; ln -s mpiCC hcp)
|
|
(cd $(DESTDIR)$(bindir); rm -f hf77; ln -s mpif77 hf77)
|
|
(cd $(DESTDIR)$(bindir); rm -f mpiCC; ln -s mpic++ mpiCC)
|
|
(cd $(DESTDIR)$(bindir); rm -f mpicxx; ln -s mpic++ mpicxx)
|
|
else
|
|
install-exec-hook:
|
|
(cd $(DESTDIR)$(bindir); rm -f hcc; ln -s mpicc hcc)
|
|
(cd $(DESTDIR)$(bindir); rm -f hcp; ln -s mpic++ hcp)
|
|
(cd $(DESTDIR)$(bindir); rm -f hf77; ln -s mpif77 hf77)
|
|
(cd $(DESTDIR)$(bindir); rm -f mpicxx; ln -s mpic++ mpicxx)
|
|
endif
|
|
|
|
#
|
|
# mpiCC might be a symlink we created, so be nice....
|
|
#
|
|
if CASE_SENSITIVE_FS
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(bindir)/hcc \
|
|
$(DESTDIR)$(bindir)/hcp \
|
|
$(DESTDIR)$(bindir)/hf77 \
|
|
$(DESTDIR)$(bindir)/mpiCC \
|
|
$(DESTDIR)$(bindir)/mpicxx
|
|
else
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(bindir)/hcc \
|
|
$(DESTDIR)$(bindir)/hcp \
|
|
$(DESTDIR)$(bindir)/hf77 \
|
|
$(DESTDIR)$(bindir)/mpicxx
|
|
endif
|
|
|
|
else
|
|
#
|
|
# If we don't have deprecated names, just do the mpiCC / mpic++ stuff.
|
|
# If we are on a non-case sensitive file system, don't do anything
|
|
# with mpiCC, since that is the same as mpicc, and there is no way
|
|
# that can end good.
|
|
#
|
|
if CASE_SENSITIVE_FS
|
|
install-exec-hook:
|
|
(cd $(DESTDIR)$(bindir); rm -f mpiCC; ln -s mpic++ mpiCC)
|
|
(cd $(DESTDIR)$(bindir); rm -f mpicxx; ln -s mpic++ mpicxx)
|
|
else
|
|
install-exec-hook:
|
|
(cd $(DESTDIR)$(bindir); rm -f mpicxx; ln -s mpic++ mpicxx)
|
|
endif
|
|
|
|
if CASE_SENSITIVE_FS
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(bindir)/mpiCC \
|
|
$(DESTDIR)$(bindir)/mpicxx
|
|
else
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(bindir)/mpicxx
|
|
endif
|
|
endif
|