1 | #
|
---|
2 | # tests/Makefile.am
|
---|
3 | #
|
---|
4 | # For the license, see the LICENSE file in the root directory.
|
---|
5 | #
|
---|
6 |
|
---|
7 | TESTS_ENVIRONMENT = \
|
---|
8 | abs_top_testdir=`cd '$(top_srcdir)'/tests; pwd` \
|
---|
9 | abs_top_builddir=`cd '$(top_builddir)'; pwd` \
|
---|
10 | abs_top_srcdir=`cd '$(top_srcdir)'; pwd`
|
---|
11 |
|
---|
12 | AM_CFLAGS = -I$(top_srcdir)/include $(SANITIZERS)
|
---|
13 | AM_LDFLAGS = -ltpms -L$(top_builddir)/src/.libs $(SANITIZERS)
|
---|
14 |
|
---|
15 | check_PROGRAMS = \
|
---|
16 | base64decode
|
---|
17 |
|
---|
18 | TESTS = \
|
---|
19 | base64decode.sh
|
---|
20 |
|
---|
21 | if WITH_TPM2
|
---|
22 | check_PROGRAMS += \
|
---|
23 | nvram_offsets \
|
---|
24 | tpm2_createprimary \
|
---|
25 | tpm2_pcr_read \
|
---|
26 | tpm2_selftest
|
---|
27 |
|
---|
28 | TESTS += \
|
---|
29 | fuzz.sh \
|
---|
30 | nvram_offsets \
|
---|
31 | tpm2_createprimary.sh \
|
---|
32 | tpm2_pcr_read.sh \
|
---|
33 | tpm2_selftest.sh
|
---|
34 | endif
|
---|
35 |
|
---|
36 | nvram_offsets_SOURCES = nvram_offsets.c
|
---|
37 | nvram_offsets_CFLAGS = $(AM_CFLAGS) \
|
---|
38 | -I$(top_srcdir)/include/libtpms \
|
---|
39 | -I$(top_srcdir)/src \
|
---|
40 | -I$(top_srcdir)/src/tpm2 \
|
---|
41 | -I$(top_srcdir)/src/tpm2/crypto \
|
---|
42 | -I$(top_srcdir)/src/tpm2/crypto/openssl \
|
---|
43 | -DTPM_POSIX
|
---|
44 | nvram_offsets_LDFLAGS = $(AM_LDFLAGS)
|
---|
45 |
|
---|
46 | if WITH_TPM2
|
---|
47 | check_PROGRAMS += fuzz
|
---|
48 | endif
|
---|
49 | fuzz_SOURCES = fuzz.cc
|
---|
50 | fuzz_CXXFLAGS = $(FUZZER) $(AM_CFLAGS)
|
---|
51 | fuzz_LDFLAGS = $(FUZZER) $(LIB_FUZZING_ENGINE) $(AM_LDFLAGS)
|
---|
52 | if !WITH_FUZZER
|
---|
53 | if !WITH_FUZZING_ENGINE
|
---|
54 | fuzz_SOURCES += fuzz-main.c
|
---|
55 | endif
|
---|
56 | endif
|
---|
57 |
|
---|
58 | if LIBTPMS_USE_FREEBL
|
---|
59 |
|
---|
60 | check_PROGRAMS += freebl_sha1flattensize
|
---|
61 | TESTS += freebl_sha1flattensize
|
---|
62 |
|
---|
63 | endif
|
---|
64 |
|
---|
65 | freebl_sha1flattensize_SOURCES = \
|
---|
66 | freebl_sha1flattensize.c
|
---|
67 | freebl_sha1flattensize_CFLAGS = \
|
---|
68 | $(shell nss-config --cflags) \
|
---|
69 | $(shell nspr-config --cflags) \
|
---|
70 | -Wall -Werror
|
---|
71 | freebl_sha1flattensize_LDFLAGS = \
|
---|
72 | -lfreebl \
|
---|
73 | $(shell nspr-config --libs) \
|
---|
74 | $(shell nss-config --libs)
|
---|
75 |
|
---|
76 | EXTRA_DIST = \
|
---|
77 | freebl_sha1flattensize.c \
|
---|
78 | base64decode.c \
|
---|
79 | base64decode.sh \
|
---|
80 | common \
|
---|
81 | tpm2_createprimary.c \
|
---|
82 | tpm2_createprimary.sh \
|
---|
83 | tpm2_pcr_read.c \
|
---|
84 | tpm2_pcr_read.sh \
|
---|
85 | tpm2_selftest.c \
|
---|
86 | tpm2_selftest.sh \
|
---|
87 | fuzz.sh
|
---|
88 |
|
---|
89 | CLEANFILES = \
|
---|
90 | *.gcov \
|
---|
91 | *.gcda \
|
---|
92 | *.gcno
|
---|