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