1## -*- Mode: Makefile; -*- 2## vim: set ft=automake : 3## 4## (C) 2011 by Argonne National Laboratory. 5## See COPYRIGHT in top-level directory. 6## 7 8## This is an automake makefile fragment that should be included by: 9## 10## include $(top_srcdir)/Makefile.mtest 11## 12## It provides a "testing" rule that uses runtests, cleanup for summary.xml, and 13## adds appropriate includes and linker flags for using the MTest framework. 14## The goal is to reduce the amount of boilerplate that needs to exist in each 15## Makefile.am 16 17# AM_CPPFLAGS are used for C++ code as well 18AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include 19LDADD = $(top_builddir)/util/mtest.o 20 21## FIXME "DEPADD" is a simplemake concept, which we can handle on a per-target 22## prog_DEPENDENCIES variable, but it would be better to figure out the right 23## way to do this 24##DEPADD = @MPILIBLOC@ $(top_builddir)/util/mtest.o 25 26$(top_builddir)/util/mtest.$(OBJEXT): $(top_srcdir)/util/mtest.c 27 (cd $(top_builddir)/util && $(MAKE) mtest.$(OBJEXT)) 28 29testing: 30 $(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist \ 31 -mpiexec=${MPIEXEC} -xmlfile=summary.xml 32 33CLEANFILES = summary.xml 34