1
# @(#) $Revision: 4.18 $ $Source: /judy/make_includes/flavor.cov.mk $
3
# Makefile fragment for Judy* for "cov" flavor object files. This is intended
4
# to be as close to "product" as possible while building with ccover. See
5
# flavor.product.mk for more comments.
9
# $COVC is a prefix to $CC or $ACC. Use the full path, rather than relying on
10
# $PATH, just as for other tools, so there's no ambiguity about what was run,
13
# Explicitly pass $COVFILE so it's unambiguous, but build using a local (top of
14
# source tree) file so source file paths are shorter. WARNING! This means the
15
# top test.cov file is not flavor-specific. Be careful to remove it and the
16
# corresponding build tree, if necessary, and rebuild all from scratch, so the
17
# $COVFILE has exactly what you want, no more, no less.
19
# Note: Use default covc, which does not measure trinary statements involving
20
# strings (?). See the -C option to covc.
22
# Note: The covc command automatically sets -DCCOVER.
24
COVFILE = test.cov_$(LIB_SUFFIX)
25
COVFILE_DEL = $(DELDIR_LIB)/$(COVFILE)
27
# Set target name so covfiles are constructed:
29
COV_RECURSE_PREP = $(COV_RECURSE_PREP_VALUE)
30
COV_RECURSE_FINISH = $(COV_RECURSE_FINISH_VALUE)
32
COVC = /opt/ccover/bin/covc -f"$(COVFILE)" --no-banner
34
CC_OPTS = $(CC_OPTS_LIB) $(CC_OPTS_cov) $(EXTCCOPTS)
35
CC_OPTS_NOALL = $(CC_OPTS_LIB) $(CC_OPTS_cov) $(EXTCCOPTS)
36
CC_OPTS_TOOL = $(CC_OPTS_product) $(EXTCCOPTS)
38
# For cov flavor, force $CCPRE to reference the ccpre tool, so cov builds use
39
# preprocessed (separated) *.c files, because otherwise C-Cover doesn't know to
40
# count the common code separately in multi-compiled functions.
42
CCPRE = $(SRCDIR_TOOL)/ccpre
44
CC = $(CCPRE) $(COVC) $(CCPATH) $(CC_OPTS)
45
CC_NOALL = $(CCPRE) $(COVC) $(CCPATH) $(CC_OPTS_NOALL)
46
CC_TOOL = $(CCPATH_TOOL) $(CC_OPTS_TOOL)