Hostinfo day 6: RPM packaging, initscripts, hostinfo-status, hostinfo-test.
[virt-hostinfo.git] / hostinfod / Makefile.am
1 # virt-hostinfo
2 # Copyright (C) 2009 Red Hat Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 EXTRA_DIST = hostinfo.pod hostinfo-protocol.pod hostinfod.8
19
20 CLEANFILES = hostinfo.8 hostinfo-protocol.5
21
22 sbin_PROGRAMS = hostinfod
23
24 hostinfod_SOURCES = \
25         apr12-compat.h \
26         commands.c \
27         configuration.c \
28         error.c \
29         hostinfod.h \
30         main.c \
31         monitor_sockets.c \
32         nodeinfo.c \
33         ping.c \
34         virt.c
35
36 hostinfod_CFLAGS = \
37         -Wall \
38         $(HOSTINFOD_CFLAGS) \
39         -DDEFAULT_CONF_FILE=\"$(sysconfdir)/hostinfo/hostinfo.conf\" \
40         -DDEFAULT_GUESTS_FILE=\"$(sysconfdir)/hostinfo/guests.conf\" \
41         -DDEFAULT_SOCKET_DIR=\"$(localstatedir)/lib/hostinfo\"
42
43 hostinfod_LDADD = $(HOSTINFOD_LIBS)
44
45 man_MANS = hostinfo.8 hostinfod.8 hostinfo-protocol.5
46
47 hostinfo.8: hostinfo.pod
48         $(POD2MAN) \
49           --section 8 \
50           -c "Virtualization Support" \
51           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
52           $< > $@
53
54 hostinfo-protocol.5: hostinfo-protocol.pod
55         $(POD2MAN) \
56           --section 5 \
57           -c "Virtualization Support" \
58           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
59           $< > $@
60
61 install-data-hook:
62         mkdir -p $(DESTDIR)$(localstatedir)/lib/hostinfo