1pkglibexecdir = $(libexecdir)/dovecot
2
3pkglibexec_PROGRAMS = anvil
4
5AM_CPPFLAGS = \
6	-I$(top_srcdir)/src/lib \
7	-I$(top_srcdir)/src/lib-test \
8	-I$(top_srcdir)/src/lib-settings \
9	-I$(top_srcdir)/src/lib-master \
10	$(BINARY_CFLAGS)
11
12anvil_LDADD = \
13	$(LIBDOVECOT) \
14	$(RAND_LIBS) \
15	$(BINARY_LDFLAGS)
16
17anvil_DEPENDENCIES = $(LIBDOVECOT_DEPS)
18
19anvil_SOURCES = \
20	main.c \
21	anvil-connection.c \
22	anvil-settings.c \
23	connect-limit.c \
24	penalty.c
25
26noinst_HEADERS = \
27	anvil-connection.h \
28	common.h \
29	connect-limit.h \
30	penalty.h
31
32test_programs = \
33	test-penalty
34
35noinst_PROGRAMS = $(test_programs)
36
37test_libs = \
38	../lib-test/libtest.la \
39	../lib/liblib.la
40
41test_penalty_SOURCES = test-penalty.c
42test_penalty_LDADD = penalty.o $(test_libs)
43test_penalty_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(test_libs)
44
45check-local:
46	for bin in $(test_programs); do \
47	  if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
48	done
49