New API: Implement pwrite system call (partial fix for RHBZ#592883).
[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         base64.c \
68         blkid.c \
69         blockdev.c \
70         checksum.c \
71         cmp.c \
72         command.c \
73         cpmv.c \
74         daemon.h \
75         dd.c \
76         debug.c \
77         devsparts.c \
78         df.c \
79         dir.c \
80         dmesg.c \
81         dropcaches.c \
82         du.c \
83         echo_daemon.c \
84         ext2.c \
85         fallocate.c \
86         file.c \
87         fill.c \
88         find.c \
89         fsck.c \
90         glob.c \
91         grep.c \
92         grub.c \
93         guestfsd.c \
94         headtail.c \
95         hexdump.c \
96         htonl.c \
97         initrd.c \
98         inotify.c \
99         link.c \
100         ls.c \
101         lvm.c \
102         mkfs.c \
103         mknod.c \
104         modprobe.c \
105         mount.c \
106         names.c \
107         ntfs.c \
108         optgroups.c \
109         optgroups.h \
110         parted.c \
111         pingdaemon.c \
112         proto.c \
113         readdir.c \
114         realpath.c \
115         scrub.c \
116         selinux.c \
117         sfdisk.c \
118         sleep.c \
119         stat.c \
120         statvfs.c \
121         strings.c \
122         stubs.c \
123         swap.c \
124         sync.c \
125         tar.c \
126         truncate.c \
127         umask.c \
128         upload.c \
129         utimens.c \
130         wc.c \
131         xattr.c \
132         zero.c \
133         zerofree.c
134 guestfsd_LDADD = \
135         libprotocol.a \
136         lib/libgnu.a \
137         $(GETADDRINFO_LIB) \
138         $(HOSTENT_LIB) \
139         $(INET_NTOP_LIB) \
140         $(LIBSOCKET) \
141         $(LIB_CLOCK_GETTIME) \
142         $(LIBINTL) \
143         $(SERVENT_LIB)
144
145 AM_CPPFLAGS = -I$(srcdir)/lib -Ilib
146 guestfsd_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)