1XEN_ROOT = $(CURDIR)/../../..
2include $(XEN_ROOT)/tools/Rules.mk
3
4# Xen script dir and scripts to go there.
5XEN_SCRIPTS =
6XEN_SCRIPTS += block
7XEN_SCRIPTS += vif-bridge
8XEN_SCRIPTS += vif-ip
9
10XEN_SCRIPT_DATA =
11XEN_RCD_PROG = rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain
12
13.PHONY: all
14all:
15
16.PHONY: build
17build:
18
19.PHONY: install
20install: install-scripts install-rcd
21
22.PHONY: uninstall
23uninstall: uninstall-scripts uninstall-rcd
24
25.PHONY: install-scripts
26install-scripts:
27	$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
28	set -e; for i in $(XEN_SCRIPTS); \
29	   do \
30	   $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
31	done
32	set -e; for i in $(XEN_SCRIPT_DATA); \
33	   do \
34	   $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
35	done
36
37.PHONY: uninstall-scripts
38uninstall-scripts:
39	rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPTS))
40	rm -f $(addprefix $(DESTDIR)$(XEN_SCRIPT_DIR)/, $(XEN_SCRIPT_DATA))
41
42.PHONY: install-rcd
43install-rcd:
44	$(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
45	set -e; for i in $(XEN_RCD_PROG); \
46	   do \
47	   $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \
48	done
49	$(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh
50
51.PHONY: uninstall-rcd
52uninstall-rcd:
53	rm -f $(subst rc.d,$(DESTDIR)$(INITD_DIR),$(XEN_RCD_PROG))
54	rm -f $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh
55
56.PHONY: clean
57clean:
58
59.PHONY: distclean
60distclean: clean
61