1AM_CFLAGS = $(VARNISHAPI_CFLAGS) $(CODE_COVERAGE_CFLAGS) -I$(top_srcdir)/src/foreign \
2	-Wall \
3	-Werror \
4	-Wall \
5	-Wno-format-y2k \
6	-Wstrict-prototypes \
7	-Wmissing-prototypes \
8	-Werror=missing-field-initializers \
9	-Wpointer-arith \
10	-Wreturn-type \
11	-Wwrite-strings \
12	-Wcast-qual \
13	-Wswitch \
14	-Wshadow \
15	-Wunused-parameter \
16	-Wcast-align \
17	-Wchar-subscripts \
18	-Wnested-externs \
19	-Wextra \
20	-Wno-sign-compare
21
22AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
23AM_LDFLAGS = $(VARNISHAPI_LIBS) $(VMOD_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
24
25vmod_LTLIBRARIES = \
26	libvmod_accept.la \
27	libvmod_bodyaccess.la \
28	libvmod_header.la \
29	libvmod_saintmode.la \
30	libvmod_str.la \
31	libvmod_var.la \
32	libvmod_vsthrottle.la \
33	libvmod_xkey.la
34
35if HAVE_RST2MAN
36dist_man_MANS = \
37	vmod_accept.3 \
38	vmod_bodyaccess.3 \
39	vmod_header.3 \
40	vmod_saintmode.3 \
41	vmod_str.3 \
42	vmod_var.3 \
43	vmod_vsthrottle.3 \
44	vmod_xkey.3
45endif
46
47generated_docs = $(dist_man_MANS:.3=.rst)
48
49libvmod_accept_la_SOURCES = vmod_accept.c
50libvmod_bodyaccess_la_SOURCES = vmod_bodyaccess.c
51libvmod_header_la_SOURCES = vmod_header.c
52libvmod_vsthrottle_la_SOURCES = vmod_vsthrottle.c
53libvmod_saintmode_la_SOURCES = vmod_saintmode.c
54libvmod_str_la_SOURCES = vmod_str.c
55libvmod_var_la_SOURCES = vmod_var.c
56libvmod_xkey_la_SOURCES = vmod_xkey.c
57
58nodist_libvmod_accept_la_SOURCES = vcc_accept_if.c vcc_accept_if.h
59nodist_libvmod_bodyaccess_la_SOURCES = vcc_bodyaccess_if.c vcc_bodyaccess_if.h
60nodist_libvmod_header_la_SOURCES = vcc_header_if.c vcc_header_if.h
61nodist_libvmod_vsthrottle_la_SOURCES = vcc_vsthrottle_if.c vcc_vsthrottle_if.h
62nodist_libvmod_saintmode_la_SOURCES = vcc_saintmode_if.c vcc_saintmode_if.h
63nodist_libvmod_str_la_SOURCES = vcc_str_if.c vcc_str_if.h
64nodist_libvmod_var_la_SOURCES = vcc_var_if.c vcc_var_if.h
65nodist_libvmod_xkey_la_SOURCES = vcc_xkey_if.c vcc_xkey_if.h VSC_xkey.c VSC_xkey.h
66
67vmod_xkey.3: VSC_xkey.rst
68
69@BUILD_VMOD_ACCEPT@
70@BUILD_VMOD_BODYACCESS@
71@BUILD_VMOD_HEADER@
72@BUILD_VMOD_SAINTMODE@
73@BUILD_VMOD_STR@
74@BUILD_VMOD_TCP@
75@BUILD_VMOD_VAR@
76@BUILD_VMOD_VSTHROTTLE@
77@BUILD_VMOD_XKEY@
78@BUILD_VSC_XKEY@
79
80rst-docs: $(generated_docs)
81	mkdir -p $(top_builddir)/docs/
82	cp $(generated_docs) $(top_builddir)/docs/
83
84doctest:
85	for i in *.vcc; do \
86		../test-vclsnippet $$i; \
87		rst2html --halt=2 --exit-status=2 $$i 1>/dev/null; \
88	done;
89
90AM_TESTS_ENVIRONMENT = \
91	PATH="$(VMOD_TEST_PATH)" \
92	LD_LIBRARY_PATH="$(VARNISH_LIBRARY_PATH)"
93TEST_EXTENSIONS = .vtc
94VTC_LOG_COMPILER = varnishtest -v
95AM_VTC_LOG_FLAGS = \
96	-Dvmod_builddir=$(abs_top_builddir)/src \
97	-Dvmod_directors="directors from \"$(VARNISHAPI_VMODDIR)/libvmod_directors.so\""
98
99VMOD_TESTS = \
100	tests/accept/test01.vtc \
101	tests/accept/test02.vtc \
102	tests/bodyaccess/test01.vtc \
103	tests/bodyaccess/test02.vtc \
104	tests/bodyaccess/test03.vtc \
105	tests/bodyaccess/test04.vtc \
106	tests/bodyaccess/test05.vtc \
107	tests/header/append.vtc \
108	tests/header/append_maxhdr_overflow.vtc \
109	tests/header/append_overflow.vtc \
110	tests/header/copy.vtc \
111	tests/header/get.vtc \
112	tests/header/import.vtc \
113	tests/header/keep-others.vtc \
114	tests/header/remove.vtc \
115	tests/header/some-data.vtc \
116	tests/header/regsub.vtc \
117	tests/saintmode/test01.vtc \
118	tests/saintmode/test02.vtc \
119	tests/saintmode/test03.vtc \
120	tests/saintmode/test04.vtc \
121	tests/saintmode/test05.vtc \
122	tests/str/test01.vtc \
123	tests/str/test02.vtc \
124	tests/str/test03.vtc \
125	tests/str/test04.vtc \
126	tests/str/test05.vtc \
127	tests/str/test06.vtc \
128	tests/str/test08.vtc \
129	tests/tcp/01-dumpinfo.vtc \
130	tests/tcp/02-congestion.vtc \
131	tests/tcp/03-read-tcpinfo.vtc \
132	tests/tcp/04-pacing.vtc \
133	tests/var/test01.vtc \
134	tests/var/test02.vtc \
135	tests/var/test03.vtc \
136	tests/var/test04.vtc \
137	tests/var/test05.vtc \
138	tests/vsthrottle/test01.vtc \
139	tests/vsthrottle/test02.vtc \
140	tests/vsthrottle/test03.vtc \
141	tests/vsthrottle/test04.vtc \
142	tests/xkey/test01.vtc \
143	tests/xkey/test02.vtc \
144	tests/xkey/test03.vtc \
145	tests/xkey/test04.vtc \
146	tests/xkey/test05.vtc \
147	tests/xkey/test06.vtc \
148	tests/xkey/test07.vtc \
149	tests/xkey/test08.vtc \
150	tests/xkey/test09.vtc \
151	tests/xkey/test10.vtc \
152	tests/xkey/test11.vtc \
153	tests/xkey/test12.vtc \
154	tests/xkey/test13.vtc
155
156TESTS = $(VMOD_TESTS)
157
158EXTRA_DIST = \
159	foreign \
160	vmod_config.h \
161	$(VMOD_TESTS) \
162	vmod_accept.vcc \
163	vmod_bodyaccess.vcc \
164	vmod_header.vcc \
165	vmod_saintmode.vcc \
166	vmod_str.vcc \
167	vmod_var.vcc \
168	vmod_vsthrottle.vcc \
169	vmod_xkey.vcc \
170	xkey.vsc
171