d8b0edc638e1976f50d7c3fc516e5f5f103f7d29
[platform/core/uifw/dali-core.git] / build / tizen / Makefile.am
1 # Copyright (c) 2017 Samsung Electronics Co., Ltd.
2
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
6
7 # http://www.apache.org/licenses/LICENSE-2.0
8
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.
14
15
16 SUBDIRS = dali-core
17
18 pkgconfigdir = $(libdir)/pkgconfig
19
20 if ENABLE_CXX03_ABI
21 pkgconfig_DATA = dali-core-cxx03.pc
22 else
23 pkgconfig_DATA = dali-core.pc
24 endif
25
26
27 MAINTAINERCLEANFILES = \
28     aclocal.m4 \
29     autom4te.cache \
30     config.guess \
31     config.sub \
32     configure \
33     depcomp \
34     install-sh \
35     ltmain.sh \
36     missing \
37     `find "$(srcdir)" -type f -name Makefile.in -print` \
38     `find . \( -name "*.gcov" -o -name "*.gcno" -o -name "*.gcda" \) -print`
39
40 CLEANFILES = \
41     `find . \( -name "*.gcov" -o -name "*.gcno" -o -name "*.gcda" \) -print`
42
43 COVERAGE_DIR=.cov
44 COVERAGE_OUTPUT_DIR=doc/coverage
45
46 # From lcov version 1.10 onwards, branch coverage is off by default and earlier versions do not support the rc option
47 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`
48
49 rename_cov_data:
50         @test -z $(COVERAGE_DIR) || mkdir -p $(COVERAGE_DIR)
51         @rm -f $(COVERAGE_DIR)/*
52         @cp dali-core/.libs/*.gcda dali-core/.libs/*.gcno $(COVERAGE_DIR)
53         @for i in `find $(COVERAGE_DIR) -name "libdali_core_la-*.gcda" -o -name "libdali_core*_la-*.gcno"` ;\
54                 do mv $$i `echo $$i | sed s/libdali_core_la-//` ; echo $$i ; done
55         @for i in `find $(COVERAGE_DIR) -name "libdali_la-*.gcda" -o -name "libdali*_la-*.gcno"` ;\
56                 do mv $$i `echo $$i | sed s/libdali_la-//` ; done
57
58 cov_data: rename_cov_data
59         @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --base-directory . --directory . -c -o dali.info
60         @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --remove dali.info "*/dali-env/*" "/usr/include/*" "public-api/shader-effects/*" "*/image-actor*" -o dali.info
61         @test -z $(COVERAGE_OUTPUT_DIR) || mkdir -p $(COVERAGE_OUTPUT_DIR)
62
63 coverage: cov_data
64         @genhtml $(LCOV_OPTS) -o $(COVERAGE_OUTPUT_DIR) $(COVERAGE_DIR)/dali.info
65
66 reset_coverage:
67         @lcov -z --directory `pwd`