ia64/xen-unstable

view tools/blktap/drivers/Makefile @ 16741:2773cdbecda5

tools: LDFLAGS in link lines

LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 17 15:17:22 2008 +0000 (2008-01-17)
parents b6cc74f275fd
children 71012e36922c
line source
1 XEN_ROOT = ../../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 INCLUDES += -I.. -I../lib
6 IBIN = blktapctrl tapdisk
7 QCOW_UTIL = img2qcow qcow2raw qcow-create
8 INST_DIR = /usr/sbin
9 LIBAIO_DIR = ../../libaio/src
11 CFLAGS += -Werror
12 CFLAGS += -Wno-unused
13 CFLAGS += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
14 CFLAGS += $(INCLUDES) -I. -I../../xenstore
15 CFLAGS += -D_GNU_SOURCE
17 # Get gcc to generate the dependencies for us.
18 CFLAGS += -Wp,-MD,.$(@F).d
19 DEPS = .*.d
21 THREADLIB := -lpthread -lz
22 LIBS := -L. -L.. -L../lib
23 LIBS += -L$(XEN_LIBXC)
24 LIBS += -lblktap -lxenctrl
25 LIBS += -lcrypto
26 LIBS += -lz
27 LIBS += -L$(XEN_XENSTORE) -lxenstore
29 AIOLIBS := $(LIBAIO_DIR)/libaio.a
31 BLK-OBJS-y := block-aio.o
32 BLK-OBJS-y += block-sync.o
33 BLK-OBJS-y += block-vmdk.o
34 BLK-OBJS-y += block-ram.o
35 BLK-OBJS-y += block-qcow.o
36 BLK-OBJS-y += aes.o
37 BLK-OBJS-y += tapaio.o
38 BLK-OBJS-$(CONFIG_Linux) += blk_linux.c
40 all: $(IBIN) qcow-util
42 blktapctrl: blktapctrl.c
43 $(CC) $(CFLAGS) -o blktapctrl $(LDFLAGS) $(LIBS) blktapctrl.c
45 tapdisk: $(BLK-OBJS-y) tapdisk.c
46 $(CC) $(CFLAGS) -o tapdisk $(BLK-OBJS-y) tapdisk.c \
47 $(AIOLIBS) $(LDFLAGS) $(LIBS)
49 .PHONY: qcow-util
50 qcow-util: img2qcow qcow2raw qcow-create
52 img2qcow qcow2raw qcow-create: %: $(BLK-OBJS-y)
53 $(CC) $(CFLAGS) -o $* $(BLK-OBJS-y) $*.c $(LDFLAGS) $(AIOLIBS) $(LIBS)
55 install: all
56 $(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(VHD_UTIL) $(DESTDIR)$(INST_DIR)
58 clean:
59 rm -rf *.o *~ $(DEPS) xen TAGS $(IBIN) $(LIB) $(QCOW_UTIL) $(VHD_UTIL)
61 .PHONY: clean install
63 -include $(DEPS)