forked from guardtime/libksi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile.am
108 lines (83 loc) · 2.84 KB
/
GNUmakefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#
# Copyright 2013-2015 Guardtime, Inc.
#
# This file is part of the Guardtime client SDK.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES, CONDITIONS, OR OTHER LICENSES OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
# "Guardtime" and "KSI" are trademarks or registered trademarks of
# Guardtime, Inc., and no license to trademarks is granted; Guardtime
# reserves and retains all trademark rights.
#
.PHONY: doc test int-test
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src/ksi src/example test doc
docdir = ${datadir}/doc/${PACKAGE}
dist_doc_DATA = changelog license.txt
pkgconfigdir = ${libdir}/pkgconfig
pkgconfig_DATA = libksi.pc
dist_test = \
test/convert*.sh \
test/integrationtest.conf.sample \
test/cutest \
test/resource
dist_api_doc = \
doc/doxyfile \
doc/mainpage.md \
doc/doxyfile \
doc/tutorial
dist_packaging = \
packaging/redhat/libksi.spec.in \
packaging/deb/control.in \
packaging/deb/rules.in \
packaging/deb/copyright \
packaging/deb/rebuild_changelog.sh \
rebuild.sh \
rebuild-rpm.sh \
rebuild-deb.sh
EXTRA_DIST = VERSION ABI_VERSION changelog build*.txt lic*.txt \
${dist_test} ${dist_api_doc} ${dist_packaging}
ZIPDOC_DIR = ${PACKAGE}-${VERSION}-htmldoc
test: include-test unit-test
unit-test: check
./test/runner ./test
int-test: check
./test/integration-tests ./test
include-test:
CC=$(CC) CFLAGS="$(CFLAGS) -I$(top_builddir)/src/" ./test/include-test.sh ./test
# You'll need valgrind for this target.
#
# yum install valgrind
memtest: check
valgrind --xml=yes --xml-file=valgrind.xml ./test/runner ./test
doc: doc/doxyfile
$(MAKE) -C doc htmldoc
doc-zip: doc
cp -r doc/html ${ZIPDOC_DIR}
zip -r ${ZIPDOC_DIR}.zip ${ZIPDOC_DIR}
# You'll need gcovr for this target:
#
# yum install python-pip
# pip install gcovr
coverage-base: clean
make check CFLAGS="-g -fprofile-arcs -ftest-coverage -fPIC -O0"
./test/runner ./test
coverage-extended: coverage-base
./test/integration-tests ./test
coverage-xml: coverage-base
cd ./src/ksi; gcovr -r . --xml-pretty > coverage.xml
coverage-html: coverage-base
cd ./src/ksi; for f in *.c; do gcov $$f --object-directory .libs; done
lcov --capture --directory ./src/ksi --output-file coverage.info
genhtml coverage.info --output-directory coverage
coverage: clean coverage-xml coverage-html
coverage-full: clean coverage-extended coverage-xml coverage-html
clean-local:
rm -fr ${ZIPDOC_DIR} converage coverage.xml coverage.info valgrind.xml test.log testsuite-xunit.xml