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