tizen 2.4 release
[external/nghttp2.git] / examples / Makefile.am
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.
23
24 if ENABLE_EXAMPLES
25
26 AM_CFLAGS = $(WARNCFLAGS)
27 AM_CPPFLAGS = \
28         -Wall \
29         -I$(top_srcdir)/lib/includes \
30         -I$(top_builddir)/lib/includes \
31         -I$(top_srcdir)/src/includes \
32         -I$(top_srcdir)/third-party \
33         @LIBEVENT_OPENSSL_CFLAGS@ \
34         @OPENSSL_CFLAGS@ \
35         @DEFS@
36 LDADD = $(top_builddir)/lib/libnghttp2.la \
37         $(top_builddir)/third-party/libhttp-parser.la \
38         @LIBEVENT_OPENSSL_LIBS@ \
39         @OPENSSL_LIBS@
40
41 noinst_PROGRAMS = client libevent-client libevent-server deflate
42
43 client_SOURCES = client.c
44
45 libevent_client_SOURCES = libevent-client.c
46
47 libevent_server_SOURCES = libevent-server.c
48
49 deflate_SOURCES = deflate.c
50
51 if ENABLE_TINY_NGHTTPD
52
53 noinst_PROGRAMS += tiny-nghttpd
54
55 tiny_nghttpd_SOURCES = tiny-nghttpd.c
56
57 endif # ENABLE_TINY_NGHTTPD
58
59 if ENABLE_ASIO_LIB
60
61 noinst_PROGRAMS += asio-sv asio-sv2 asio-sv3
62
63 ASIOCPPFLAGS = ${BOOST_CPPFLAGS} ${AM_CPPFLAGS}
64 ASIOLDADD = $(top_builddir)/src/libnghttp2_asio.la @JEMALLOC_LIBS@
65
66 asio_sv_SOURCES = asio-sv.cc
67 asio_sv_CPPFLAGS = ${ASIOCPPFLAGS}
68 asio_sv_LDADD = ${ASIOLDADD}
69
70 asio_sv2_SOURCES = asio-sv2.cc
71 asio_sv2_CPPFLAGS = ${ASIOCPPFLAGS}
72 asio_sv2_LDADD = ${ASIOLDADD}
73
74 asio_sv3_SOURCES = asio-sv3.cc
75 asio_sv3_CPPFLAGS = ${ASIOCPPFLAGS}
76 asio_sv3_LDADD = ${ASIOLDADD}
77
78 endif # ENABLE_ASIO_LIB
79
80 endif # ENABLE_EXAMPLES