Makefile.am (13980B)
1 # This Makefile.am is in the public domain 2 3 AM_CPPFLAGS = \ 4 -I$(srcdir)/../incl_priv \ 5 -I$(srcdir)/../include \ 6 $(CPPFLAGS_ac) 7 8 AM_CFLAGS = $(CFLAGS_ac) 9 10 if USE_COVERAGE 11 AM_CFLAGS += --coverage 12 endif 13 14 AM_LDFLAGS = $(LDFLAGS_ac) 15 16 AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT_ac) 17 18 lib_LTLIBRARIES = \ 19 libmicrohttpd2.la 20 21 noinst_DATA = 22 MOSTLYCLEANFILES = 23 24 nodist_libmicrohttpd2_la_SOURCES = $(CONFIG_HEADER) 25 libmicrohttpd2_la_SOURCES = \ 26 $(srcdir)/../incl_priv/autoinit_funcs.h \ 27 $(srcdir)/../incl_priv/mhd_sys_options.h \ 28 sys_offsetof.h \ 29 sys_sizet_type.h sys_null_macro.h sys_bool_type.h \ 30 sys_base_types.h \ 31 sys_sockets_types.h sys_sockets_headers.h sys_ip_headers.h \ 32 sys_errno.h sys_file_fd.h sys_malloc.h \ 33 sys_select.h sys_poll.h \ 34 sys_sendfile.h \ 35 compat_calloc.h \ 36 sys_w32_ver.h \ 37 mhd_align.h mhd_bithelpers.h mhd_byteorder.h \ 38 mhd_assert.h mhd_assume.h mhd_unreachable.h \ 39 mhd_static_assert.h \ 40 mhd_constexpr.h mhd_predict.h \ 41 mhd_cntnr_ptr.h mhd_arr_num_elems.h \ 42 mhd_tristate.h mhd_status_code_int.h \ 43 mhd_socket_type.h mhd_sockets_macros.h \ 44 mhd_sockets_funcs.c mhd_sockets_funcs.h \ 45 mhd_socket_error_funcs.c mhd_socket_error_funcs.h mhd_socket_error.h \ 46 mhd_atomic_counter.h \ 47 mhd_bool.h \ 48 mhd_str.c mhd_str.h \ 49 mhd_rng.c mhd_rng.h \ 50 mhd_str_macros.h mhd_str_types.h \ 51 mhd_buffer.h \ 52 mhd_comm_layer_state.h \ 53 mhd_limits.h \ 54 mhd_iovec.h \ 55 mhd_dbg_print.h \ 56 mhd_panic.c mhd_panic.h \ 57 mhd_lib_init.c mhd_lib_init_impl.h mhd_lib_init.h \ 58 mhd_lib_init_auto.h \ 59 lib_get_info.c \ 60 mhd_dlinked_list.h \ 61 mhd_conn_socket.h mhd_connection.h \ 62 mhd_stream.h mhd_handle_tag.h \ 63 mhd_locks.h mhd_locksrw.h \ 64 mhd_itc.c mhd_itc.h mhd_itc_types.h \ 65 mhd_mono_clock.c mhd_mono_clock.h \ 66 mempool_funcs.c mempool_funcs.h mempool_types.h \ 67 mhd_read_file.c mhd_read_file.h \ 68 sckt_recv.c sckt_recv.h \ 69 mhd_recv.c mhd_recv.h \ 70 mhd_send.c mhd_send.h sckt_send.h \ 71 mhd_daemon.h \ 72 mhd_public_api.h \ 73 mhd_request.h mhd_reply.h mhd_response.h \ 74 http_method.h http_prot_ver.h \ 75 http_status_str.c http_status_str.h \ 76 mhd_enum_to_str.c \ 77 action.c mhd_action.h \ 78 dcc_action.c mhd_dcc_action.h \ 79 events_process.c events_process.h \ 80 daemon_logger.c daemon_logger.h \ 81 daemon_logger_default.c daemon_logger_default.h \ 82 daemon_options.h daemon_set_options.c \ 83 daemon_create.c \ 84 daemon_start.c \ 85 daemon_get_info.c \ 86 daemon_add_conn.c daemon_add_conn.h \ 87 daemon_funcs.c daemon_funcs.h \ 88 daemon_event_update.c extr_events_funcs.c extr_events_funcs.h \ 89 conn_timeout.c conn_timeout.h \ 90 conn_data_process.c conn_data_process.h \ 91 conn_data_recv.c conn_data_recv.h \ 92 conn_data_send.c conn_data_send.h \ 93 conn_mark_ready.h \ 94 conn_get_info.c \ 95 request_funcs.c request_funcs.h \ 96 request_get_value.c request_get_value.h \ 97 request_resume.c \ 98 respond_with_error.c respond_with_error.h \ 99 request_get_info.c \ 100 response_from.c response_from.h \ 101 response_add_header.c response_add_header.h \ 102 response_destroy.c response_destroy.h \ 103 response_funcs.c response_funcs.h \ 104 response_set_options.c response_set_options.h response_options.h \ 105 stream_funcs.c stream_funcs.h \ 106 stream_process_states.c stream_process_states.h \ 107 stream_process_request.c stream_process_request.h \ 108 stream_process_reply.c stream_process_reply.h \ 109 stream_get_info.c 110 111 if ! HAVE_SYS_CALLOC 112 libmicrohttpd2_la_SOURCES += \ 113 compat_calloc.c 114 endif 115 116 # 117 httptwo_OPTSOURCES = \ 118 mhd_http_layer_state.h \ 119 h2/h2_bit_masks.h \ 120 h2/h2_req_data.h \ 121 h2/h2_stream_data.h \ 122 h2/h2_resp_data.h \ 123 h2/h2_conn_data.h h2/h2_err_codes.h h2/h2_frame_types.h \ 124 h2/h2_frame_length.h h2/h2_frame_init.h \ 125 h2/h2_frame_codec.c h2/h2_frame_codec.h \ 126 h2/h2_proc_settings.c h2/h2_proc_settings.h h2/h2_settings.h \ 127 h2/h2_req_item_kinds.h h2/h2_req_item_struct.h \ 128 h2/h2_req_items_funcs.c h2/h2_req_items_funcs.h \ 129 h2/h2_comm.c h2/h2_comm.h \ 130 h2/h2_proc_conn.c h2/h2_proc_conn.h \ 131 h2/h2_proc_in.c h2/h2_proc_in.h \ 132 h2/h2_proc_out.c h2/h2_proc_out.h \ 133 h2/h2_conn_streams.c h2/h2_conn_streams.h \ 134 h2/h2_req_fields.c h2/h2_req_fields.h \ 135 h2/h2_req_get_items.c h2/h2_req_get_items.h \ 136 h2/h2_app_cb.c h2/h2_app_cb.h \ 137 h2/h2_action.c h2/h2_action.h \ 138 h2/h2_reply_funcs.c h2/h2_reply_funcs.h \ 139 h2/hpack/h2_huffman_est.h \ 140 h2/hpack/h2_huffman_codec.c \ 141 h2/hpack/h2_huffman_codec.h \ 142 h2/hpack/mhd_hpack_dec_types.h \ 143 h2/hpack/mhd_hpack_enc_types.h \ 144 h2/hpack/mhd_hpack_codec.c \ 145 h2/hpack/mhd_hpack_codec.h 146 147 threads_OPTSOURCES = \ 148 mhd_threads.c mhd_threads.h sys_thread_entry_type.h 149 150 post_parser_OPTSOURCES = \ 151 http_post_enc.h \ 152 mhd_post_parser.h mhd_post_result.h mhd_postfield_int.h \ 153 post_parser_funcs.c post_parser_funcs.h 154 155 auth_OPTSOURCES = \ 156 request_auth_get.c request_auth_get.h 157 158 auth_basic_OPTSOURCES = \ 159 auth_basic.c auth_basic.h \ 160 response_auth_basic.c 161 162 163 if MHD_MD5_BUILTIN 164 md5_OPTSOURCES = \ 165 md5_builtin.c md5_builtin.h \ 166 mhd_md5.h 167 endif 168 169 if MHD_MD5_GNUTLS 170 md5_OPTSOURCES = \ 171 md5_gnutls.c md5_gnutls.h \ 172 mhd_md5.h 173 endif 174 175 if MHD_MD5_OPENSSL 176 md5_OPTSOURCES = \ 177 md5_openssl.c md5_openssl.h \ 178 mhd_md5.h 179 endif 180 181 if MHD_MD5_MBEDTLS 182 md5_OPTSOURCES = \ 183 md5_mbedtls.c md5_mbedtls.h \ 184 mhd_md5.h 185 endif 186 187 188 if MHD_SHA256_BUILTIN 189 sha256_OPTSOURCES = \ 190 sha256_builtin.c sha256_builtin.h \ 191 mhd_sha256.h 192 endif 193 194 if MHD_SHA256_GNUTLS 195 sha256_OPTSOURCES = \ 196 sha256_gnutls.c sha256_gnutls.h \ 197 mhd_sha256.h 198 endif 199 200 if MHD_SHA256_OPENSSL 201 sha256_OPTSOURCES = \ 202 sha256_openssl.c sha256_openssl.h \ 203 mhd_sha256.h 204 endif 205 206 if MHD_SHA256_MBEDTLS 207 sha256_OPTSOURCES = \ 208 sha256_mbedtls.c sha256_mbedtls.h \ 209 mhd_sha256.h 210 endif 211 212 213 if MHD_SHA512_256_BUILTIN 214 sha512_256_OPTSOURCES = \ 215 sha512_256_builtin.c sha512_256_builtin.h \ 216 mhd_sha512_256.h 217 endif 218 219 if MHD_SHA512_256_OPENSSL 220 sha512_256_OPTSOURCES = \ 221 sha512_256_openssl.c sha512_256_openssl.h \ 222 mhd_sha512_256.h 223 endif 224 225 if MHD_SHA512_X_MBEDTLS 226 sha512_256_OPTSOURCES = \ 227 sha512_256_mbedtls.c sha512_256_mbedtls.h \ 228 mhd_sha512_256.h 229 endif 230 231 232 auth_digest_OPTSOURCES = \ 233 mhd_digest_auth_data.h mhd_auth_digest_hdr.h \ 234 response_auth_digest.c response_auth_digest.h \ 235 auth_digest.c auth_digest.h 236 237 if MHD_SUPPORT_MD5 238 auth_digest_OPTSOURCES += $(md5_OPTSOURCES) 239 endif 240 241 if MHD_SUPPORT_SHA256 242 auth_digest_OPTSOURCES += $(sha256_OPTSOURCES) 243 endif 244 245 if MHD_SUPPORT_SHA512_256 246 auth_digest_OPTSOURCES += $(sha512_256_OPTSOURCES) 247 endif 248 249 upgrade_OPTSOURCES = \ 250 mhd_upgrade.h \ 251 upgrade_prep.c upgrade_prep.h \ 252 upgrade_proc.c upgrade_proc.h \ 253 upgraded_net.c 254 255 tls_common_OPTSOURCES = \ 256 mhd_tls_enums.h mhd_tls_ver_stct.h tls_dh_params.h \ 257 mhd_tls_certs_list.h mhd_tls_cred_ptr.h \ 258 mhd_tls_internal.c mhd_tls_internal.h \ 259 mhd_tls_common.c mhd_tls_common.h \ 260 mhd_tls_choice.h mhd_tls_funcs.h \ 261 conn_tls_check.c conn_tls_check.h 262 263 tls_multi_OPTSOURCES = \ 264 tls_multi_tls_lib.h tls_multi_daemon_data.h tls_multi_conn_data.h \ 265 tls_multi_funcs.c tls_multi_funcs.h 266 267 tls_gnu_OPTSOURCES = \ 268 tls_gnu_tls_lib.h tls_gnu_daemon_data.h tls_gnu_conn_data.h \ 269 tls_gnu_funcs.c tls_gnu_funcs.h 270 271 tls_open_OPTSOURCES = \ 272 tls_open_tls_lib.h tls_open_daemon_data.h tls_open_conn_data.h \ 273 tls_open_funcs.c tls_open_funcs.h 274 275 tls_mbed_OPTSOURCES = \ 276 tls_mbed_tls_lib.h tls_mbed_daemon_data.h tls_mbed_conn_data.h \ 277 tls_mbed_funcs.c tls_mbed_funcs.h 278 279 acme_OPTSOURCES = 280 281 acme_https_OPTSOURCES = \ 282 mhd_tls_acme_func.c mhd_tls_acme_func.h 283 284 if MHD_SUPPORT_HTTPS 285 acme_OPTSOURCES += $(acme_https_OPTSOURCES) 286 endif 287 288 if MHD_SUPPORT_HTTP2 289 libmicrohttpd2_la_SOURCES += $(httptwo_OPTSOURCES) 290 endif 291 292 if MHD_SUPPORT_THREADS 293 libmicrohttpd2_la_SOURCES += $(threads_OPTSOURCES) 294 endif 295 296 if MHD_SUPPORT_POST_PARSER 297 libmicrohttpd2_la_SOURCES += $(post_parser_OPTSOURCES) 298 endif 299 300 if MHD_SUPPORT_AUTH 301 libmicrohttpd2_la_SOURCES += $(auth_OPTSOURCES) 302 endif 303 304 if MHD_SUPPORT_AUTH_BASIC 305 libmicrohttpd2_la_SOURCES += $(auth_basic_OPTSOURCES) 306 endif 307 308 if MHD_SUPPORT_AUTH_DIGEST 309 libmicrohttpd2_la_SOURCES += $(auth_digest_OPTSOURCES) 310 endif 311 312 if MHD_SUPPORT_UPGRADE 313 libmicrohttpd2_la_SOURCES += $(upgrade_OPTSOURCES) 314 endif 315 316 if MHD_SUPPORT_HTTPS 317 libmicrohttpd2_la_SOURCES += $(tls_common_OPTSOURCES) 318 319 if MHD_ENABLE_MULTITLS 320 libmicrohttpd2_la_SOURCES += $(tls_multi_OPTSOURCES) 321 endif 322 323 if MHD_SUPPORT_GNUTLS 324 libmicrohttpd2_la_SOURCES += $(tls_gnu_OPTSOURCES) 325 endif 326 327 if MHD_SUPPORT_OPENSSL 328 libmicrohttpd2_la_SOURCES += $(tls_open_OPTSOURCES) 329 endif 330 331 if MHD_SUPPORT_MBEDTLS 332 libmicrohttpd2_la_SOURCES += $(tls_mbed_OPTSOURCES) 333 endif 334 endif 335 336 if MHD_SUPPORT_ACME 337 libmicrohttpd2_la_SOURCES += $(acme_OPTSOURCES) 338 endif 339 340 libmicrohttpd2_la_CPPFLAGS = \ 341 $(AM_CPPFLAGS) $(MHD_LIB_CPPFLAGS) $(MHD_TLS_LIB_CPPFLAGS) \ 342 -DBUILDING_MHD_LIB=1 343 libmicrohttpd2_la_CFLAGS = \ 344 $(AM_CFLAGS) $(MHD_LIB_CFLAGS) 345 libmicrohttpd2_la_LDFLAGS = \ 346 $(AM_LDFLAGS) $(MHD_LIB_LDFLAGS) $(MHD_TLS_LIB_LDFLAGS) \ 347 $(W32_MHD_LIB_LDFLAGS) \ 348 -export-dynamic -no-undefined \ 349 -version-info @LIB_VER_CURRENT@:@LIB_VER_REVISION@:@LIB_VER_AGE@ 350 libmicrohttpd2_la_LIBADD = \ 351 $(MHD_TLS_LIBDEPS) $(MHD_LIBDEPS) 352 libmicrohttpd2_la_SHORTNAME = mhd2 353 354 355 INCL_SRC_DIR = $(srcdir)/../include 356 357 # $(srcdir)/daemon_options.h - excluded to allow parallel builds in this dir 358 $(srcdir)/daemon_set_options.c: $(INCL_SRC_DIR)/d_options.rec $(INCL_SRC_DIR)/options-generator.c 359 @echo "cd $(INCL_SRC_DIR) && $(MAKE) $(AM_MAKEFLAGS) update-daemon-gen-files" && \ 360 $(am__cd) $(INCL_SRC_DIR) && $(MAKE) $(AM_MAKEFLAGS) update-daemon-gen-files 361 362 # $(srcdir)/response_options.h - excluded to allow parallel builds in this dir 363 $(srcdir)/response_set_options.c: $(INCL_SRC_DIR)/r_options.rec $(INCL_SRC_DIR)/options-generator.c 364 @echo "cd $(INCL_SRC_DIR) && $(MAKE) $(AM_MAKEFLAGS) update-response-gen-files" && \ 365 $(am__cd) $(INCL_SRC_DIR) && $(MAKE) $(AM_MAKEFLAGS) update-response-gen-files 366 367 AM_V_RC = $(am__v_RC_@AM_V@) 368 am__v_RC_ = $(am__v_RC_@AM_DEFAULT_V@) 369 am__v_RC_0 = @echo " RC " $@; 370 am__v_RC_1 = 371 372 # General rule is not required, but keep it just in case 373 # Note: windres does not understand '-isystem' flag, so all 374 # possible '-isystem' flags are replaced by simple '-I' flags. 375 .rc.lo: 376 $(AM_V_RC) RC_ALL_CPPFLAGS=`echo ' $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) ' | $(SED) -e 's/ -isystem / -I/g'`; \ 377 $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $${RC_ALL_CPPFLAGS} $< -o $@ 378 379 # Note: windres does not understand '-isystem' flag, so all 380 # possible '-isystem' flags are replaced by simple '-I' flags. 381 libmicrohttpd2_la-w32_lib_res.lo: $(builddir)/w32_lib_res.rc 382 $(AM_V_RC) RC_ALL_CPPFLAGS=`echo ' $(DEFAULT_INCLUDES) $(INCLUDES) $(libmicrohttpd_la_CPPFLAGS) $(CPPFLAGS) ' | $(SED) -e 's/ -isystem / -I/g'`; \ 383 $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) $(DEFS) $${RC_ALL_CPPFLAGS} $(builddir)/w32_lib_res.rc -o $@ 384 385 if HAVE_W32 386 MHD_DLL_RES_LO = libmicrohttpd2_la-w32_lib_res.lo 387 else 388 MHD_DLL_RES_LO = 389 endif 390 391 EXTRA_libmicrohttpd2_la_DEPENDENCIES = $(MHD_DLL_RES_LO) 392 libmicrohttpd2_la_LIBADD += $(MHD_DLL_RES_LO) 393 394 update-po-POTFILES.in: $(top_srcdir)/po/POTFILES.in 395 396 $(top_srcdir)/po/POTFILES.in: $(srcdir)/Makefile.am 397 @echo "Creating $@" 398 @echo "" > "$@" && \ 399 for src in $(am__libmicrohttpd2_la_SOURCES_DIST) ; do \ 400 echo "$(subdir)/$$src" >> "$@" || exit $$?; \ 401 done 402 403 EXTRA_DIST = \ 404 libmicrohttpd2.pc.in 405 406 pkgconfigdir = $(libdir)/pkgconfig 407 pkgconfig_DATA = libmicrohttpd2.pc 408 409 $(CONFIG_HEADER): $(builddir)/../incl_priv/config/mhd_config.h.in $(top_builddir)/config.status 410 @echo "cd $(srcdir)/../incl_priv/config && $(MAKE) $(AM_MAKEFLAGS) mhd_config.h" && \ 411 $(am__cd) $(srcdir)/../incl_priv/config && $(MAKE) $(AM_MAKEFLAGS) mhd_config.h 412 413 $(builddir)/../incl_priv/config/mhd_config.h.in: $(top_srcdir)/configure.ac 414 @echo "cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh" && \ 415 $(am__cd) $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 416 417 check-sources-missing: 418 @$(am__cd) "$(srcdir)" && \ 419 echo $(ECHO_N) "Checking for sources missing in Makefile" ; \ 420 res="" && \ 421 makefile_srcs='$(DIST_SOURCES)' && \ 422 fs_srcs="*.[ch] h2/*.[ch] h2/hpack/*.[ch]" && \ 423 for src in $$fs_srcs ; do \ 424 case " $$makefile_srcs " in \ 425 *" $$src "*) echo $(ECHO_N) "." ;; \ 426 *) res="$$res $$src" ;; \ 427 esac ; \ 428 done ; \ 429 echo " done" ; \ 430 if test -n "$$res" ; then \ 431 echo "The following source files are missing in Makefile:" ; \ 432 echo " $${res}"; \ 433 fi 434 435 check-missing-sources: check-sources-missing 436 437 update-vs-files: 438 @$(am__cd) "$(top_srcdir)/w32/common" && \ 439 ../../contrib/update_vs_files.sh $(am__libmicrohttpd2_la_SOURCES_DIST) 440 441 .PHONY: update-po-POTFILES.in check-sources-missing check-missing-sources update-vs-files 442 443 .NOTPARALLEL: $(srcdir)/daemon_options.h $(srcdir)/daemon_set_options.c $(srcdir)/response_options.h $(srcdir)/response_set_options.c