1 # Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 pkgconfigdir = $(libdir)/pkgconfig
19 pkgconfig_DATA = dali-core.pc
21 MAINTAINERCLEANFILES = \
31 `find "$(srcdir)" -type f -name Makefile.in -print` \
32 `find . \( -name "*.gcov" -o -name "*.gcno" -o -name "*.gcda" \) -print`
35 `find . \( -name "*.gcov" -o -name "*.gcno" -o -name "*.gcda" \) -print`
38 COVERAGE_OUTPUT_DIR=doc/coverage
40 # From lcov version 1.10 onwards, branch coverage is off by default and earlier versions do not support the rc option
41 LCOV_OPTS=`if [ \`printf "\\\`lcov --version | cut -d' ' -f4\\\`\n1.10\n" | sort -V | head -n 1\` = 1.10 ] ; then echo "--rc lcov_branch_coverage=1" ; fi`
44 @test -z $(COVERAGE_DIR) || mkdir -p $(COVERAGE_DIR)
45 @rm -f $(COVERAGE_DIR)/*
46 @cp dali-core/.libs/*.gcda dali-core/.libs/*.gcno $(COVERAGE_DIR)
47 @for i in `find $(COVERAGE_DIR) -name "libdali_core_la-*.gcda" -o -name "libdali_core_la-*.gcno"` ;\
48 do mv $$i `echo $$i | sed s/libdali_core_la-//` ; echo $$i ; done
49 @for i in `find $(COVERAGE_DIR) -name "libdali_la-*.gcda" -o -name "libdali_la-*.gcno"` ;\
50 do mv $$i `echo $$i | sed s/libdali_la-//` ; done
51 @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --base-directory . --directory . -c -o dali.info
52 @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --remove dali.info "*/dali-env/*" "/usr/include/*" -o dali.info
53 @test -z $(COVERAGE_OUTPUT_DIR) || mkdir -p $(COVERAGE_OUTPUT_DIR)
56 @genhtml $(LCOV_OPTS) -o $(COVERAGE_OUTPUT_DIR) $(COVERAGE_DIR)/dali.info
59 @lcov -z --directory `pwd`