Apply PIE to nghttpx
[platform/upstream/nghttp2.git] / third-party / Makefile.am
1 # nghttp2 - HTTP/2 C Library
2
3 # Copyright (c) 2014 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 AM_CPPFLAGS = @DEFS@
25
26 EXTRA_DIST = CMakeLists.txt
27
28 if ENABLE_THIRD_PARTY
29
30 noinst_LTLIBRARIES = liburl-parser.la
31 liburl_parser_la_SOURCES = \
32         url-parser/url_parser.c \
33         url-parser/url_parser.h
34
35 noinst_LTLIBRARIES += libllhttp.la
36 libllhttp_la_SOURCES = \
37         llhttp/src/api.c \
38         llhttp/src/http.c \
39         llhttp/src/llhttp.c \
40         llhttp/include/llhttp.h
41 libllhttp_la_CPPFLAGS = -I${srcdir}/llhttp/include
42
43 if HAVE_NEVERBLEED
44 noinst_LTLIBRARIES += libneverbleed.la
45 libneverbleed_la_CPPFLAGS = @OPENSSL_CFLAGS@
46 libneverbleed_la_LIBADD = @OPENSSL_LIBS@
47 libneverbleed_la_SOURCES = neverbleed/neverbleed.c neverbleed/neverbleed.h
48 endif # HAVE_NEVERBLEED
49
50 if HAVE_MRUBY
51
52 EXTRA_DIST += build_config.rb mruby/*
53
54 .PHONY: all-local clean mruby
55
56 mruby:
57         MRUBY_CONFIG="${srcdir}/build_config.rb" \
58         BUILD_DIR="${abs_builddir}/mruby/build" \
59         INSTALL_DIR="${abs_builddir}/mruby/build/install/bin" \
60         CC="${CC}" CXX="$(firstword $(CXX))" LD="${LD}" \
61         CFLAGS="${CPPFLAGS} ${CFLAGS}" \
62         CXXFLAGS="$(wordlist 2, $(words $(CXX)), $(CXX)) ${CPPFLAGS} ${CXXFLAGS}" \
63         LDFLAGS="${LDFLAGS}" \
64         "${srcdir}/mruby/minirake" -f "${srcdir}/mruby/Rakefile"
65
66 all-local: mruby
67
68 clean-local:
69         MRUBY_CONFIG="${srcdir}/build_config.rb" \
70         BUILD_DIR="${abs_builddir}/mruby/build" \
71         "${srcdir}/mruby/minirake" -f "${srcdir}/mruby/Rakefile" clean
72
73 endif # HAVE_MRUBY
74
75 endif # ENABLE_THIRD_PARTY