Makefile.am (2332B)
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) $(MHD_LIB_CPPFLAGS) 16 17 AM_CFLAGS = $(CFLAGS_ac) $(MHD_LIB_CFLAGS) 18 19 AM_LDFLAGS = $(LDFLAGS_ac) $(MHD_LIB_LDFLAGS) 20 21 AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT_ac) 22 23 if USE_COVERAGE 24 AM_CFLAGS += -fprofile-arcs -ftest-coverage 25 endif 26 27 LDADD = $(MHD_LIBDEPS) 28 29 check_PROGRAMS = \ 30 test_str_compare \ 31 test_str_to_value \ 32 test_str_from_value \ 33 test_str_token \ 34 test_str_token_remove \ 35 test_str_tokens_remove \ 36 test_str_pct \ 37 test_str_bin_hex \ 38 unit_str 39 40 if MHD_SUPPORT_HTTP2 41 check_PROGRAMS += \ 42 unit_h2_huffman_encode \ 43 unit_h2_huffman_decode \ 44 unit_hpack_tables_dynamic \ 45 unit_hpack_tables_static \ 46 unit_hpack_tables_combined \ 47 $(EMPTY_ITEM) 48 endif 49 50 if MHD_SUPPORT_MD5 51 check_PROGRAMS += \ 52 unit_md5 53 endif 54 55 if MHD_SUPPORT_SHA256 56 check_PROGRAMS += \ 57 unit_sha256 58 endif 59 60 if MHD_SUPPORT_SHA512_256 61 check_PROGRAMS += \ 62 unit_sha512_256 63 endif 64 65 TESTS = $(check_PROGRAMS) 66 67 unit_str_SOURCES = unit_str.c 68 69 test_str_compare_SOURCES = \ 70 test_str_compare.c test_helpers.h 71 72 test_str_to_value_SOURCES = \ 73 test_str_to_value.c test_helpers.h 74 75 test_str_from_value_SOURCES = \ 76 test_str_from_value.c test_helpers.h 77 78 test_str_token_SOURCES = \ 79 test_str_token.c 80 81 test_str_token_remove_SOURCES = \ 82 test_str_token_remove.c 83 84 test_str_tokens_remove_SOURCES = \ 85 test_str_tokens_remove.c 86 87 unit_h2_huffman_encode_SOURCES = \ 88 unit_h2_huffman_codec.c \ 89 $(srcdir)/../mhdt_has_in_name.h \ 90 $(srcdir)/../mhdt_has_param.h \ 91 $(HPACK_SRC_DIR)/h2_huffman_codec.c 92 93 unit_h2_huffman_decode_SOURCES = $(unit_h2_huffman_encode_SOURCES) 94 95 unit_hpack_tables_dynamic_SOURCES = \ 96 unit_hpack_tables.c \ 97 $(srcdir)/../mhdt_has_in_name.h \ 98 $(srcdir)/../mhdt_has_param.h \ 99 $(srcdir)/../mhdt_checks.h 100 101 unit_hpack_tables_static_SOURCES = $(unit_hpack_tables_dynamic_SOURCES) 102 103 unit_hpack_tables_combined_SOURCES = $(unit_hpack_tables_dynamic_SOURCES) 104 105 106 unit_md5_SOURCES = unit_md5.c 107 108 unit_sha256_SOURCES = unit_sha256.c 109 110 unit_sha512_256_SOURCES = unit_sha512_256.c