Bastian Blank
2008-Jan-25 20:26 UTC
[Xen-devel] [PATCH] blktap - cleanup makefile and libs
# HG changeset patch # User Bastian Blank <waldi@debian.org> # Date 1201292160 -3600 # Node ID 815ddbdb262918bd5437778807b1c0dafb81e970 # Parent bc4a56dd323b1ab9f8012d72a30a3f148c009014 blktap: Cleanup makefile and linked libs. Signed-off-by: Bastian Blank <waldi@debian.org> 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@lists.xensource.com http://lists.xensource.com/xen-devel