summaryrefslogtreecommitdiffstats
path: root/src/lib-imap/Makefile.am
blob: 2f59f93770a731ffd065e5fa9ed21e4df5007919 (plain)
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
noinst_LTLIBRARIES = libimap.la

AM_CPPFLAGS = \
	-I$(top_srcdir)/src/lib \
	-I$(top_srcdir)/src/lib-test \
	-I$(top_srcdir)/src/lib-charset \
	-I$(top_srcdir)/src/lib-mail

libimap_la_SOURCES = \
	imap-arg.c \
	imap-base-subject.c \
	imap-bodystructure.c \
	imap-date.c \
	imap-envelope.c \
	imap-id.c \
	imap-keepalive.c \
	imap-match.c \
	imap-parser.c \
	imap-quote.c \
	imap-url.c \
	imap-seqset.c \
	imap-utf7.c \
	imap-util.c

headers = \
	imap-arg.h \
	imap-base-subject.h \
	imap-bodystructure.h \
	imap-date.h \
	imap-envelope.h \
	imap-id.h \
	imap-keepalive.h \
	imap-match.h \
	imap-parser.h \
	imap-resp-code.h \
	imap-quote.h \
	imap-url.h \
	imap-seqset.h \
	imap-utf7.h \
	imap-util.h

pkginc_libdir=$(pkgincludedir)
pkginc_lib_HEADERS = $(headers)

test_programs = \
	test-imap-bodystructure \
	test-imap-envelope \
	test-imap-match \
	test-imap-parser \
	test-imap-quote \
	test-imap-url \
	test-imap-utf7 \
	test-imap-util

noinst_PROGRAMS = $(test_programs)

test_libs = \
	../lib-test/libtest.la \
	../lib/liblib.la

test_deps = $(noinst_LTLIBRARIES) $(test_libs)

test_imap_bodystructure_SOURCES = test-imap-bodystructure.c
test_imap_bodystructure_LDADD = imap-bodystructure.lo imap-envelope.lo imap-quote.lo imap-parser.lo imap-arg.lo ../lib-mail/libmail.la $(test_libs)
test_imap_bodystructure_DEPENDENCIES = $(test_deps) ../lib-mail/libmail.la

test_imap_envelope_SOURCES = test-imap-envelope.c
test_imap_envelope_LDADD = imap-envelope.lo imap-quote.lo imap-parser.lo imap-arg.lo ../lib-mail/libmail.la $(test_libs)
test_imap_envelope_DEPENDENCIES = $(test_deps) ../lib-mail/libmail.la

test_imap_match_SOURCES = test-imap-match.c
test_imap_match_LDADD = imap-match.lo $(test_libs)
test_imap_match_DEPENDENCIES = $(test_deps)

test_imap_parser_SOURCES = test-imap-parser.c
test_imap_parser_LDADD = imap-parser.lo imap-arg.lo $(test_libs)
test_imap_parser_DEPENDENCIES = $(test_deps)

test_imap_quote_SOURCES = test-imap-quote.c
test_imap_quote_LDADD = imap-quote.lo $(test_libs)
test_imap_quote_DEPENDENCIES = $(test_deps)

test_imap_url_SOURCES = test-imap-url.c
test_imap_url_LDADD = imap-url.lo  $(test_libs)
test_imap_url_DEPENDENCIES = $(test_deps)

test_imap_utf7_SOURCES = test-imap-utf7.c
test_imap_utf7_LDADD = imap-utf7.lo $(test_libs)
test_imap_utf7_DEPENDENCIES = $(test_deps)

test_imap_util_SOURCES = test-imap-util.c
test_imap_util_LDADD = imap-util.lo imap-arg.lo $(test_libs)
test_imap_util_DEPENDENCIES = $(test_deps)

check-local:
	for bin in $(test_programs); do \
	  if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
	done

if USE_FUZZER
noinst_PROGRAMS += \
	fuzz-imap-utf7 \
	fuzz-imap-bodystructure

nodist_EXTRA_fuzz_imap_utf7_SOURCES = force-cxx-linking.cxx
fuzz_imap_utf7_SOURCES = fuzz-imap-utf7.c
fuzz_imap_utf7_CPPFLAGS = $(FUZZER_CPPFLAGS)
fuzz_imap_utf7_LDFLAGS = $(FUZZER_LDFLAGS)
fuzz_imap_utf7_LDADD = libimap.la $(test_libs)
fuzz_imap_utf7_DEPENDENCIES = libimap.la $(test_deps)

nodist_EXTRA_fuzz_imap_bodystructure_SOURCES = force-cxx-linking.cxx
fuzz_imap_bodystructure_SOURCES = fuzz-imap-bodystructure.c
fuzz_imap_bodystructure_CPPFLAGS = $(FUZZER_CPPFLAGS)
fuzz_imap_bodystructure_LDFLAGS = $(FUZZER_LDFLAGS)
fuzz_imap_bodystructure_LDADD = libimap.la $(test_libs)
fuzz_imap_bodystructure_DEPENDENCIES = libimap.la $(test_deps)


endif