• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# nghttp2 - HTTP/2 C Library
2
3# Copyright (c) 2012 Tatsuhiro Tsujikawa
4
5# Permission is hereby granted, free of charge, to any person obtaining
6# a copy of this software and associated documentation files (the
7# "Software"), to deal in the Software without restriction, including
8# without limitation the rights to use, copy, modify, merge, publish,
9# distribute, sublicense, and/or sell copies of the Software, and to
10# permit persons to whom the Software is furnished to do so, subject to
11# the following conditions:
12
13# The above copyright notice and this permission notice shall be
14# included in all copies or substantial portions of the Software.
15
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23SUBDIRS = testdata
24
25EXTRA_DIST = CMakeLists.txt
26
27if HAVE_CUNIT
28
29check_PROGRAMS = main
30
31if ENABLE_FAILMALLOC
32check_PROGRAMS += failmalloc
33endif # ENABLE_FAILMALLOC
34
35OBJECTS = main.c nghttp2_pq_test.c nghttp2_map_test.c nghttp2_queue_test.c \
36	nghttp2_test_helper.c \
37	nghttp2_frame_test.c \
38	nghttp2_stream_test.c \
39	nghttp2_session_test.c \
40	nghttp2_hd_test.c \
41	nghttp2_npn_test.c \
42	nghttp2_helper_test.c \
43	nghttp2_buf_test.c \
44	nghttp2_http_test.c \
45	nghttp2_extpri_test.c
46
47HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \
48	nghttp2_session_test.h \
49	nghttp2_frame_test.h nghttp2_stream_test.h nghttp2_hd_test.h \
50	nghttp2_npn_test.h nghttp2_helper_test.h \
51	nghttp2_test_helper.h \
52	nghttp2_buf_test.h \
53	nghttp2_http_test.h \
54	nghttp2_extpri_test.h
55
56main_SOURCES = $(HFILES) $(OBJECTS)
57
58if ENABLE_STATIC
59main_LDADD = ${top_builddir}/lib/libnghttp2.la
60else
61# With static lib disabled and symbol hiding enabled, we have to link object
62# files directly because the tests use symbols not included in public API.
63main_LDADD = ${top_builddir}/lib/.libs/*.o
64endif
65
66main_LDADD += @CUNIT_LIBS@ @TESTLDADD@
67main_LDFLAGS = -static
68
69if ENABLE_FAILMALLOC
70failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \
71	malloc_wrapper.c malloc_wrapper.h \
72	nghttp2_test_helper.c nghttp2_test_helper.h
73failmalloc_LDADD = $(main_LDADD)
74failmalloc_LDFLAGS = $(main_LDFLAGS)
75endif # ENABLE_FAILMALLOC
76
77AM_CFLAGS = $(WARNCFLAGS) \
78	-I${top_srcdir}/lib \
79	-I${top_srcdir}/lib/includes \
80	-I${top_builddir}/lib/includes \
81	-DBUILDING_NGHTTP2 \
82	@CUNIT_CFLAGS@ @DEFS@
83
84TESTS = main
85
86if ENABLE_FAILMALLOC
87TESTS += failmalloc
88endif # ENABLE_FAILMALLOC
89
90if ENABLE_APP
91
92# EXTRA_DIST = end_to_end.py
93# TESTS += end_to_end.py
94
95endif # ENABLE_APP
96
97endif # HAVE_CUNIT
98