debuggers.hg

view tools/blktap/drivers/Makefile @ 10994:fd59667e5365

Limit blktap static link to just libaio.
author jchesterfield@wicket.uk.xensource.com
date Mon Aug 07 18:11:59 2006 +0100 (2006-08-07)
parents ea04335d238b
children 2835083c9c91
line source
1 XEN_ROOT = ../../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 INCLUDES += -I.. -I../lib
6 INSTALL = install
7 INSTALL_PROG = $(INSTALL) -m0755
8 IBIN = blktapctrl tapdisk
9 QCOW_UTIL = img2qcow qcow2raw qcow-create
10 INSTALL_DIR = /usr/sbin
11 LIBAIO_DIR = ../../libaio/src
13 CFLAGS += -fPIC
14 CFLAGS += -Wall
15 CFLAGS += -Werror
16 CFLAGS += -Wno-unused
17 CFLAGS += -g3
18 CFLAGS += -fno-strict-aliasing
19 CFLAGS += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
20 CFLAGS += $(INCLUDES) -I. -I../../xenstore
21 CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
22 CFLAGS += -D_GNU_SOURCE
24 # Get gcc to generate the dependencies for us.
25 CFLAGS += -Wp,-MD,.$(@F).d
26 DEPS = .*.d
28 THREADLIB := -lpthread -lz
29 LIBS := -L. -L.. -L../lib
30 LIBS += -L$(XEN_LIBXC)
31 LIBS += -lblktap
32 LIBS += -lcrypto
33 LIBS += -lz
34 LIBS += -L$(XEN_XENSTORE) -lxenstore
36 AIOLIBS := $(LIBAIO_DIR)/libaio.a
38 BLK-OBJS := block-aio.o
39 BLK-OBJS += block-sync.o
40 BLK-OBJS += block-vmdk.o
41 BLK-OBJS += block-ram.o
42 BLK-OBJS += block-qcow.o
43 BLK-OBJS += aes.o
45 all: $(IBIN) qcow-util
47 LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
50 blktapctrl: blktapctrl.c
51 $(CC) $(CFLAGS) -o blktapctrl $(LIBS) blktapctrl.c
53 tapdisk: $(BLK-OBJS) tapdisk.c
54 $(CC) $(CFLAGS) -o tapdisk $(BLK-OBJS) tapdisk.c \
55 $(AIOLIBS) $(LIBS)
57 .PHONY: qcow-util
58 qcow-util: img2qcow qcow2raw qcow-create
60 img2qcow qcow2raw qcow-create: %: $(BLK-OBJS)
61 $(CC) $(CFLAGS) -o $* $(BLK-OBJS) $*.c $(AIOLIBS) $(LIBS)
63 install: all
64 $(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(DESTDIR)$(INSTALL_DIR)
66 clean:
67 rm -rf *.o *~ $(DEPS) xen TAGS $(IBIN) $(LIB) $(QCOW_UTIL)
69 .PHONY: clean install
71 -include $(DEPS)