daemon: More reliable parsing of the output from 'parted print'.
[libguestfs.git] / daemon / Makefile.am
1 # libguestfs-daemon
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 ACLOCAL_AMFLAGS = -I m4
19
20 SUBDIRS = lib tests .
21
22 libsrcdir = $(top_builddir)/../src
23
24 generator_built = \
25         actions.h \
26         stubs.c \
27         names.c
28
29 .PHONY: force
30
31 $(generator_built): $(libsrcdir)/stamp-generator
32 $(libsrcdir)/stamp-generator: force
33         $(MAKE) -C $(libsrcdir) stamp-generator
34
35 BUILT_SOURCES = \
36         $(generator_built) \
37         guestfs_protocol.c \
38         guestfs_protocol.h
39
40 EXTRA_DIST = $(BUILT_SOURCES) \
41         .gitignore
42
43 # This convenience library is solely to avoid compiler warnings
44 # in its generated sources.
45 noinst_LIBRARIES = libprotocol.a
46 libprotocol_a_SOURCES = \
47         guestfs_protocol.c \
48         guestfs_protocol.h
49 libprotocol_a_CFLAGS =
50
51 guestfs_protocol.c: $(libsrcdir)/guestfs_protocol.c
52         rm -f $@
53         ln $< $@
54 guestfs_protocol.h: $(libsrcdir)/guestfs_protocol.h
55         rm -f $@
56         ln $< $@
57 $(libsrcdir)/guestfs_protocol.c: force
58         $(MAKE) -C $(libsrcdir) guestfs_protocol.c
59 $(libsrcdir)/guestfs_protocol.h: force
60         $(MAKE) -C $(libsrcdir) guestfs_protocol.h
61
62 noinst_PROGRAMS = guestfsd
63 guestfsd_SOURCES = \
64         actions.h \
65         available.c \
66         augeas.c \
67         blkid.c \
68         blockdev.c \
69         checksum.c \
70         cmp.c \
71         command.c \
72         cpmv.c \
73         daemon.h \
74         dd.c \
75         debug.c \
76         devsparts.c \
77         df.c \
78         dir.c \
79         dmesg.c \
80         dropcaches.c \
81         du.c \
82         echo_daemon.c \
83         ext2.c \
84         fallocate.c \
85         file.c \
86         fill.c \
87         find.c \
88         fsck.c \
89         glob.c \
90         grep.c \
91         grub.c \
92         guestfsd.c \
93         headtail.c \
94         hexdump.c \
95         htonl.c \
96         initrd.c \
97         inotify.c \
98         link.c \
99         ls.c \
100         lvm.c \
101         mkfs.c \
102         mknod.c \
103         modprobe.c \
104         mount.c \
105         names.c \
106         ntfs.c \
107         optgroups.c \
108         optgroups.h \
109         parted.c \
110         pingdaemon.c \
111         proto.c \
112         readdir.c \
113         realpath.c \
114         scrub.c \
115         selinux.c \
116         sfdisk.c \
117         sleep.c \
118         stat.c \
119         statvfs.c \
120         strings.c \
121         stubs.c \
122         swap.c \
123         sync.c \
124         tar.c \
125         truncate.c \
126         umask.c \
127         upload.c \
128         utimens.c \
129         wc.c \
130         xattr.c \
131         zero.c \
132         zerofree.c
133 guestfsd_LDADD = \
134         libprotocol.a \
135         lib/libgnu.a \
136         $(GETADDRINFO_LIB) \
137         $(HOSTENT_LIB) \
138         $(INET_NTOP_LIB) \
139         $(LIBSOCKET) \
140         $(LIB_CLOCK_GETTIME) \
141         $(LIBINTL) \
142         $(SERVENT_LIB)
143
144 AM_CPPFLAGS = -I$(srcdir)/lib -Ilib
145 guestfsd_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)