debuggers.hg

view tools/blktap2/drivers/Makefile @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 94c6c51d2e05
children
line source
1 XEN_ROOT=../../..
2 BLKTAP_ROOT= ..
3 include $(XEN_ROOT)/tools/Rules.mk
5 LIBVHDDIR = $(BLKTAP_ROOT)/vhd/lib
7 IBIN = tapdisk2 td-util tapdisk-client tapdisk-stream tapdisk-diff
8 QCOW_UTIL = img2qcow qcow-create qcow2raw
9 LOCK_UTIL = lock-util
10 INST_DIR = $(SBINDIR)
12 CFLAGS += -Werror -g -O0
13 CFLAGS += -Wno-unused
14 CFLAGS += -fno-strict-aliasing
15 CFLAGS += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
16 CFLAGS += $(CFLAGS_libxenctrl)
17 CFLAGS += -I $(LIBAIO_DIR)
18 CFLAGS += -I $(MEMSHR_DIR)
19 CFLAGS += -D_GNU_SOURCE
20 CFLAGS += -DUSE_NFS_LOCKS
22 ifeq ($(CONFIG_X86_64),y)
23 CFLAGS += -fPIC
24 endif
26 LIBS += -lrt -lz
28 LBLIBS_img := $(LDLIBS_libxenctrl) $(CRYPT_LIB) -lpthread -lz -lm
30 LIBS += -L$(LIBVHDDIR) -lvhd
32 ifeq ($(CONFIG_Linux),y)
33 LIBS += -luuid
34 endif
36 REMUS-OBJS := block-remus.o
37 REMUS-OBJS += hashtable.o
38 REMUS-OBJS += hashtable_itr.o
39 REMUS-OBJS += hashtable_utility.o
41 $(REMUS-OBJS): CFLAGS += -I$(XEN_XENSTORE)
43 LIBAIO_DIR = $(XEN_ROOT)/tools/libaio/src
44 MEMSHR_DIR = $(XEN_ROOT)/tools/memshr
46 MEMSHRLIBS :=
47 ifeq ($(CONFIG_Linux), __fixme__)
48 CFLAGS += -DMEMSHR
49 MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
50 endif
52 tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := $(LIBAIO_DIR)/libaio.a
53 tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS += -I$(LIBAIO_DIR) -I$(XEN_LIBXC)
55 ifeq ($(VHD_STATIC),y)
56 td-util: CFLAGS += -static
57 endif
59 PORTABLE-OBJS-y :=
60 PORTABLE-OBJS-$(CONFIG_Linux) += blk_linux.o
61 PORTABLE-OBJS-$(CONFIG_NetBSD) += blk_netbsd.o
63 TAP-OBJS-y := scheduler.o
64 TAP-OBJS-y += tapdisk-vbd.o
65 TAP-OBJS-y += tapdisk-control.o
66 TAP-OBJS-y += tapdisk-image.o
67 TAP-OBJS-y += tapdisk-driver.o
68 TAP-OBJS-y += tapdisk-disktype.o
69 TAP-OBJS-y += tapdisk-interface.o
70 TAP-OBJS-y += tapdisk-server.o
71 TAP-OBJS-y += tapdisk-queue.o
72 TAP-OBJS-y += tapdisk-filter.o
73 TAP-OBJS-y += tapdisk-log.o
74 TAP-OBJS-y += tapdisk-utils.o
75 TAP-OBJS-y += io-optimize.o
76 TAP-OBJS-y += lock.o
77 TAP-OBJS-y += $(PORTABLE-OBJS-y)
79 MISC-OBJS-y := atomicio.o
81 BLK-OBJS-y := block-aio.o
82 BLK-OBJS-y += block-ram.o
83 BLK-OBJS-y += block-cache.o
84 BLK-OBJS-y += block-vhd.o
85 BLK-OBJS-y += block-log.o
86 BLK-OBJS-y += block-qcow.o
87 BLK-OBJS-y += aes.o
88 BLK-OBJS-y += md5.o
89 BLK-OBJS-y += $(PORTABLE-OBJS-y)
90 BLK-OBJS-y += $(REMUS-OBJS)
92 all: $(IBIN) lock-util qcow-util
95 tapdisk2: $(TAP-OBJS-y) $(BLK-OBJS-y) $(MISC-OBJS-y) tapdisk2.c
96 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(AIOLIBS) $(MEMSHRLIBS) $(LBLIBS_img)
98 tapdisk-client: tapdisk-client.o
99 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LBLIBS_img)
101 tapdisk-stream tapdisk-diff: %: %.o $(TAP-OBJS-y) $(BLK-OBJS-y)
102 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(AIOLIBS) $(MEMSHRLIBS) $(LBLIBS_img)
104 td-util: td.o tapdisk-utils.o tapdisk-log.o $(PORTABLE-OBJS-y)
105 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LBLIBS_img)
107 lock-util: lock.c
108 $(CC) $(CFLAGS) -DUTIL -o lock-util lock.c $(LDFLAGS) $(LIBS)
110 .PHONY: qcow-util
111 qcow-util: img2qcow qcow2raw qcow-create
113 img2qcow qcow2raw qcow-create: %: %.o $(TAP-OBJS-y) $(BLK-OBJS-y)
114 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(AIOLIBS) $(MEMSHRLIBS) $(LBLIBS_img)
116 install: all
117 $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
118 $(INSTALL_PROG) $(IBIN) $(LOCK_UTIL) $(QCOW_UTIL) $(DESTDIR)$(INST_DIR)
120 clean:
121 rm -rf .*.d *.o *~ xen TAGS $(IBIN) $(LIB) $(LOCK_UTIL) $(QCOW_UTIL)
123 .PHONY: clean install