1# This Makefile.am is in the public domain
2SUBDIRS  = .
3
4if USE_COVERAGE
5  AM_CFLAGS = -fprofile-arcs -ftest-coverage
6endif
7
8if ENABLE_HTTPS
9  SUBDIRS += https
10endif
11
12AM_CPPFLAGS = \
13-DCPU_COUNT=$(CPU_COUNT) \
14-I$(top_srcdir) \
15-I$(top_srcdir)/src/microhttpd \
16-I$(top_srcdir)/src/include \
17$(LIBCURL_CPPFLAGS)
18
19if !HAVE_W32
20PERF_GET_CONCURRENT=perf_get_concurrent
21TEST_CONCURRENT_STOP=test_concurrent_stop
22if HAVE_CURL_BINARY
23CURL_FORK_TEST = test_get_response_cleanup
24endif
25endif
26
27if HAVE_CURL
28check_PROGRAMS = \
29  test_start_stop \
30  test_get \
31  test_get_sendfile \
32  test_urlparse \
33  test_put \
34  $(TEST_CONCURRENT_STOP) \
35  test_process_headers \
36  test_process_arguments \
37  test_parse_cookies \
38  test_large_put \
39  test_get11 \
40  test_get_sendfile11 \
41  test_put11 \
42  test_large_put11 \
43  test_long_header \
44  test_long_header11 \
45  test_get_chunked \
46  test_put_chunked \
47  test_iplimit11 \
48  test_termination \
49  test_timeout \
50  test_callback \
51  $(CURL_FORK_TEST) \
52  perf_get $(PERF_GET_CONCURRENT)
53
54if HAVE_POSIX_THREADS
55check_PROGRAMS += \
56  test_quiesce
57endif
58
59if HAVE_POSTPROCESSOR
60 check_PROGRAMS += \
61  test_post \
62  test_postform \
63  test_post_loop \
64  test_post11 \
65  test_postform11 \
66  test_post_loop11
67endif
68
69noinst_PROGRAMS = \
70  test_options
71
72if ENABLE_DAUTH
73  check_PROGRAMS += \
74	test_digestauth test_digestauth_with_arguments
75endif
76
77TESTS = $(check_PROGRAMS)
78
79noinst_LIBRARIES = libcurl_version_check.a
80endif
81
82libcurl_version_check_a_SOURCES = \
83  curl_version_check.c
84
85test_start_stop_SOURCES = \
86  test_start_stop.c
87test_start_stop_LDADD = \
88  $(top_builddir)/src/microhttpd/libmicrohttpd.la
89
90test_concurrent_stop_SOURCES = \
91  test_concurrent_stop.c
92test_concurrent_stop_LDADD = \
93  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
94 @LIBCURL@
95
96test_options_SOURCES = \
97  test_options.c
98test_options_LDADD = \
99  $(top_builddir)/src/microhttpd/libmicrohttpd.la
100
101test_get_SOURCES = \
102  test_get.c
103test_get_LDADD = \
104  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
105  @LIBCURL@
106
107test_quiesce_SOURCES = \
108  test_quiesce.c
109test_quiesce_CFLAGS = \
110  $(PTHREAD_CFLAGS) $(AM_CFLAGS)
111test_quiesce_LDADD = \
112  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
113  $(PTHREAD_LIBS) @LIBCURL@
114
115test_callback_SOURCES = \
116  test_callback.c
117test_callback_LDADD = \
118  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
119  @LIBCURL@
120
121perf_get_SOURCES = \
122  perf_get.c \
123  gauger.h
124perf_get_LDADD = \
125  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
126  @LIBCURL@
127
128perf_get_concurrent_SOURCES = \
129  perf_get_concurrent.c \
130  gauger.h
131perf_get_concurrent_LDADD = \
132  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
133  @LIBCURL@
134
135test_digestauth_SOURCES = \
136  test_digestauth.c
137test_digestauth_LDADD = \
138  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
139  @LIBGCRYPT_LIBS@ @LIBCURL@
140
141test_digestauth_with_arguments_SOURCES = \
142  test_digestauth_with_arguments.c
143test_digestauth_with_arguments_LDADD = \
144  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
145  @LIBGCRYPT_LIBS@ @LIBCURL@
146
147test_get_sendfile_SOURCES = \
148  test_get_sendfile.c
149test_get_sendfile_LDADD = \
150  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
151  @LIBCURL@
152test_get_sendfile_DEPENDENCIES =
153
154if HAVE_W32
155test_get_sendfile_LDADD += \
156 $(top_builddir)/src/platform/libplatform_interface.la
157test_get_sendfile_DEPENDENCIES += \
158 $(top_builddir)/src/platform/libplatform_interface.la
159endif
160
161test_urlparse_SOURCES = \
162  test_urlparse.c
163test_urlparse_LDADD = \
164  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
165  @LIBCURL@
166
167test_get_response_cleanup_SOURCES = \
168  test_get_response_cleanup.c
169test_get_response_cleanup_LDADD = \
170  $(top_builddir)/src/microhttpd/libmicrohttpd.la
171
172test_get_chunked_SOURCES = \
173  test_get_chunked.c
174test_get_chunked_LDADD = \
175  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
176  @LIBCURL@
177
178test_post_SOURCES = \
179  test_post.c
180test_post_LDADD = \
181  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
182  @LIBCURL@
183
184test_process_headers_SOURCES = \
185  test_process_headers.c
186test_process_headers_LDADD = \
187  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
188  @LIBCURL@
189
190test_parse_cookies_SOURCES = \
191  test_parse_cookies.c
192test_parse_cookies_LDADD = \
193  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
194  @LIBCURL@
195
196test_process_arguments_SOURCES = \
197  test_process_arguments.c
198test_process_arguments_LDADD = \
199  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
200  @LIBCURL@
201
202test_postform_SOURCES = \
203  test_postform.c
204test_postform_LDADD = \
205  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
206  @LIBGCRYPT_LIBS@ @LIBCURL@
207
208test_post_loop_SOURCES = \
209  test_post_loop.c
210test_post_loop_LDADD = \
211  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
212  @LIBCURL@
213
214test_put_SOURCES = \
215  test_put.c
216test_put_LDADD = \
217  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
218  @LIBCURL@
219
220test_put_chunked_SOURCES = \
221  test_put_chunked.c
222test_put_chunked_LDADD = \
223  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
224  @LIBCURL@
225
226test_get11_SOURCES = \
227  test_get.c
228test_get11_LDADD = \
229  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
230  @LIBCURL@
231
232test_get_sendfile11_SOURCES = \
233  test_get_sendfile.c
234test_get_sendfile11_LDADD = \
235  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
236  @LIBCURL@
237test_get_sendfile11_DEPENDENCIES =
238
239if HAVE_W32
240test_get_sendfile11_LDADD += \
241  $(top_builddir)/src/platform/libplatform_interface.la
242test_get_sendfile11_DEPENDENCIES += \
243  $(top_builddir)/src/platform/libplatform_interface.la
244endif
245
246test_post11_SOURCES = \
247  test_post.c
248test_post11_LDADD = \
249  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
250  @LIBCURL@
251
252test_postform11_SOURCES = \
253  test_postform.c
254test_postform11_LDADD = \
255  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
256  @LIBGCRYPT_LIBS@ @LIBCURL@
257
258test_post_loop11_SOURCES = \
259  test_post_loop.c
260test_post_loop11_LDADD = \
261  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
262  @LIBCURL@
263
264test_put11_SOURCES = \
265  test_put.c
266test_put11_LDADD = \
267  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
268  @LIBCURL@
269
270test_large_put_SOURCES = \
271  test_large_put.c
272test_large_put_LDADD = \
273  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
274  @LIBCURL@
275
276test_large_put11_SOURCES = \
277  test_large_put.c
278test_large_put11_LDADD = \
279  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
280  @LIBCURL@
281
282test_long_header_SOURCES = \
283  test_long_header.c
284test_long_header_LDADD = \
285  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
286  @LIBCURL@
287
288test_long_header11_SOURCES = \
289  test_long_header.c
290test_long_header11_LDADD = \
291  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
292  @LIBCURL@
293
294test_iplimit11_SOURCES = \
295  test_iplimit.c
296test_iplimit11_LDADD = \
297  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
298  @LIBCURL@
299
300test_termination_SOURCES = \
301  test_termination.c
302test_termination_LDADD = \
303  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
304  @LIBCURL@
305
306test_timeout_SOURCES = \
307  test_timeout.c
308test_timeout_LDADD = \
309  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
310  @LIBCURL@
311