Blame src/mpl/Makefile.am

Packit 0848f5
# -*- Mode: Makefile; -*-
Packit 0848f5
#
Packit 0848f5
# (C) 2008 by Argonne National Laboratory.
Packit 0848f5
#     See COPYRIGHT in top-level directory.
Packit 0848f5
#
Packit 0848f5
Packit 0848f5
ACLOCAL_AMFLAGS = -I confdb
Packit 0848f5
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
Packit 0848f5
Packit 0848f5
noinst_LTLIBRARIES = lib@MPLLIBNAME@.la
Packit 0848f5
lib@MPLLIBNAME@_la_SOURCES = \
Packit 0848f5
	src/mplstr.c \
Packit 0848f5
	src/mpltrmem.c \
Packit 0848f5
	src/mplenv.c \
Packit 0848f5
	src/mplmsg.c \
Packit 0848f5
	src/mplsock.c
Packit 0848f5
lib@MPLLIBNAME@_la_LDFLAGS = ${lib@MPLLIBNAME@_so_versionflags}
Packit 0848f5
Packit 0848f5
MPL_TESTS = strsep
Packit 0848f5
TESTS = $(MPL_TESTS)
Packit 0848f5
check_PROGRAMS = $(MPL_TESTS)
Packit 0848f5
strsep_SOURCES = test/strsep.c
Packit 0848f5
strsep_LDADD = lib@MPLLIBNAME@.la
Packit 0848f5
Packit 0848f5
mpl_headers =              \
Packit 0848f5
    include/mpl.h          \
Packit 0848f5
    include/mpl_utlist.h   \
Packit 0848f5
    include/mpl_valgrind.h \
Packit 0848f5
    include/mplconfig.h    \
Packit 0848f5
    include/mplenv.h       \
Packit 0848f5
    include/mplstr.h       \
Packit 0848f5
    include/mpltrmem.h     \
Packit 0848f5
    include/mplmsg.h       \
Packit 0848f5
    include/mpliov.h       \
Packit 0848f5
    include/mplsock.h
Packit 0848f5
Packit 0848f5
if MPL_EMBEDDED_MODE
Packit 0848f5
noinst_HEADERS = $(mpl_headers)
Packit 0848f5
else !MPL_EMBEDDED_MODE
Packit 0848f5
include_HEADERS = $(mpl_headers)
Packit 0848f5
endif !MPL_EMBEDDED_MODE
Packit 0848f5
Packit 0848f5
# --------------------------------------------------------------------------
Packit 0848f5
.PHONY: coverage
Packit 0848f5
gcov_sources = $(libmpl_la_SOURCES)
Packit 0848f5
# assumes that these sources were compiled appropriately ("-fprofile-arcs"
Packit 0848f5
# and "-ftest-coverage")
Packit 0848f5
coverage:
Packit 0848f5
	@for file in $(gcov_sources) ; do \
Packit 0848f5
	    dir=`dirname $$file` ; \
Packit 0848f5
	    bname=`basename $$file` ; \
Packit 0848f5
	    aux=`echo $$bname | sed -e 's,\.*$$,,'` ; \
Packit 0848f5
	    echo "( $(GCOV) -b -f -o $$file $$file && mv $${bname}.gcov $$dir )" ; \
Packit 0848f5
	    ( $(GCOV) -b -f -o $$file $$file && mv $${bname}.gcov $$dir ) ; \
Packit 0848f5
	    rm -f *.gcov ; \
Packit 0848f5
	done
Packit 0848f5
	for subdir in $(SUBDIRS) - ; do \
Packit 0848f5
	    if test $$subdir = "-" ; then break ; fi ; \
Packit 0848f5
	    ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) coverage ) ; \
Packit 0848f5
	done
Packit 0848f5
# --------------------------------------------------------------------------
Packit 0848f5
Packit 0848f5
# files that automake doesn't know about by default that should be included in
Packit 0848f5
# the distribution
Packit 0848f5
EXTRA_DIST = VERSION
Packit 0848f5
Packit 0848f5
DISTCLEANFILES = _configs.sed include/mplconfig.h