1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
5 ifeq ("$(origin T)", "command line")
6 $(error "Cannot use T= with gcov target")
10 ifeq (,$(wildcard $(RTE_OUTPUT)/.config))
11 $(error "need a make config first")
13 include $(RTE_SDK)/mk/rte.vars.mk
15 ifeq (,$(wildcard $(RTE_OUTPUT)/Makefile))
16 $(error "need a make config first")
19 INPUTDIR = $(RTE_OUTPUT)
20 OUTPUTDIR = $(RTE_OUTPUT)/gcov
24 $(Q)find $(INPUTDIR)/build -name "*.gcno" -o -name "*.gcda" -exec rm {} \;
25 $(Q)rm -rf $(OUTPUTDIR)
29 $(Q)for APP in test ; do \
30 mkdir -p $(OUTPUTDIR)/$$APP ; cd $(OUTPUTDIR)/$$APP ; \
31 for FIC in `strings $(RTE_OUTPUT)/app/$$APP | grep gcda | sed s,gcda,o,` ; do \
32 SUBDIR=`basename $$FIC`;\
35 $(GCOV) $(RTE_OUTPUT)/app/$$APP -o $$FIC > gcov.log; \