WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] blktap - cleanup makefile and libs

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] blktap - cleanup makefile and libs
From: Bastian Blank <bastian@xxxxxxxxxxxx>
Date: Fri, 25 Jan 2008 21:26:45 +0100
Delivery-date: Fri, 25 Jan 2008 12:27:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
# HG changeset patch
# User Bastian Blank <waldi@xxxxxxxxxx>
# Date 1201292160 -3600
# Node ID 815ddbdb262918bd5437778807b1c0dafb81e970
# Parent  bc4a56dd323b1ab9f8012d72a30a3f148c009014
blktap: Cleanup makefile and linked libs.

Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>

diff -r bc4a56dd323b -r 815ddbdb2629 tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile     Fri Jan 25 20:49:07 2008 +0100
+++ b/tools/blktap/drivers/Makefile     Fri Jan 25 21:16:00 2008 +0100
@@ -17,15 +17,11 @@ CFLAGS   += -Wp,-MD,.$(@F).d
 CFLAGS   += -Wp,-MD,.$(@F).d
 DEPS      = .*.d
 
-THREADLIB := -lpthread -lz
 LIBS      := -L. -L.. -L../lib
 LIBS      += -L$(XEN_LIBXC)
-LIBS      += -lblktap -lxenctrl
-LIBS      += -lcrypto
-LIBS      += -lz
-LIBS      += -L$(XEN_XENSTORE) -lxenstore
+LIBS      += -Wl,-rpath-link,$(XEN_XENSTORE)
 
-AIOLIBS   := $(LIBAIO_DIR)/libaio.a
+LIBS_IMG  := $(LIBAIO_DIR)/libaio.a -lcrypto -lpthread -lz
 
 BLK-OBJS-y  := block-aio.o
 BLK-OBJS-y  += block-sync.o
@@ -39,17 +35,16 @@ all: $(IBIN) qcow-util
 all: $(IBIN) qcow-util
 
 blktapctrl: blktapctrl.c
-       $(CC) $(CFLAGS) -o blktapctrl $(LDFLAGS) $(LIBS) blktapctrl.c
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap -lxenctrl
 
-tapdisk: $(BLK-OBJS-y) tapdisk.c
-       $(CC) $(CFLAGS) -o tapdisk $(BLK-OBJS-y) tapdisk.c \
-               $(AIOLIBS) $(LDFLAGS) $(LIBS)
+tapdisk: tapdisk.c $(BLK-OBJS-y) tapdisk.c
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_IMG)
 
 .PHONY: qcow-util
 qcow-util: img2qcow qcow2raw qcow-create
 
 img2qcow qcow2raw qcow-create: %: $(BLK-OBJS-y)
-       $(CC) $(CFLAGS) -o $* $(BLK-OBJS-y) $*.c $(LDFLAGS) $(AIOLIBS) $(LIBS)
+       $(CC) $(CFLAGS) -o $* $(BLK-OBJS-y) $*.c $(LDFLAGS) $(LIBS_IMG)
 
 install: all
        $(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(VHD_UTIL) $(DESTDIR)$(SBINDIR)
diff -r bc4a56dd323b -r 815ddbdb2629 tools/blktap/lib/Makefile
--- a/tools/blktap/lib/Makefile Fri Jan 25 20:49:07 2008 +0100
+++ b/tools/blktap/lib/Makefile Fri Jan 25 21:16:00 2008 +0100
@@ -7,7 +7,7 @@ SONAME   = libblktap.so.$(MAJOR)
 
 INCLUDES += -I. -I.. -I $(XEN_LIBXC) -I $(XEN_XENSTORE) -I$(XEN_INCLUDE)
 
-LIBS     := -lz
+LIBS     := -lxenstore
 
 SRCS     :=
 SRCS     += xenbus.c blkif.c xs_api.c
@@ -50,7 +50,7 @@ clean:
 
 libblktap.a: $(OBJS) 
        $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,$(SONAME) $(SHLIB_CFLAGS) \
-             -L$(XEN_XENSTORE) $(LDFLAGS) -l xenstore                          
      \
+             -L$(XEN_XENSTORE) $(LDFLAGS)                                 \
              -o libblktap.so.$(MAJOR).$(MINOR) $^ $(LIBS)
        ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
        ln -sf libblktap.so.$(MAJOR) libblktap.so
-- 
Leave bigotry in your quarters; there's no room for it on the bridge.
                -- Kirk, "Balance of Terror", stardate 1709.2

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] blktap - cleanup makefile and libs, Bastian Blank <=