avoid redundant const -- move it to the right of "*"
[iwhd.git] / Makefile.am
blob323bcd20e9ccbc34f1715039b1c60c3c91a2f5b4
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 # FIXME: don't hard-code 2.0
20 AM_CPPFLAGS     = -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
22 iwhd_YFLAGS = -d
24 SUBDIRS = lib . t man gnulib-tests
25 ACLOCAL_AMFLAGS = -I m4
27 # iwhd is short for Image WareHouse Daemon.
28 bin_PROGRAMS = iwhd
30 EXTRA_DIST =            \
31   iwhd-qparser.h        \
32   iwhd.spec             \
33   iwhd.spec.in
35 BUILT_SOURCES = iwhd-qparser.h qlexer.c
37 MOSTLYCLEANFILES =
38 MAINTAINERCLEANFILES =
40 iwhd_SOURCES = \
41   auto.c        \
42   backend.c     \
43   backend.h     \
44   iwh.h         \
45   meta.cpp      \
46   meta.h        \
47   mpipe.c       \
48   mpipe.h       \
49   replica.c     \
50   replica.h     \
51   qparser.y     \
52   query.h       \
53   rest.c        \
54   setup.c       \
55   setup.h       \
56   state_defs.h  \
57   template.c    \
58   template.h
60 EXTRA_iwhd_SOURCES = qlexer.l
62 MOSTLYCLEANFILES += iwhd.spec
63 MAINTAINERCLEANFILES += iwhd.spec
64 iwhd.spec: iwhd.spec.in Makefile.am
65         rm -f $@-t $@
66         sed 's/@''VERSION@/$(VERSION)/' $< > $@-t
67         chmod a=r $@-t
68         mv $@-t $@
70 .PHONY: rpm
71 rpm: dist iwhd.spec
72         chmod 644 $(distdir).tar.gz
73         rpmbuild -ta $(distdir).tar.gz
75 iwhd_CPPFLAGS   = $(HAIL_CFLAGS) -I$(top_srcdir)/lib
76 iwhd_LDADD =            \
77   lib/libiwhd.a         \
78   -lmongoclient         \
79   $(BOOST_SYSTEM_LIB)   \
80   $(BOOST_THREAD_LIB)   \
81   $(CURL_LIB)           \
82   $(JANSSON_LIB)        \
83   $(UHTTPD_LIB)         \
84   $(PTHREAD_LIB)        \
85   $(XML2_LIB)           \
86   $(GLIB2_LIB)          \
87   $(HAIL_LIBS)
89 MOSTLYCLEANFILES += qlexer.c
90 MAINTAINERCLEANFILES += qlexer.c
91 EXTRA_DIST += qlexer.c