ia64/xen-unstable

view tools/blktap2/vhd/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 465950bbdf46
children
line source
1 XEN_ROOT=../../../
2 BLKTAP_ROOT := ../
3 include $(XEN_ROOT)/tools/Rules.mk
5 SUBDIRS-y :=
6 SUBDIRS-y += lib
8 IBIN = vhd-util vhd-update
9 INST_DIR = $(SBINDIR)
11 CFLAGS += -Werror
12 CFLAGS += -Wno-unused
13 CFLAGS += -I../include
14 CFLAGS += -D_GNU_SOURCE
16 ifeq ($(CONFIG_X86_64),y)
17 CFLAGS += -fPIC
18 endif
20 ifeq ($(VHD_STATIC),y)
21 CFLAGS += -static
22 endif
24 LIBS := -Llib -lvhd
25 ifeq ($(CONFIG_Linux),y)
26 LIBS += -luuid
27 endif
29 # Get gcc to generate the dependencies for us.
30 CFLAGS += -Wp,-MD,.$(@F).d
31 DEPS = .*.d
33 all: subdirs-all build
35 build: $(IBIN)
37 LIBS_DEPENDS := lib/libvhd.so lib/vhd.a
38 $(LIBS_DEPENDS):subdirs-all
40 vhd-util: vhd-util.o $(LIBS_DEPENDS)
41 $(CC) $(CFLAGS) -o vhd-util vhd-util.o $(LDFLAGS) $(LIBS)
43 vhd-update: vhd-update.o $(LIBS_DEPENDS)
44 $(CC) $(CFLAGS) -o vhd-update vhd-update.o $(LDFLAGS) $(LIBS)
46 install: all
47 $(MAKE) subdirs-install
48 $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
49 $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INST_DIR)
51 clean: subdirs-clean
52 rm -rf *.o *~ $(DEPS) $(IBIN)
54 .PHONY: all build clean install vhd-util vhd-update
56 -include $(DEPS)