ia64/xen-unstable

view tools/examples/Makefile @ 11100:905ff6e616cc

[HVM] Add stubs to Linux for the new hvm_op hypercall.
Signed-off-by: Steven Smith <ssmith@xensource.com>
author kfraser@localhost.localdomain
date Mon Aug 14 11:33:50 2006 +0100 (2006-08-14)
parents df80de098d15
children edf0e488ea2a
line source
1 XEN_ROOT = ../../
2 include $(XEN_ROOT)/tools/Rules.mk
4 INSTALL = install
5 INSTALL_DIR = $(INSTALL) -d -m0755
6 INSTALL_PROG = $(INSTALL) -m0755
7 INSTALL_DATA = $(INSTALL) -m0644
9 # Init scripts.
10 XEND_INITD = init.d/xend
11 XENDOMAINS_INITD = init.d/xendomains
12 XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
14 # Xen configuration dir and configs to go there.
15 XEN_CONFIG_DIR = /etc/xen
16 XEN_CONFIGS = xend-config.sxp
17 XEN_CONFIGS += xmexample1
18 XEN_CONFIGS += xmexample2
19 XEN_CONFIGS += xmexample.hvm
20 XEN_CONFIGS += xmexample.vti
21 XEN_CONFIGS += xend-pci-quirks.sxp
22 XEN_CONFIGS += xend-pci-permissive.sxp
24 # Xen script dir and scripts to go there.
25 XEN_SCRIPT_DIR = /etc/xen/scripts
26 XEN_SCRIPTS = network-bridge vif-bridge
27 XEN_SCRIPTS += network-route vif-route
28 XEN_SCRIPTS += network-nat vif-nat
29 XEN_SCRIPTS += block
30 XEN_SCRIPTS += block-enbd block-nbd
31 XEN_SCRIPTS += blktap
32 XEN_SCRIPTS += vtpm vtpm-delete
33 XEN_SCRIPTS += xen-hotplug-cleanup
34 XEN_SCRIPTS += external-device-migrate
35 XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh
36 XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
37 XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
38 XEN_SCRIPT_DATA += vtpm-migration.sh vtpm-impl
40 XEN_HOTPLUG_DIR = /etc/hotplug
41 XEN_HOTPLUG_SCRIPTS = xen-backend.agent
43 UDEV_RULES_DIR = /etc/udev
44 UDEV_RULES = xen-backend.rules
46 DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
47 DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
48 ifeq ($(findstring $(DI),$(DE)),$(DI))
49 HOTPLUGS=install-hotplug install-udev
50 else
51 ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
52 HOTPLUGS=install-udev
53 else
54 HOTPLUGS=install-hotplug
55 endif
56 endif
58 .PHONY: all
59 all:
61 .PHONY: build
62 build:
64 .PHONY: install
65 install: all install-initd install-configs install-scripts $(HOTPLUGS)
67 .PHONY: install-initd
68 install-initd:
69 [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
70 [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
71 $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
72 $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
73 $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
75 .PHONY: install-configs
76 install-configs: $(XEN_CONFIGS)
77 [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
78 $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
79 [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
80 $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
81 for i in $(XEN_CONFIGS); \
82 do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
83 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
84 done
86 .PHONY: install-scripts
87 install-scripts:
88 [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
89 $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
90 for i in $(XEN_SCRIPTS); \
91 do \
92 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
93 done
94 for i in $(XEN_SCRIPT_DATA); \
95 do \
96 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
97 done
99 .PHONY: install-hotplug
100 install-hotplug:
101 [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
102 $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
103 for i in $(XEN_HOTPLUG_SCRIPTS); \
104 do \
105 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
106 done
108 .PHONY: install-udev
109 install-udev:
110 [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
111 $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
112 for i in $(UDEV_RULES); \
113 do \
114 $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
115 ( cd $(DESTDIR)$(UDEV_RULES_DIR)/rules.d ; \
116 ln -sf ../$$i . ) \
117 done
119 .PHONY: clean
120 clean: