1 # nghttp2 - HTTP/2 C Library
3 # Copyright (c) 2012 Tatsuhiro Tsujikawa
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:
13 # The above copyright notice and this permission notice shall be
14 # included in all copies or substantial portions of the Software.
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.
27 test.example.com.pem \
34 AM_CFLAGS = $(WARNCFLAGS) -fPIE
35 AM_CXXFLAGS = $(WARNCXXFLAGS) $(CXX1XCXXFLAGS)
37 -DPKGDATADIR='"$(pkgdatadir)"' \
38 -DPKGLIBDIR='"$(pkglibdir)"' \
39 -I$(top_srcdir)/lib/includes \
40 -I$(top_builddir)/lib/includes \
42 -I$(top_srcdir)/src/includes \
43 -I$(top_srcdir)/third-party \
44 -I$(top_srcdir)/third-party/llhttp/include \
49 @LIBNGTCP2_CRYPTO_OPENSSL_CFLAGS@ \
50 @LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS@ \
60 AM_LDFLAGS = @LIBTOOL_LDFLAGS@
62 LDADD = $(top_builddir)/lib/libnghttp2.la \
63 $(top_builddir)/third-party/liburl-parser.la \
64 $(top_builddir)/third-party/libllhttp.la \
69 @LIBNGTCP2_CRYPTO_OPENSSL_LIBS@ \
70 @LIBNGTCP2_CRYPTO_BORINGSSL_LIBS@ \
82 bin_PROGRAMS += nghttp nghttpd nghttpx
84 HELPER_OBJECTS = util.cc \
85 http2.cc timegm.c app_helper.cc nghttp2_gzip.c
86 HELPER_HFILES = util.h \
87 http2.h timegm.h app_helper.h nghttp2_config.h \
88 nghttp2_gzip.h network.h
91 HTML_PARSER_HFILES = HtmlParser.h
94 HTML_PARSER_OBJECTS += HtmlParser.cc
97 nghttp_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} nghttp.cc nghttp.h \
98 ${HTML_PARSER_OBJECTS} ${HTML_PARSER_HFILES} \
101 nghttpd_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} nghttpd.cc \
103 HttpServer.cc HttpServer.h
105 bin_PROGRAMS += h2load
107 h2load_SOURCES = util.cc util.h \
108 http2.cc http2.h h2load.cc h2load.h \
112 h2load_http2_session.cc h2load_http2_session.h \
113 h2load_http1_session.cc h2load_http1_session.h
117 h2load_http3_session.cc h2load_http3_session.h \
118 h2load_quic.cc h2load_quic.h \
123 util.cc util.h http2.cc http2.h timegm.c timegm.h base64.h \
124 app_helper.cc app_helper.h \
126 shrpx_config.cc shrpx_config.h \
128 shrpx_accept_handler.cc shrpx_accept_handler.h \
129 shrpx_connection_handler.cc shrpx_connection_handler.h \
130 shrpx_client_handler.cc shrpx_client_handler.h \
132 shrpx_http2_upstream.cc shrpx_http2_upstream.h \
133 shrpx_https_upstream.cc shrpx_https_upstream.h \
134 shrpx_downstream.cc shrpx_downstream.h \
135 shrpx_downstream_connection.cc shrpx_downstream_connection.h \
136 shrpx_http_downstream_connection.cc shrpx_http_downstream_connection.h \
137 shrpx_http2_downstream_connection.cc shrpx_http2_downstream_connection.h \
138 shrpx_http2_session.cc shrpx_http2_session.h \
139 shrpx_downstream_queue.cc shrpx_downstream_queue.h \
140 shrpx_log.cc shrpx_log.h \
141 shrpx_http.cc shrpx_http.h \
142 shrpx_io_control.cc shrpx_io_control.h \
143 shrpx_tls.cc shrpx_tls.h \
144 shrpx_worker.cc shrpx_worker.h \
145 shrpx_log_config.cc shrpx_log_config.h \
146 shrpx_connect_blocker.cc shrpx_connect_blocker.h \
147 shrpx_live_check.cc shrpx_live_check.h \
148 shrpx_downstream_connection_pool.cc shrpx_downstream_connection_pool.h \
149 shrpx_rate_limit.cc shrpx_rate_limit.h \
150 shrpx_connection.cc shrpx_connection.h \
151 shrpx_memcached_dispatcher.cc shrpx_memcached_dispatcher.h \
152 shrpx_memcached_connection.cc shrpx_memcached_connection.h \
153 shrpx_memcached_request.h \
154 shrpx_memcached_result.h \
155 shrpx_worker_process.cc shrpx_worker_process.h \
157 shrpx_signal.cc shrpx_signal.h \
158 shrpx_router.cc shrpx_router.h \
159 shrpx_api_downstream_connection.cc shrpx_api_downstream_connection.h \
160 shrpx_health_monitor_downstream_connection.cc \
161 shrpx_health_monitor_downstream_connection.h \
162 shrpx_null_downstream_connection.cc shrpx_null_downstream_connection.h \
163 shrpx_exec.cc shrpx_exec.h \
164 shrpx_dns_resolver.cc shrpx_dns_resolver.h \
165 shrpx_dual_dns_resolver.cc shrpx_dual_dns_resolver.h \
166 shrpx_dns_tracker.cc shrpx_dns_tracker.h \
167 buffer.h memchunk.h template.h allocator.h \
168 xsi_strerror.c xsi_strerror.h
172 shrpx_mruby.cc shrpx_mruby.h \
173 shrpx_mruby_module.cc shrpx_mruby_module.h \
174 shrpx_mruby_module_env.cc shrpx_mruby_module_env.h \
175 shrpx_mruby_module_request.cc shrpx_mruby_module_request.h \
176 shrpx_mruby_module_response.cc shrpx_mruby_module_response.h
181 shrpx_quic.cc shrpx_quic.h \
182 shrpx_quic_listener.cc shrpx_quic_listener.h \
183 shrpx_quic_connection_handler.cc shrpx_quic_connection_handler.h \
184 shrpx_http3_upstream.cc shrpx_http3_upstream.h \
189 noinst_LIBRARIES = libnghttpx.a
190 libnghttpx_a_SOURCES = ${NGHTTPX_SRCS}
191 libnghttpx_a_CPPFLAGS = ${AM_CPPFLAGS}
193 nghttpx_SOURCES = shrpx.cc shrpx.h
194 nghttpx_CPPFLAGS = ${libnghttpx_a_CPPFLAGS}
195 nghttpx_LDADD = libnghttpx.a ${LDADD}
196 nghttpx_LDFLAGS = -pie
199 libnghttpx_a_CPPFLAGS += \
200 -I${top_srcdir}/third-party/mruby/include @LIBMRUBY_CFLAGS@
201 nghttpx_LDADD += -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@
205 libnghttpx_a_CPPFLAGS += -I${top_srcdir}/third-party/neverbleed
206 nghttpx_LDADD += ${top_builddir}/third-party/libneverbleed.la
207 endif # HAVE_NEVERBLEED
210 check_PROGRAMS += nghttpx-unittest
211 nghttpx_unittest_SOURCES = shrpx-unittest.cc \
212 shrpx_tls_test.cc shrpx_tls_test.h \
213 shrpx_downstream_test.cc shrpx_downstream_test.h \
214 shrpx_config_test.cc shrpx_config_test.h \
215 shrpx_worker_test.cc shrpx_worker_test.h \
216 shrpx_http_test.cc shrpx_http_test.h \
217 shrpx_router_test.cc shrpx_router_test.h \
218 http2_test.cc http2_test.h \
219 util_test.cc util_test.h \
220 nghttp2_gzip_test.c nghttp2_gzip_test.h \
221 nghttp2_gzip.c nghttp2_gzip.h \
222 buffer_test.cc buffer_test.h \
223 memchunk_test.cc memchunk_test.h \
224 template_test.cc template_test.h \
225 base64_test.cc base64_test.h
226 nghttpx_unittest_CPPFLAGS = ${AM_CPPFLAGS} \
227 -DNGHTTP2_SRC_DIR=\"$(top_srcdir)/src\"
228 nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} @CUNIT_LIBS@ @TESTLDADD@
231 nghttpx_unittest_CPPFLAGS += \
232 -I${top_srcdir}/third-party/mruby/include @LIBMRUBY_CFLAGS@
233 nghttpx_unittest_LDADD += \
234 -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@
238 nghttpx_unittest_CPPFLAGS += -I${top_srcdir}/third-party/neverbleed
239 nghttpx_unittest_LDADD += ${top_builddir}/third-party/libneverbleed.la
240 endif # HAVE_NEVERBLEED
242 TESTS += nghttpx-unittest
247 if ENABLE_HPACK_TOOLS
249 bin_PROGRAMS += inflatehd deflatehd
251 HPACK_TOOLS_COMMON_SRCS = comp_helper.c comp_helper.h
253 inflatehd_SOURCES = inflatehd.cc $(HPACK_TOOLS_COMMON_SRCS)
255 deflatehd_SOURCES = deflatehd.cc $(HPACK_TOOLS_COMMON_SRCS)
257 endif # ENABLE_HPACK_TOOLS
261 pkgconfigdir = $(libdir)/pkgconfig
262 pkgconfig_DATA = libnghttp2_asio.pc
263 DISTCLEANFILES = $(pkgconfig_DATA)
265 lib_LTLIBRARIES = libnghttp2_asio.la
267 libnghttp2_asio_la_SOURCES = \
268 util.cc util.h http2.cc http2.h \
272 asio_common.cc asio_common.h \
273 asio_io_service_pool.cc asio_io_service_pool.h \
274 asio_server_http2.cc \
275 asio_server_http2_impl.cc asio_server_http2_impl.h \
276 asio_server.cc asio_server.h \
277 asio_server_http2_handler.cc asio_server_http2_handler.h \
278 asio_server_connection.h \
279 asio_server_request.cc \
280 asio_server_request_impl.cc asio_server_request_impl.h \
281 asio_server_response.cc \
282 asio_server_response_impl.cc asio_server_response_impl.h \
283 asio_server_stream.cc asio_server_stream.h \
284 asio_server_serve_mux.cc asio_server_serve_mux.h \
285 asio_server_request_handler.cc asio_server_request_handler.h \
286 asio_server_tls_context.cc asio_server_tls_context.h \
287 asio_client_session.cc \
288 asio_client_session_impl.cc asio_client_session_impl.h \
289 asio_client_session_tcp_impl.cc asio_client_session_tcp_impl.h \
290 asio_client_session_tls_impl.cc asio_client_session_tls_impl.h \
291 asio_client_response.cc \
292 asio_client_response_impl.cc asio_client_response_impl.h \
293 asio_client_request.cc \
294 asio_client_request_impl.cc asio_client_request_impl.h \
295 asio_client_stream.cc asio_client_stream.h \
296 asio_client_tls_context.cc asio_client_tls_context.h
299 libnghttp2_asio_la_CPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS} -fPIE
300 libnghttp2_asio_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 1:0:0 -pie
301 libnghttp2_asio_la_LIBADD = \
302 $(top_builddir)/lib/libnghttp2.la \
303 $(top_builddir)/third-party/liburl-parser.la \
304 $(top_builddir)/third-party/libllhttp.la \
308 ${BOOST_THREAD_LIB} \
311 endif # ENABLE_ASIO_LIB