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-changelog

[Xen-changelog] [xen-unstable] Clean up blktap Makefiles.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Clean up blktap Makefiles.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:40:10 -0700
Delivery-date: Thu, 20 Mar 2008 05:40:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205751479 0
# Node ID fea44c1d3e411ca8a693dc3dfb9fe4d8e89ba401
# Parent  bf8a3fc79093daa3107952dd9b070299851862fe
Clean up blktap Makefiles.

Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>
---
 tools/blktap/drivers/Makefile |   26 ++++++++++++--------------
 tools/blktap/lib/Makefile     |   29 +++++++++++++----------------
 2 files changed, 25 insertions(+), 30 deletions(-)

diff -r bf8a3fc79093 -r fea44c1d3e41 tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile     Mon Mar 17 10:45:24 2008 +0000
+++ b/tools/blktap/drivers/Makefile     Mon Mar 17 10:57:59 2008 +0000
@@ -1,7 +1,5 @@ XEN_ROOT = ../../..
 XEN_ROOT = ../../..
 include $(XEN_ROOT)/tools/Rules.mk
-
-INCLUDES += -I.. -I../lib -I$(XEN_INCLUDE)
 
 IBIN         = blktapctrl tapdisk
 QCOW_UTIL    = img2qcow qcow2raw qcow-create
@@ -9,18 +7,18 @@ LIBAIO_DIR   = ../../libaio/src
 
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
-CFLAGS   += $(CFLAGS_libxenctrl) -I $(LIBAIO_DIR)
-CFLAGS   += $(INCLUDES) -I. -I../../xenstore 
+CFLAGS   += -I../lib
+CFLAGS   += $(CFLAGS_libxenctrl)
+CFLAGS   += $(CFLAGS_libxenstore)
+CFLAGS   += -I $(LIBAIO_DIR)
 CFLAGS   += -D_GNU_SOURCE
 
 # Get gcc to generate the dependencies for us.
 CFLAGS   += -Wp,-MD,.$(@F).d
 DEPS      = .*.d
 
-LIBS      := -L. -L.. -L../lib
-LIBS      += -Wl,-rpath-link,$(XEN_XENSTORE)
-
-LIBS_IMG  := $(LIBAIO_DIR)/libaio.a -lcrypto -lpthread -lz
+LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) -L../lib 
-lblktap
+LDFLAGS_img := $(LIBAIO_DIR)/libaio.a -lcrypto -lpthread -lz
 
 BLK-OBJS-y  := block-aio.o
 BLK-OBJS-y  += block-sync.o
@@ -34,17 +32,17 @@ BLK-OBJS-$(CONFIG_Linux) += blk_linux.c
 
 all: $(IBIN) qcow-util
 
-blktapctrl: blktapctrl.c
-       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap 
$(LDFLAGS_libxenctrl)
+blktapctrl: blktapctrl.o
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDFLAGS_blktapctrl)
 
-tapdisk: tapdisk.c $(BLK-OBJS-y) tapdisk.c
-       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_IMG)
+tapdisk: tapdisk.o $(BLK-OBJS-y)
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDFLAGS_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) $(LIBS_IMG)
+img2qcow qcow2raw qcow-create: %: %.o $(BLK-OBJS-y)
+       $(CC) $(CFLAGS) -o $* $^ $(LDFLAGS) $(LDFLAGS_img)
 
 install: all
        $(INSTALL_PROG) $(IBIN) $(QCOW_UTIL) $(VHD_UTIL) $(DESTDIR)$(SBINDIR)
diff -r bf8a3fc79093 -r fea44c1d3e41 tools/blktap/lib/Makefile
--- a/tools/blktap/lib/Makefile Mon Mar 17 10:45:24 2008 +0000
+++ b/tools/blktap/lib/Makefile Mon Mar 17 10:57:59 2008 +0000
@@ -5,8 +5,9 @@ MINOR    = 0
 MINOR    = 0
 SONAME   = libblktap.so.$(MAJOR)
 
-INCLUDES += -I. -I.. -I $(XEN_LIBXC) -I$(XEN_INCLUDE) $(CFLAGS_libxenstore)
-
+CFLAGS   += -I.
+CFLAGS   += $(CFLAGS_libxenctrl)
+CFLAGS   += $(CFLAGS_libxenstore)
 LDFLAGS  += $(LDFLAGS_libxenstore)
 
 SRCS     :=
@@ -20,23 +21,18 @@ CFLAGS   += -D _GNU_SOURCE
 
 # Get gcc to generate the dependencies for us.
 CFLAGS   += -Wp,-MD,.$(@F).d
-CFLAGS   += $(INCLUDES) 
 DEPS     = .*.d
 
-OBJS     = $(patsubst %.c,%.o,$(SRCS))
+OBJS     = $(SRCS:.c=.o)
+OBJS_PIC = $(SRCS:.c=.opic)
 IBINS   :=
 
 LIB      = libblktap.a libblktap.so.$(MAJOR).$(MINOR)
 
 .PHONY: all
-all: build
+all: $(LIB)
 
-.PHONY: build
-build: libblktap.a
-
-.PHONY: libblktap
-libblktap: libblktap.a
-
+.PHONY: install
 install: all
        $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
@@ -45,19 +41,20 @@ install: all
        ln -sf libblktap.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libblktap.so
        $(INSTALL_DATA) blktaplib.h $(DESTDIR)$(INCLUDEDIR)
 
+.PHONY: clean
 clean:
        rm -rf *.a *.so* *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
 
-libblktap.a: $(OBJS) 
+libblktap.so.$(MAJOR).$(MINOR): $(OBJS_PIC) 
        $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,$(SONAME) $(SHLIB_CFLAGS) \
-             -L$(XEN_XENSTORE) $(LDFLAGS)                                 \
-             -o libblktap.so.$(MAJOR).$(MINOR) $^ $(LIBS)
+             $(LDFLAGS) -o $@ $^
        ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
        ln -sf libblktap.so.$(MAJOR) libblktap.so
-       $(AR) rc $@ libblktap.so
 
-.PHONY: TAGS all build clean install libblktap
+libblktap.a: $(OBJS) 
+       $(AR) rc $@ $^
 
+.PHONY: TAGS
 TAGS:
        etags -t $(SRCS) *.h
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Clean up blktap Makefiles., Xen patchbot-unstable <=