libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

Makefile.am (14030B)


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