ia64/xen-unstable

view tools/examples/Makefile @ 8964:8946b6dcd49e

Fix x86_64 Xen build.

event_callback_cs and failsafe_callback_cs are x86_32 only.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Wed Feb 22 17:26:39 2006 +0000 (2006-02-22)
parents dcc2beb8a1d2
children 911f3ecd975e
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
22 # Xen script dir and scripts to go there.
23 XEN_SCRIPT_DIR = /etc/xen/scripts
24 XEN_SCRIPTS = network-bridge vif-bridge
25 XEN_SCRIPTS += network-route vif-route
26 XEN_SCRIPTS += network-nat vif-nat
27 XEN_SCRIPTS += block
28 XEN_SCRIPTS += block-enbd block-nbd
29 XEN_SCRIPTS += vtpm
30 XEN_SCRIPT_DATA = xen-script-common.sh
31 XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
32 XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh
34 XEN_HOTPLUG_DIR = /etc/hotplug
35 XEN_HOTPLUG_SCRIPTS = xen-backend.agent
37 UDEV_RULES_DIR = /etc/udev
38 UDEV_RULES = xen-backend.rules
40 DI = $(shell readlink -f $(DISTDIR))
41 DE = $(shell readlink -f $(DESTDIR))
42 ifeq ($(findstring $(DI),$(DE)),$(DI))
43 HOTPLUGS=install-hotplug install-udev
44 else
45 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)
46 HOTPLUGS=install-udev
47 else
48 HOTPLUGS=install-hotplug
49 endif
50 endif
52 all:
53 build:
55 install: all install-initd install-configs install-scripts $(HOTPLUGS)
57 install-initd:
58 [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
59 [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
60 $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
61 $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
62 $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
64 install-configs: $(XEN_CONFIGS)
65 [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
66 $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
67 [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
68 $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
69 for i in $(XEN_CONFIGS); \
70 do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
71 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
72 done
74 install-scripts:
75 [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
76 $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
77 for i in $(XEN_SCRIPTS); \
78 do \
79 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
80 done
81 for i in $(XEN_SCRIPT_DATA); \
82 do \
83 $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
84 done
86 install-hotplug:
87 [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
88 $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
89 for i in $(XEN_HOTPLUG_SCRIPTS); \
90 do \
91 $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
92 done
94 install-udev:
95 [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
96 $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
97 for i in $(UDEV_RULES); \
98 do \
99 $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
100 ( cd $(DESTDIR)$(UDEV_RULES_DIR)/rules.d ; \
101 ln -sf ../$$i . ) \
102 done
104 clean: