don't ignore failed thread creation
[iwhd.git] / Makefile.am
blob19fb253dbc3c43efc24c510b20c0b9d58cc1fe2b
1 # Copyright (C) 2010 Red Hat, Inc.
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 AM_CFLAGS = -W -Wall -Wextra -Wno-unused -Wformat-security \
17   -Wp,-D_FORTIFY_SOURCE=2 -O2 -fdiagnostics-show-option
19 AM_CPPFLAGS     = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
21 SUBDIRS = t
22 ACLOCAL_AMFLAGS = -I ax
24 bin_PROGRAMS = iwhd
25 EXTRA_DIST = query.leg
27 # iwhd is short for Image WareHouse Daemon.
29 iwhd_SOURCES = \
30   backend.c     \
31   backend.h     \
32   iwh.h         \
33   meta.cpp      \
34   meta.h        \
35   mpipe.c       \
36   mpipe.h       \
37   proxy.c       \
38   proxy.h       \
39   query.c       \
40   query.h       \
41   rest.c        \
42   state_defs.h  \
43   template.c    \
44   template.h
46 iwhd_CPPFLAGS   = $(HAIL_CFLAGS)
47 iwhd_LDADD =            \
48   -lmongoclient         \
49   $(BOOST_SYSTEM_LIB)   \
50   $(BOOST_THREAD_LIB)   \
51   $(CRYPTO_LIB)         \
52   $(CURL_LIB)           \
53   $(JANSSON_LIB)        \
54   $(UHTTPD_LIB)         \
55   $(PTHREAD_LIB)        \
56   $(XML2_LIB)           \
57   $(GLIB2_LIB)          \
58   $(HAIL_LIBS)
60 # leg is a lexer/parser-generator
61 # http://piumarta.com/software/peg/peg-0.1.4.tar.gz
62 query-orig.c: query.leg
63         leg < $(srcdir)/query.leg > $@-t && mv $@-t $@
65 # Apply this patch to fix NULL-deref bugs in the generated query-orig.c:
66 query.c: query-orig.c query.c.diff
67         patch --fuzz=0 query-orig.c $(srcdir)/query.c.diff --output=$@-t
68         mv $@-t $@
70 BUILT_SOURCES = query.c
71 CLEANFILES = query-orig.c
72 MOSTLYCLEANFILES = query.c query-orig.c-t
73 MAINTAINERCLEANFILES = query.c query-orig.c
74 EXTRA_DIST += query.c.diff