2007-02-14 01:40:09 +00:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
2007-03-12 14:10:14 +00:00
|
|
|
UUID=$(shell uuidgen)
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2007-06-26 23:04:49 +00:00
|
|
|
sbin_PROGRAMS = libvirtd
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2007-09-19 01:56:55 +00:00
|
|
|
# Distribute the generated files so that rpcgen isn't required on the
|
|
|
|
# target machine (although almost any Unix machine will have it).
|
|
|
|
EXTRA_DIST = libvirtd.init.in libvirtd.sysconf default-network.xml \
|
|
|
|
protocol.x remote_protocol.x \
|
|
|
|
protocol.c protocol.h \
|
|
|
|
remote_protocol.c remote_protocol.h \
|
|
|
|
remote_generate_stubs.pl rpcgen_fix.pl \
|
|
|
|
remote_dispatch_prototypes.h \
|
|
|
|
remote_dispatch_localvars.h \
|
|
|
|
remote_dispatch_proc_switch.h \
|
|
|
|
mdns.c mdns.h
|
|
|
|
|
2007-06-26 23:04:49 +00:00
|
|
|
libvirtd_SOURCES = \
|
2007-06-11 12:04:54 +00:00
|
|
|
qemud.c internal.h \
|
|
|
|
protocol.h protocol.c \
|
|
|
|
remote_protocol.h remote_protocol.c \
|
2007-06-26 19:11:00 +00:00
|
|
|
remote.c \
|
2007-09-19 01:56:55 +00:00
|
|
|
event.c event.h
|
|
|
|
|
2007-02-14 01:40:09 +00:00
|
|
|
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
2007-06-26 23:04:49 +00:00
|
|
|
libvirtd_CFLAGS = \
|
2007-09-19 17:42:40 +00:00
|
|
|
-I$(top_srcdir)/include -I$(top_builddir)/include \
|
|
|
|
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) \
|
2007-03-01 16:18:55 +00:00
|
|
|
$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
|
2007-04-04 09:32:00 +00:00
|
|
|
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
|
2007-06-11 12:04:54 +00:00
|
|
|
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
2007-06-26 20:51:00 +00:00
|
|
|
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\"" \
|
|
|
|
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
|
|
|
|
2007-09-19 17:42:40 +00:00
|
|
|
libvirtd_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS) $(GNUTLS_LIBS)
|
2007-06-26 23:04:49 +00:00
|
|
|
libvirtd_DEPENDENCIES = ../src/libvirt.la
|
|
|
|
libvirtd_LDADD = ../src/libvirt.la
|
2007-02-14 01:40:09 +00:00
|
|
|
|
2007-09-19 01:56:55 +00:00
|
|
|
if HAVE_AVAHI
|
|
|
|
libvirtd_SOURCES += mdns.c mdns.h
|
|
|
|
libvirtd_CFLAGS += $(AVAHI_CFLAGS)
|
|
|
|
libvirtd_LDADD += $(AVAHI_LIBS)
|
|
|
|
endif
|
|
|
|
|
2007-06-26 23:03:48 +00:00
|
|
|
install-data-local: install-init
|
2007-03-07 11:54:29 +00:00
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart
|
|
|
|
$(INSTALL_DATA) $(srcdir)/default-network.xml $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
|
2007-03-12 14:10:14 +00:00
|
|
|
sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
|
2007-03-08 14:00:00 +00:00
|
|
|
test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
|
|
|
|
ln -s ../default.xml $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
2007-05-18 18:36:24 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu
|
2007-03-08 23:31:28 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
|
2007-03-13 22:43:22 +00:00
|
|
|
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
|
2007-03-07 11:54:29 +00:00
|
|
|
|
2007-06-26 23:03:48 +00:00
|
|
|
uninstall-local: uninstall-init
|
2007-03-07 11:54:29 +00:00
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
|
|
|
|
rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
|
2007-05-18 18:36:24 +00:00
|
|
|
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
|
2007-03-08 23:31:28 +00:00
|
|
|
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
2007-03-13 22:43:22 +00:00
|
|
|
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
2007-03-07 11:54:29 +00:00
|
|
|
|
2007-06-11 12:04:54 +00:00
|
|
|
|
|
|
|
.x.c:
|
|
|
|
rm -f $@
|
|
|
|
rpcgen -c -o $@ $<
|
|
|
|
mv $@ $@.bak
|
|
|
|
perl -w rpcgen_fix.pl < $@.bak > $@
|
|
|
|
|
|
|
|
.x.h:
|
|
|
|
rm -f $@
|
|
|
|
rpcgen -h -o $@ $<
|
|
|
|
|
|
|
|
protocol.c: protocol.h
|
|
|
|
remote_protocol.c: remote_protocol.h
|
|
|
|
|
|
|
|
remote.c: remote_dispatch_prototypes.h \
|
|
|
|
remote_dispatch_localvars.h \
|
|
|
|
remote_dispatch_proc_switch.h
|
|
|
|
|
|
|
|
remote_dispatch_prototypes.h: remote_generate_stubs.pl remote_protocol.x
|
|
|
|
perl -w remote_generate_stubs.pl -i remote_protocol.x > $@
|
|
|
|
|
|
|
|
remote_dispatch_localvars.h: remote_generate_stubs.pl remote_protocol.x
|
|
|
|
perl -w remote_generate_stubs.pl -v remote_protocol.x > $@
|
|
|
|
|
|
|
|
remote_dispatch_proc_switch.h: remote_generate_stubs.pl remote_protocol.x
|
|
|
|
perl -w remote_generate_stubs.pl -w remote_protocol.x > $@
|
2007-02-23 12:50:58 +00:00
|
|
|
|
|
|
|
if LIBVIRT_INIT_SCRIPTS_RED_HAT
|
2007-06-26 23:03:48 +00:00
|
|
|
install-init: libvirtd.init
|
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
|
|
|
$(INSTALL_SCRIPT) $(srcdir)/libvirtd.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
2007-06-26 23:48:46 +00:00
|
|
|
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
|
|
|
|
$(INSTALL_SCRIPT) $(srcdir)/libvirtd.sysconf $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
|
2007-02-23 12:50:58 +00:00
|
|
|
|
2007-06-26 23:03:48 +00:00
|
|
|
uninstall-init:
|
|
|
|
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
|
|
|
|
|
|
|
|
libvirtd.init: libvirtd.init.in
|
2007-02-23 12:50:58 +00:00
|
|
|
sed \
|
2007-06-27 00:12:29 +00:00
|
|
|
-e s!\@localstatedir\@!@localstatedir@!g \
|
|
|
|
-e s!\@sbindir\@!@sbindir@!g \
|
|
|
|
-e s!\@sysconfdir\@!@sysconfdir@!g \
|
2007-02-23 12:50:58 +00:00
|
|
|
< $< > $@
|
2007-06-26 23:03:48 +00:00
|
|
|
chmod a+x libvirtd.init
|
|
|
|
|
|
|
|
CLEANFILES = libvirtd.init
|
|
|
|
else
|
|
|
|
|
|
|
|
install-init:
|
|
|
|
uninstall-init:
|
2007-02-23 12:50:58 +00:00
|
|
|
|
|
|
|
endif # DBUS_INIT_SCRIPTS_RED_HAT
|