2003-11-22 19:36:58 +03:00
|
|
|
# -*- makefile -*-
|
2004-01-07 18:07:14 +03:00
|
|
|
# $HEADER$
|
2003-11-22 19:36:58 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
include $(top_srcdir)/config/Makefile.options
|
|
|
|
|
2004-03-17 23:44:54 +03:00
|
|
|
libs = $(top_builddir)/src/libmpi.la
|
2004-01-12 10:09:31 +03:00
|
|
|
|
2003-11-22 19:36:58 +03:00
|
|
|
# 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.
|
|
|
|
|
2004-01-12 10:09:31 +03:00
|
|
|
AM_CPPFLAGS = \
|
2004-06-07 19:33:53 +04:00
|
|
|
-DOMPI_PREFIX="\"$(prefix)\"" \
|
|
|
|
-DOMPI_INCDIR="\"$(includedir)\"" \
|
|
|
|
-DOMPI_LIBDIR="\"$(libdir)\""
|
2004-01-12 10:09:31 +03:00
|
|
|
|
|
|
|
bin_PROGRAMS = mpicc mpic++ mpif77 mpif90
|
|
|
|
|
|
|
|
# We unfortunately can't make a library for the common sources because
|
|
|
|
# making a library of C++ sources is not standardized. :-( We also
|
|
|
|
# can't just list the same .cc files in multiple targets, because some
|
|
|
|
# C++ compilers will actually compile them multiple times (i.e., once
|
|
|
|
# for each target). This results in a timestamp for wrap.o being
|
|
|
|
# later than already-finished targets (e.g., when wrap.o may end up
|
|
|
|
# with a timestamp before mpif77, but after mpicc). So we have to sym
|
|
|
|
# link the common sources to unique names for each wrapper compiler
|
|
|
|
# and let them effectively be compiled once for each wrapper.
|
|
|
|
|
|
|
|
EXTRA_DIST = wrap.cc wrap_engine.cc
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
mpicc_SOURCES = mpicc.cc wrap_cc.cc wrap_engine_cc.cc ompi_wrap.h
|
|
|
|
mpicc_LDADD = $(libs) $(LIBOMPI_EXTRA_LIBS)
|
|
|
|
mpicc_LDFLAGS = $(LIBOMPI_EXTRA_LDFLAGS)
|
2004-01-12 10:09:31 +03:00
|
|
|
mpicc_DEPENDENCIES = $(libs)
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
mpic___SOURCES = mpicxx.cc wrap_cxx.cc wrap_engine_cxx.cc ompi_wrap.h
|
|
|
|
mpic___LDADD = $(libs) $(LIBOMPI_EXTRA_LIBS)
|
|
|
|
mpic___LDFLAGS = $(LIBOMPI_EXTRA_LDFLAGS)
|
2004-01-12 10:09:31 +03:00
|
|
|
mpic___DEPENDENCIES = $(libs)
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
mpif77_SOURCES = mpif77.cc wrap_f77.cc wrap_engine_f77.cc ompi_wrap.h
|
|
|
|
mpif77_LDADD = $(libs) $(LIBOMPI_EXTRA_LIBS)
|
|
|
|
mpif77_LDFLAGS = $(LIBOMPI_EXTRA_LDFLAGS)
|
2004-01-12 10:09:31 +03:00
|
|
|
mpif77_DEPENDENCIES = $(libs)
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
mpif90_SOURCES = mpif90.cc wrap_f90.cc wrap_engine_f90.cc ompi_wrap.h
|
|
|
|
mpif90_LDADD = $(libs) $(LIBOMPI_EXTRA_LIBS)
|
|
|
|
mpif90_LDFLAGS = $(LIBOMPI_EXTRA_LDFLAGS)
|
2004-01-12 10:09:31 +03:00
|
|
|
mpif90_DEPENDENCIES = $(libs)
|
2003-11-22 19:36:58 +03:00
|
|
|
|
2004-01-12 10:09:31 +03:00
|
|
|
# Make the sym links
|
|
|
|
|
|
|
|
wrap_cc.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap.cc wrap_cc.cc
|
|
|
|
wrap_engine_cc.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap_engine.cc wrap_engine_cc.cc
|
|
|
|
wrap_cxx.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap.cc wrap_cxx.cc
|
|
|
|
wrap_engine_cxx.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap_engine.cc wrap_engine_cxx.cc
|
|
|
|
wrap_f77.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap.cc wrap_f77.cc
|
|
|
|
wrap_engine_f77.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap_engine.cc wrap_engine_f77.cc
|
|
|
|
wrap_f90.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap.cc wrap_f90.cc
|
|
|
|
wrap_engine_f90.cc:
|
|
|
|
ln -s $(top_srcdir)/src/tools/wrappers/wrap_engine.cc wrap_engine_f90.cc
|
|
|
|
|
|
|
|
# Since this is C++ and we use templates (the STL), also ditch the
|
|
|
|
# template repository directory
|
|
|
|
|
|
|
|
clean-local:
|
2004-06-07 19:33:53 +04:00
|
|
|
test -z "$(OMPI_CXX_TEMPLATE_REPOSITORY)" || $(RM) -rf $(OMPI_CXX_TEMPLATE_REPOSITORY)
|
2004-01-12 10:09:31 +03:00
|
|
|
rm -f wrap_cc.cc wrap_engine_cc.cc
|
|
|
|
rm -f wrap_cxx.cc wrap_engine_cxx.cc
|
|
|
|
rm -f wrap_f77.cc wrap_engine_f77.cc
|
|
|
|
rm -f wrap_f90.cc wrap_engine_f90.cc
|
|
|
|
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
# Per bug 476, the "wipe" command is now "ompi_wipe". So that we don't
|
2004-01-12 10:09:31 +03:00
|
|
|
# break backwards compatability, we provide sym link names to the old
|
2004-06-07 19:33:53 +04:00
|
|
|
# names (i.e., ompi_wipe -> wipe). However, we provide a
|
2004-01-12 10:09:31 +03:00
|
|
|
# --disable-deprecated-executable-names option that will disable this
|
|
|
|
# behavior. Someday, we'll change the default and the option will
|
|
|
|
# become --enable-deprecated-executable-names.
|
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
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
|
|
|
|
else
|
|
|
|
uninstall-local:
|
|
|
|
rm -f $(DESTDIR)$(bindir)/hcc \
|
|
|
|
$(DESTDIR)$(bindir)/hcp \
|
|
|
|
$(DESTDIR)$(bindir)/hf77
|
|
|
|
endif
|
2004-01-12 11:08:20 +03:00
|
|
|
#
|
|
|
|
# Adding this to make sure that make install does not fail.
|
|
|
|
# install-exec-hook needs to be defined or else make install
|
|
|
|
# fails quoting that there is not target called
|
|
|
|
# install-exec-hook if WANT_DEPRECATED_EXECUTABLE_NAMES is
|
|
|
|
# false.
|
|
|
|
else
|
|
|
|
install-exec-hook:
|
|
|
|
uninstall-local:
|
2004-01-12 10:09:31 +03:00
|
|
|
endif
|