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