1## 2## Copyright (C) by Argonne National Laboratory 3## See COPYRIGHT in top-level directory 4## 5 6external_subdirs = @mpl_srcdir@ 7external_dist_subdirs = @mpl_dist_srcdir@ 8external_includes = @mpl_includedir@ 9external_ldflags = @mpl_libdir@ 10external_libs = @mpl_lib@ @WRAPPER_LIBS@ 11 12bin_PROGRAMS = 13noinst_HEADERS = 14DISTCLEANFILES = 15EXTRA_DIST = 16SUFFIXES = 17doc1_src_txt = 18 19ACLOCAL_AMFLAGS = -I confdb -I tools/topo/hwloc/hwloc/config 20AM_CPPFLAGS = -I$(top_srcdir)/include $(external_includes) 21AM_CFLAGS = 22 23noinst_HEADERS += include/hydra.h include/hydra_server.h 24 25EXTRA_DIST += autogen.sh 26 27noinst_LTLIBRARIES = libhydra.la 28libhydra_la_SOURCES = 29 30# The below directories contribute to libhydra 31include utils/Makefile.mk 32include tools/Makefile.mk 33include pm/Makefile.mk 34include ui/Makefile.mk 35 36# External subdirs should be built first, as we might depend on them 37SUBDIRS = ${external_subdirs} . 38# see note in MPICH Makefile.am about our usage of DIST_SUBDIRS 39DIST_SUBDIRS = ${external_dist_subdirs} 40 41# Provide an alias for mpirun to support tools that assume that 42# mpiexec is called mpirun 43install-exec-hook: 44 if [ -x ${DESTDIR}${bindir}/@MPIEXEC_HYDRA_NAME@ ] ; then \ 45 cd ${DESTDIR}${bindir} && ln -f -s @MPIEXEC_HYDRA_NAME@ @MPIEXEC_NAME@ ; \ 46 cd ${DESTDIR}${bindir} && ln -f -s @MPIEXEC_HYDRA_NAME@ @MPIRUN_NAME@ ; \ 47 fi 48 49# A special alternate installation target when using multiple process 50# managers; this is basically the install target, but without the 51# install-exec-hook 52install-alt: $(bin_PROGRAMS) 53 @for foo in $? ; do $(MAKE) install $$foo ; done 54 55uninstall-local: 56 rm -f ${DESTDIR}${bindir}/@MPIRUN_NAME@ ${DESTDIR}${bindir}/@MPIEXEC_NAME@ 57 58# -------------------------------------------------------------------------- 59#.PHONY: mandoc mandoc-local htmldoc htmldoc-local 60SUFFIXES += .man-phony .html-phony .man1-phony .html1-phony .txt 61 62# "make V=1" support for our documentation recipes 63doctextman_verbose = $(doctextman_verbose_$(V)) 64doctextman_verbose_ = $(doctextman_verbose_$(AM_DEFAULT_VERBOSITY)) 65doctextman_verbose_0 = @echo " DOCTEXTMAN " $@; 66doctexthtml_verbose = $(doctexthtml_verbose_$(V)) 67doctexthtml_verbose_ = $(doctexthtml_verbose_$(AM_DEFAULT_VERBOSITY)) 68doctexthtml_verbose_0 = @echo " DOCTEXTHTML " $@; 69 70# Build dir paths where the man pages will be created. Will usually be 71# overridden by MPICH make. 72mandoc_path1=${DESTDIR}${sharedir}/man/man1 73mandoc_path3=${DESTDIR}${sharedir}/man/man3 74htmldoc_path1=${DESTDIR}${sharedir}/www/www1 75htmldoc_path3=${DESTDIR}${sharedir}/www/www3 76doctext_docnotes= 77 78.c.man-phony: 79 $(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path3) -ext 3 \ 80 -heading HYDRA -quotefmt $(doctext_docnotes) $< 81.c.html-phony: 82 $(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path3) \ 83 -heading HYDRA -quotefmt $(doctext_docnotes) $< 84 85.txt.man1-phony: 86 $(doctextman_verbose)$(DOCTEXT) -man -mpath $(mandoc_path1) -ext 1 \ 87 -heading HYDRA -quotefmt $(doctext_docnotes) $< 88.txt.html1-phony: 89 $(doctexthtml_verbose)$(DOCTEXT) -html -mpath $(htmldoc_path1) \ 90 -heading HYDRA -quotefmt $(doctext_docnotes) $< 91 92# use mandoc-local target to force directory creation before running DOCTEXT 93mandoc: 94 test -d $(mandoc_path1) || $(MKDIR_P) $(mandoc_path1) 95 test -d $(mandoc_path3) || $(MKDIR_P) $(mandoc_path3) 96 $(MAKE) $(AM_MAKEFLAGS) mandoc-local 97mandoc-local: $(doc1_src_txt:.txt=.man1-phony) 98 99# use htmldoc-local target to force directory creation before running DOCTEXT 100htmldoc: 101 if test "@DOXYGEN@" != "" ; then @DOXYGEN@ hydra-doxygen.cfg ; fi 102 test -d $(top_builddir)/www/www1 || $(MKDIR_P) $(top_builddir)/www/www1 103 test -d $(top_builddir)/www/www3 || $(MKDIR_P) $(top_builddir)/www/www3 104 $(MAKE) $(AM_MAKEFLAGS) htmldoc-local 105htmldoc-local: $(doc1_src_txt:.txt=.man1-phony) 106 107# created by confdb/aclocal_cache.m4 108DISTCLEANFILES += config.system 109 110# -------------------------------------------------------------------------- 111.PHONY: coverage 112gcov_sources = $(libmpl_la_SOURCES) 113# assumes that these sources were compiled appropriately ("-fprofile-arcs" 114# and "-ftest-coverage") 115coverage: 116 @for file in $(gcov_sources) ; do \ 117 dir=`dirname $$file` ; \ 118 bname=`basename $$file` ; \ 119 aux=`echo $$bname | sed -e 's,\.*$$,,'` ; \ 120 echo "( $(GCOV) -b -f -o $$file $$file && mv $${bname}.gcov $$dir )" ; \ 121 ( $(GCOV) -b -f -o $$file $$file && mv $${bname}.gcov $$dir ) ; \ 122 rm -f *.gcov ; \ 123 done 124## we don't recurse into SUBDIRS in hydra, since they are only really 125## external packages like hwloc 126## for subdir in $(SUBDIRS) ; do \ 127## ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) coverage ) ; \ 128## done 129# -------------------------------------------------------------------------- 130 131