libmicrohttpd2

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

Makefile.am (5631B)


      1 # This Makefile.am is in the public domain
      2 # src/tests/unit/Makefile.am
      3 EMPTY_ITEM =
      4 
      5 H2_SRC_DIR = $(srcdir)/../../mhd2/h2
      6 HPACK_SRC_DIR = $(H2_SRC_DIR)/hpack
      7 
      8 AM_CPPFLAGS = \
      9   -I$(top_srcdir)/src/mhd2 \
     10   -I$(top_srcdir)/src/incl_priv \
     11   -I$(top_srcdir)/src/include \
     12   -I$(top_srcdir)/src/tests \
     13   -DMHD_CPU_COUNT=$(CPU_COUNT) \
     14   -DMHD_UNIT_TESTING \
     15   $(CPPFLAGS_ac)\
     16   $(MHD_LIB_CPPFLAGS) \
     17   $(MHD_TLS_LIB_CPPFLAGS)
     18 
     19 AM_CFLAGS = $(CFLAGS_ac) $(MHD_LIB_CFLAGS)
     20 
     21 AM_LDFLAGS = $(LDFLAGS_ac) \
     22   $(MHD_LIB_LDFLAGS) \
     23   $(MHD_TLS_LIBDEPS)
     24 
     25 AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT_ac)
     26 
     27 if USE_COVERAGE
     28   AM_CFLAGS += -fprofile-arcs -ftest-coverage
     29 endif
     30 
     31 LDADD = $(MHD_LIBDEPS)
     32 
     33 check_PROGRAMS = \
     34   unit_str_base64 \
     35   unit_str_bin_hex \
     36   unit_str_compare \
     37   unit_str_from_value \
     38   unit_str_quote \
     39   unit_str_to_value \
     40   unit_str_token \
     41   unit_str_token_remove \
     42   unit_str_tokens_remove \
     43   unit_str_pct \
     44   unit_str \
     45   unit_http_mthd_parse \
     46   unit_http_mthd_parse_c64 \
     47   unit_http_mthd_parse_c32f \
     48   unit_http_mthd_parse_c32c \
     49   unit_http_mthd_parse_c64_unk \
     50   unit_http_mthd_parse_c32f_unk \
     51   unit_http_mthd_parse_c32c_unk
     52 
     53 if MHD_SUPPORT_HTTP2
     54 check_PROGRAMS += \
     55   unit_h2_huffman_encode \
     56   unit_h2_huffman_decode \
     57   unit_hpack_tables_dynamic \
     58   unit_hpack_tables_static \
     59   unit_hpack_tables_combined \
     60   $(EMPTY_ITEM)
     61 endif
     62 
     63 if MHD_SUPPORT_MD5
     64 check_PROGRAMS += \
     65   unit_md5
     66 endif
     67 
     68 if MHD_SUPPORT_SHA256
     69 check_PROGRAMS += \
     70   unit_sha256
     71 endif
     72 
     73 if MHD_SUPPORT_SHA512_256
     74 check_PROGRAMS += \
     75   unit_sha512_256
     76 endif
     77 
     78 TESTS = $(check_PROGRAMS)
     79 
     80 unit_str_SOURCES = unit_str.c
     81 
     82 unit_str_compare_SOURCES = \
     83   unit_str_compare.c \
     84   $(srcdir)/../mhdt_has_in_name.h
     85 
     86 unit_str_to_value_SOURCES = \
     87   unit_str_to_value.c \
     88   $(srcdir)/../mhdt_has_in_name.h
     89 
     90 unit_str_from_value_SOURCES = \
     91   unit_str_from_value.c \
     92   $(srcdir)/../mhdt_has_in_name.h
     93 
     94 unit_str_token_SOURCES = \
     95   unit_str_token.c
     96 
     97 unit_str_token_remove_SOURCES = \
     98   unit_str_token_remove.c
     99 
    100 unit_str_tokens_remove_SOURCES = \
    101   unit_str_tokens_remove.c
    102 
    103 unit_http_mthd_parse_SOURCES = \
    104   unit_http_mthd_parse.c \
    105   $(srcdir)/../mhdt_checks.h \
    106   $(srcdir)/../mhdt_has_param.h \
    107   $(srcdir)/../../mhd2/http_method_parse.c \
    108   $(srcdir)/../../mhd2/http_method_parse.h
    109 unit_http_mthd_parse_CPPFLAGS = $(AM_CPPFLAGS)
    110 
    111 unit_http_mthd_parse_c64_SOURCES = $(unit_http_mthd_parse_SOURCES)
    112 unit_http_mthd_parse_c64_CPPFLAGS = $(AM_CPPFLAGS) -Dmhd_H_M_FUNC_FOR_64=1
    113 
    114 unit_http_mthd_parse_c32f_SOURCES = $(unit_http_mthd_parse_SOURCES)
    115 unit_http_mthd_parse_c32f_CPPFLAGS = \
    116   $(AM_CPPFLAGS) -Dmhd_H_M_FUNC_FOR_32_FAST=1
    117 
    118 unit_http_mthd_parse_c32c_SOURCES = $(unit_http_mthd_parse_SOURCES)
    119 unit_http_mthd_parse_c32c_CPPFLAGS = \
    120   $(AM_CPPFLAGS) -Dmhd_H_M_FUNC_FOR_32_COMPACT=1
    121 
    122 unit_http_mthd_parse_c64_unk_SOURCES = $(unit_http_mthd_parse_SOURCES)
    123 unit_http_mthd_parse_c64_unk_CPPFLAGS = \
    124   $(AM_CPPFLAGS) -Dmhd_H_M_FUNC_FOR_64=1 -Dmhd_H_M_TEST_UNKNOWN_ORDER=1
    125 
    126 unit_http_mthd_parse_c32f_unk_SOURCES = $(unit_http_mthd_parse_SOURCES)
    127 unit_http_mthd_parse_c32f_unk_CPPFLAGS = \
    128   $(AM_CPPFLAGS) -Dmhd_H_M_FUNC_FOR_32_FAST=1 \
    129   -Dmhd_H_M_TEST_UNKNOWN_ORDER=1
    130 
    131 unit_http_mthd_parse_c32c_unk_SOURCES = $(unit_http_mthd_parse_SOURCES)
    132 unit_http_mthd_parse_c32c_unk_CPPFLAGS = \
    133   $(AM_CPPFLAGS) -Dmhd_H_M_FUNC_FOR_32_COMPACT=1 \
    134   -Dmhd_H_M_TEST_UNKNOWN_ORDER=1
    135 
    136 unit_h2_huffman_encode_SOURCES = \
    137   unit_h2_huffman_codec.c \
    138   $(srcdir)/../mhdt_has_in_name.h \
    139   $(srcdir)/../mhdt_has_param.h \
    140   $(HPACK_SRC_DIR)/h2_huffman_codec.c
    141 
    142 unit_h2_huffman_decode_SOURCES = $(unit_h2_huffman_encode_SOURCES)
    143 
    144 unit_hpack_tables_dynamic_SOURCES = \
    145   unit_hpack_tables.c \
    146   $(srcdir)/../mhdt_has_in_name.h \
    147   $(srcdir)/../mhdt_has_param.h \
    148   $(srcdir)/../mhdt_checks.h
    149 
    150 unit_hpack_tables_static_SOURCES = $(unit_hpack_tables_dynamic_SOURCES)
    151 
    152 unit_hpack_tables_combined_SOURCES = $(unit_hpack_tables_dynamic_SOURCES)
    153 
    154 
    155 unit_md5_SOURCES = \
    156   unit_md5.c \
    157   $(srcdir)/../../mhd2/mhd_md5.h
    158 
    159 if MHD_MD5_BUILTIN
    160   unit_md5_SOURCES += \
    161     $(srcdir)/../../mhd2/md5_builtin.c $(srcdir)/../../mhd2/md5_builtin.h
    162 endif
    163 if MHD_MD5_GNUTLS
    164   unit_md5_SOURCES += \
    165     $(srcdir)/../../mhd2/md5_gnutls.c $(srcdir)/../../mhd2/md5_gnutls.h
    166 endif
    167 if MHD_MD5_OPENSSL
    168   unit_md5_SOURCES += \
    169     $(srcdir)/../../mhd2/md5_openssl.c $(srcdir)/../../mhd2/md5_openssl.h
    170 endif
    171 if MHD_MD5_MBEDTLS
    172   unit_md5_SOURCES += \
    173     $(srcdir)/../../mhd2/md5_mbedtls.c $(srcdir)/../../mhd2/md5_mbedtls.h
    174 endif
    175 
    176 
    177 unit_sha256_SOURCES = \
    178   unit_sha256.c \
    179   $(srcdir)/../../mhd2/mhd_sha256.h
    180 
    181 if MHD_SHA256_BUILTIN
    182   unit_sha256_SOURCES += \
    183     $(srcdir)/../../mhd2/sha256_builtin.c $(srcdir)/../../mhd2/sha256_builtin.h
    184 endif
    185 if MHD_SHA256_GNUTLS
    186   unit_sha256_SOURCES += \
    187     $(srcdir)/../../mhd2/sha256_gnutls.c $(srcdir)/../../mhd2/sha256_gnutls.h
    188 endif
    189 if MHD_SHA256_OPENSSL
    190   unit_sha256_SOURCES += \
    191     $(srcdir)/../../mhd2/sha256_openssl.c $(srcdir)/../../mhd2/sha256_openssl.h
    192 endif
    193 if MHD_SHA256_MBEDTLS
    194   unit_sha256_SOURCES += \
    195     $(srcdir)/../../mhd2/sha256_mbedtls.c $(srcdir)/../../mhd2/sha256_mbedtls.h
    196 endif
    197 
    198 unit_sha512_256_SOURCES = \
    199   unit_sha512_256.c \
    200   $(srcdir)/../../mhd2/mhd_sha512_256.h
    201 
    202 if MHD_SHA512_256_BUILTIN
    203   unit_sha512_256_SOURCES += \
    204     $(srcdir)/../../mhd2/sha512_256_builtin.c \
    205     $(srcdir)/../../mhd2/sha512_256_builtin.h
    206 endif
    207 if MHD_SHA512_256_OPENSSL
    208   unit_sha512_256_SOURCES += \
    209     $(srcdir)/../../mhd2/sha512_256_openssl.c \
    210     $(srcdir)/../../mhd2/sha512_256_openssl.h
    211 endif
    212 if MHD_SHA512_X_MBEDTLS
    213   unit_sha512_256_SOURCES += \
    214     $(srcdir)/../../mhd2/sha512_256_mbedtls.c \
    215     $(srcdir)/../../mhd2/sha512_256_mbedtls.h
    216 endif