## -*- Mode: Makefile; -*- ## vim: set ft=automake : ## ## (C) 2011 by Argonne National Laboratory. ## See COPYRIGHT in top-level directory. ## ## This is an automake makefile fragment that should be included by: ## ## include $(top_srcdir)/Makefile.mtest ## ## It provides a "testing" rule that uses runtests, cleanup for summary.xml, and ## adds appropriate includes and linker flags for using the MTest framework. ## The goal is to reduce the amount of boilerplate that needs to exist in each ## Makefile.am # AM_CPPFLAGS are used for C++ code as well AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include LDADD = $(top_builddir)/util/mtest.o # Add libdtpools support AM_CPPFLAGS += -I$(top_srcdir)/dtpools/include LDADD += $(top_builddir)/dtpools/src/.libs/libdtpools.a ## FIXME "DEPADD" is a simplemake concept, which we can handle on a per-target ## prog_DEPENDENCIES variable, but it would be better to figure out the right ## way to do this ##DEPADD = @MPILIBLOC@ $(top_builddir)/util/mtest.o $(top_builddir)/util/mtest.$(OBJEXT): $(top_srcdir)/util/mtest.c (cd $(top_builddir)/util && $(MAKE) mtest.$(OBJEXT)) $(top_builddir)/dtpools/src/.libs/libdtpools.a: $(top_srcdir)/dtpools/src/*.c (cd $(top_builddir)/dtpools && $(MAKE)) SUMMARY_BASENAME ?= summary testing: $(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist \ -mpiexec="${MPIEXEC}" -xmlfile=$(SUMMARY_BASENAME).xml \ -tapfile=$(SUMMARY_BASENAME).tap -junitfile=$(SUMMARY_BASENAME).junit.xml CLEANFILES = $(SUMMARY_BASENAME).xml $(SUMMARY_BASENAME).tap $(SUMMARY_BASENAME).junit.xml