Use gnulib
[iwhd.git] / Makefile.am
blob7c3d1af2c31085d47695de47ece199af75de438d
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 iwhd_YFLAGS = -d
23 SUBDIRS = lib . t man gnulib-tests
24 ACLOCAL_AMFLAGS = -I m4
26 # iwhd is short for Image WareHouse Daemon.
27 bin_PROGRAMS = iwhd
29 EXTRA_DIST =            \
30   iwhd-qparser.h        \
31   iwhd.spec             \
32   iwhd.spec.in
34 BUILT_SOURCES = iwhd-qparser.h qlexer.c
36 MOSTLYCLEANFILES =
37 MAINTAINERCLEANFILES =
39 iwhd_SOURCES = \
40   auto.c        \
41   backend.c     \
42   backend.h     \
43   iwh.h         \
44   meta.cpp      \
45   meta.h        \
46   mpipe.c       \
47   mpipe.h       \
48   replica.c     \
49   replica.h     \
50   qparser.y     \
51   query.h       \
52   rest.c        \
53   setup.c       \
54   setup.h       \
55   state_defs.h  \
56   template.c    \
57   template.h
59 EXTRA_iwhd_SOURCES = qlexer.l
61 MOSTLYCLEANFILES += iwhd.spec
62 MAINTAINERCLEANFILES += iwhd.spec
63 iwhd.spec: iwhd.spec.in Makefile.am
64         rm -f $@-t $@
65         sed 's/@''VERSION@/$(VERSION)/' $< > $@-t
66         chmod a=r $@-t
67         mv $@-t $@
69 .PHONY: rpm
70 rpm: dist iwhd.spec
71         chmod 644 $(distdir).tar.gz
72         rpmbuild -ta $(distdir).tar.gz
74 iwhd_CPPFLAGS   = $(HAIL_CFLAGS)
75 iwhd_LDADD =            \
76   -lmongoclient         \
77   $(BOOST_SYSTEM_LIB)   \
78   $(BOOST_THREAD_LIB)   \
79   $(CURL_LIB)           \
80   $(JANSSON_LIB)        \
81   $(UHTTPD_LIB)         \
82   $(PTHREAD_LIB)        \
83   $(XML2_LIB)           \
84   $(GLIB2_LIB)          \
85   $(HAIL_LIBS)
87 MOSTLYCLEANFILES += qlexer.c
88 MAINTAINERCLEANFILES += qlexer.c
89 EXTRA_DIST += qlexer.c