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