ia64/xen-unstable

view tools/Makefile @ 19817:b7f73a7f3078

blktap2: portability fixes for NetBSD

- Use standard off_t and lseek() instead of non-portable off64_t and
lseek64()
- Use uuid API as documented in DCE 1.1 RPC specification
- Add NetBSD implementation for blk_getimagesize() and
blk_getsectorsize()
- Use blk_getimagesize() and blk_getsectorsize()
- Fix uuid header check

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 23 17:24:14 2009 +0100 (2009-06-23)
parents 1c627434605e
children 415505139333
line source
1 XEN_ROOT = ../
2 include $(XEN_ROOT)/tools/Rules.mk
4 SUBDIRS-y :=
5 SUBDIRS-y += check
6 SUBDIRS-y += include
7 SUBDIRS-y += libxc
8 SUBDIRS-y += flask
9 SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored
10 SUBDIRS-y += xenstore
11 SUBDIRS-y += misc
12 SUBDIRS-y += examples
13 SUBDIRS-y += hotplug
14 SUBDIRS-y += xentrace
15 SUBDIRS-$(CONFIG_XCUTILS) += xcutils
16 SUBDIRS-$(CONFIG_X86) += firmware
17 SUBDIRS-$(ACM_SECURITY) += security
18 SUBDIRS-y += console
19 SUBDIRS-y += xenmon
20 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
21 SUBDIRS-$(VTPM_TOOLS) += vtpm
22 SUBDIRS-y += xenstat
23 SUBDIRS-$(CONFIG_Linux) += libaio
24 SUBDIRS-$(CONFIG_Linux) += blktap
25 SUBDIRS-$(CONFIG_Linux) += blktap2
26 SUBDIRS-$(CONFIG_NetBSD) += libaio
27 SUBDIRS-$(CONFIG_NetBSD) += blktap2
28 SUBDIRS-y += libfsimage
29 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
30 SUBDIRS-$(CONFIG_Linux) += fs-back
31 SUBDIRS-$(CONFIG_NetBSD) += fs-back
32 SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
33 SUBDIRS-y += xenpmd
35 # These don't cross-compile
36 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
37 SUBDIRS-$(PYTHON_TOOLS) += python
38 SUBDIRS-$(PYTHON_TOOLS) += pygrub
39 endif
41 # For the sake of linking, set the sys-root
42 ifneq ($(CROSS_COMPILE),)
43 CROSS_BIN_PATH ?= /usr/$(CROSS_COMPILE:-=)/bin
44 CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
45 export CROSS_SYS_ROOT # exported for check/funcs.sh
46 export CROSS_BIN_PATH # exported for cross-install.sh
47 endif
49 .PHONY: all
50 all: subdirs-all
52 .PHONY: install
53 install: subdirs-install
54 $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
55 $(INSTALL_DIR) $(DESTDIR)/var/log/xen
56 $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
57 $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
59 .PHONY: clean distclean
60 clean distclean: subdirs-clean
62 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
63 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
64 --cross-prefix=$(CROSS_COMPILE) \
65 --interp-prefix=$(CROSS_SYS_ROOT)
66 endif
68 ioemu/config-host.mak:
69 cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure \
70 --prefix=$(PREFIX) $(IOEMU_CONFIGURE_CROSS)
72 subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
74 subdir-clean-ioemu:
75 $(MAKE) -C ioemu distclean
77 ioemu-dir-find:
78 set -ex; \
79 if test -d $(CONFIG_QEMU); then \
80 rm -f ioemu-dir; \
81 ln -sf $(CONFIG_QEMU) ioemu-dir; \
82 else \
83 if [ ! -d ioemu-remote ]; then \
84 rm -rf ioemu-remote ioemu-remote.tmp; \
85 mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
86 $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
87 if [ "$(QEMU_TAG)" ]; then \
88 cd ioemu-remote.tmp; \
89 $(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
90 $(GIT) checkout -b dummy $(QEMU_TAG); \
91 cd ..; \
92 fi; \
93 mv ioemu-remote.tmp ioemu-remote; \
94 fi; \
95 rm -f ioemu-dir; \
96 ln -sf ioemu-remote ioemu-dir; \
97 fi
98 set -e; \
99 $(absolutify_xen_root); \
100 PREFIX=$(PREFIX); \
101 XEN_SCRIPT_DIR=$(XEN_SCRIPT_DIR); \
102 export PREFIX; \
103 export XEN_SCRIPT_DIR; \
104 cd ioemu-dir; \
105 ./xen-setup $(IOEMU_CONFIGURE_CROSS)
107 subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
109 subdir-clean-ioemu-dir:
110 set -e; if test -d ioemu-dir/.; then \
111 $(absolutify_xen_root); \
112 $(MAKE) -C ioemu-dir clean; \
113 fi
115 ocaml-xenstored:
116 set -ex; \
117 rm -rf ocaml-xenstored.tmp; \
118 hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \
119 if [ "$(OCAML_XENSTORED_TAG)" ]; then \
120 hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\
121 hg -R ocaml-xenstored.tmp branch mybranch ;\
122 fi; \
123 mv ocaml-xenstored.tmp ocaml-xenstored; \
125 subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored
126 $(absolutify_xen_root); \
127 $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@);
129 subdir-clean-ocaml-xenstored:
130 set -e; if test -d ocaml-xenstored; then \
131 $(MAKE) -C ocaml-xenstored clean; \
132 fi