ia64/xen-unstable

changeset 16893:3d71b7bf06ea

blktap: Clean up makefile and linked libs.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Jan 26 10:17:33 2008 +0000 (2008-01-26)
parents 97dd72c045a5
children b9004e222fde
files tools/blktap/drivers/Makefile tools/blktap/lib/Makefile
line diff
     1.1 --- a/tools/blktap/drivers/Makefile	Sat Jan 26 10:16:21 2008 +0000
     1.2 +++ b/tools/blktap/drivers/Makefile	Sat Jan 26 10:17:33 2008 +0000
     1.3 @@ -17,15 +17,11 @@ CFLAGS   += -D_GNU_SOURCE
     1.4  CFLAGS   += -Wp,-MD,.$(@F).d
     1.5  DEPS      = .*.d
     1.6  
     1.7 -THREADLIB := -lpthread -lz
     1.8  LIBS      := -L. -L.. -L../lib
     1.9  LIBS      += -L$(XEN_LIBXC)
    1.10 -LIBS      += -lblktap -lxenctrl
    1.11 -LIBS      += -lcrypto
    1.12 -LIBS      += -lz
    1.13 -LIBS      += -L$(XEN_XENSTORE) -lxenstore
    1.14 +LIBS      += -Wl,-rpath-link,$(XEN_XENSTORE)
    1.15  
    1.16 -AIOLIBS   := $(LIBAIO_DIR)/libaio.a
    1.17 +LIBS_IMG  := $(LIBAIO_DIR)/libaio.a -lcrypto -lpthread -lz
    1.18  
    1.19  BLK-OBJS-y  := block-aio.o
    1.20  BLK-OBJS-y  += block-sync.o
    1.21 @@ -39,17 +35,16 @@ BLK-OBJS-$(CONFIG_Linux) += blk_linux.c
    1.22  all: $(IBIN) qcow-util
    1.23  
    1.24  blktapctrl: blktapctrl.c
    1.25 -	$(CC) $(CFLAGS) -o blktapctrl $(LDFLAGS) $(LIBS) blktapctrl.c
    1.26 +	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap -lxenctrl
    1.27  
    1.28 -tapdisk: $(BLK-OBJS-y) tapdisk.c
    1.29 -	$(CC) $(CFLAGS) -o tapdisk $(BLK-OBJS-y) tapdisk.c \
    1.30 -		$(AIOLIBS) $(LDFLAGS) $(LIBS)
    1.31 +tapdisk: tapdisk.c $(BLK-OBJS-y) tapdisk.c
    1.32 +	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_IMG)
    1.33  
    1.34  .PHONY: qcow-util
    1.35  qcow-util: img2qcow qcow2raw qcow-create
    1.36  
    1.37  img2qcow qcow2raw qcow-create: %: $(BLK-OBJS-y)
    1.38 -	$(CC) $(CFLAGS) -o $* $(BLK-OBJS-y) $*.c $(LDFLAGS) $(AIOLIBS) $(LIBS)
    1.39 +	$(CC) $(CFLAGS) -o $* $(BLK-OBJS-y) $*.c $(LDFLAGS) $(LIBS_IMG)
    1.40  
    1.41  install: all
    1.42  	$(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(VHD_UTIL) $(DESTDIR)$(SBINDIR)
     2.1 --- a/tools/blktap/lib/Makefile	Sat Jan 26 10:16:21 2008 +0000
     2.2 +++ b/tools/blktap/lib/Makefile	Sat Jan 26 10:17:33 2008 +0000
     2.3 @@ -7,7 +7,7 @@ SONAME   = libblktap.so.$(MAJOR)
     2.4  
     2.5  INCLUDES += -I. -I.. -I $(XEN_LIBXC) -I $(XEN_XENSTORE)
     2.6  
     2.7 -LIBS     := -lz
     2.8 +LIBS     := -lxenstore
     2.9  
    2.10  SRCS     :=
    2.11  SRCS     += xenbus.c blkif.c xs_api.c
    2.12 @@ -50,7 +50,7 @@ clean:
    2.13  
    2.14  libblktap.a: $(OBJS) 
    2.15  	$(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,$(SONAME) $(SHLIB_CFLAGS) \
    2.16 -	      -L$(XEN_XENSTORE) $(LDFLAGS) -l xenstore                                \
    2.17 +	      -L$(XEN_XENSTORE) $(LDFLAGS)                                 \
    2.18  	      -o libblktap.so.$(MAJOR).$(MINOR) $^ $(LIBS)
    2.19  	ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
    2.20  	ln -sf libblktap.so.$(MAJOR) libblktap.so