File: Makefile.am

package info (click to toggle)
libtpms 0.10.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,188 kB
  • sloc: ansic: 120,340; makefile: 829; sh: 336; cpp: 125
file content (129 lines) | stat: -rw-r--r-- 2,674 bytes parent folder | download
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#
# tests/Makefile.am
#
# For the license, see the LICENSE file in the root directory.
#

TESTS_ENVIRONMENT = \
  abs_top_testdir=`cd '$(top_srcdir)'/tests; pwd` \
  abs_top_builddir=`cd '$(top_builddir)'; pwd` \
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`

AM_CFLAGS = -I$(top_srcdir)/include $(SANITIZERS)
AM_LDFLAGS = -no-undefined $(SANITIZERS)
LDADD = $(top_builddir)/src/libtpms.la

check_PROGRAMS = \
	base64decode

TESTS = \
	base64decode.sh

if WITH_TPM2
check_PROGRAMS += \
	nvram_offsets \
	tpm2_createprimary \
	tpm2_cve-2023-1017 \
	tpm2_cve-2023-1018 \
	tpm2_pcr_read \
	tpm2_selftest \
	tpm2_setprofile

TESTS += \
	fuzz.sh \
	nvram_offsets \
	tpm2_createprimary.sh \
	tpm2_cve-2023-1017.sh \
	tpm2_cve-2023-1018.sh \
	tpm2_pcr_read.sh \
	tpm2_selftest.sh \
	tpm2_setprofile.sh
endif

nvram_offsets_SOURCES = nvram_offsets.c
nvram_offsets_CFLAGS = $(AM_CFLAGS) \
	-I$(top_srcdir)/include/libtpms \
	-I$(top_srcdir)/src \
	-I$(top_srcdir)/src/tpm2 \
	-I$(top_srcdir)/src/tpm2/crypto \
	-I$(top_srcdir)/src/tpm2/crypto/openssl \
	-DTPM_POSIX
nvram_offsets_LDFLAGS = $(AM_LDFLAGS)


if WITH_TPM2
if ENABLE_STATIC_TESTS

# object_size needs ANY_OBJECT_Marshal which only is accessible with '-static'
check_PROGRAMS += \
	object_size
TESTS += \
	object_size

object_size_SOURCES = object_size.c
object_size_CFLAGS = $(AM_CFLAGS) \
	-static \
	-I$(top_srcdir)/include/libtpms \
	-I$(top_srcdir)/src \
	-I$(top_srcdir)/src/tpm2 \
	-I$(top_srcdir)/src/tpm2/crypto \
	-I$(top_srcdir)/src/tpm2/crypto/openssl \
	-DTPM_POSIX
object_size_LDFLAGS = $(AM_LDFLAGS)
endif # ENABLE_STATIC_TESTS
endif # WITH_TPM2

if WITH_TPM2
check_PROGRAMS += fuzz
endif
fuzz_SOURCES = fuzz.cc
fuzz_CXXFLAGS = $(FUZZER) $(AM_CFLAGS)
fuzz_LDFLAGS = $(FUZZER) $(LIB_FUZZING_ENGINE) $(AM_LDFLAGS)
if !WITH_FUZZER
if !WITH_FUZZING_ENGINE
fuzz_SOURCES += fuzz-main.c
endif
endif

if LIBTPMS_USE_FREEBL

check_PROGRAMS += freebl_sha1flattensize
TESTS += freebl_sha1flattensize

endif

freebl_sha1flattensize_SOURCES = \
	freebl_sha1flattensize.c
freebl_sha1flattensize_CFLAGS = \
	$(shell nss-config --cflags) \
	$(shell nspr-config --cflags) \
	-Wall -Werror
freebl_sha1flattensize_LDFLAGS = \
	-lfreebl \
	$(shell nspr-config --libs) \
	$(shell nss-config --libs)

EXTRA_DIST = \
	freebl_sha1flattensize.c \
	base64decode.c \
	base64decode.sh \
	common \
	tpm2_createprimary.c \
	tpm2_createprimary.sh \
	tpm2_cve-2023-1017.c \
	tpm2_cve-2023-1017.sh \
	tpm2_cve-2023-1018.c \
	tpm2_cve-2023-1018.sh \
	tpm2_pcr_read.c \
	tpm2_pcr_read.sh \
	tpm2_run_test.sh \
	tpm2_selftest.c \
	tpm2_selftest.sh \
	tpm2_setprofile.c \
	tpm2_setprofile.sh \
	fuzz.sh

CLEANFILES = \
	*.gcov \
	*.gcda \
	*.gcno