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 14 of 30] tools: xenstat: install and use shared libr

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 14 of 30] tools: xenstat: install and use shared library
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 21 Mar 2011 14:44:37 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 21 Mar 2011 07:55:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1300718663@xxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1300718506 0
# Node ID 7516c1d3ee1fbf0e91cf215ab4956fc29c4c46a4
# Parent  5a131a7ca1cf877786f208003daa44b907a2702f
tools: xenstat: install and use shared library

Remove .so files from the .a file.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 5a131a7ca1cf -r 7516c1d3ee1f tools/Rules.mk
--- a/tools/Rules.mk    Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/Rules.mk    Mon Mar 21 14:41:46 2011 +0000
@@ -28,6 +28,10 @@ CFLAGS_libxenstore = -I$(XEN_XENSTORE) $
 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_xeninclude)
 LDLIBS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
 SHLIB_libxenstore  = -Wl,-rpath-link=$(XEN_XENSTORE)
+
+CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
+LDLIBS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) 
-L$(XEN_LIBXENSTAT) -lxenstat
+SHLIB_libxenstat  = -Wl,-rpath-link=$(XEN_LIBXENSTAT)
 
 ifeq ($(CONFIG_Linux),y)
 LIBXL_BLKTAP = y
diff -r 5a131a7ca1cf -r 7516c1d3ee1f tools/xenstat/libxenstat/Makefile
--- a/tools/xenstat/libxenstat/Makefile Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/xenstat/libxenstat/Makefile Mon Mar 21 14:41:46 2011 +0000
@@ -37,19 +37,15 @@ WARN_FLAGS=-Wall -Werror
 WARN_FLAGS=-Wall -Werror
 
 CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude)
-LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/
+
 LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl)
 LDLIBS-$(CONFIG_SunOS) += -lkstat
-ARLIBS-y = $(XEN_XENSTORE)/libxenstore.so $(XEN_LIBXC)/libxenctrl.so
-ARLIBS-x86_64 = /usr/lib/amd64/libkstat.so
-ARLIBS-x86_32 = /usr/lib/libkstat.so
-ARLIBS-$(CONFIG_SunOS) += $(ARLIBS-$(XEN_TARGET_ARCH))
 
 .PHONY: all
-all: $(LIB)
+all: $(LIB) $(SHLIB) $(SHLIB_LINKS)
 
 $(LIB): $(OBJECTS-y)
-       $(AR) rc $@ $^ $(ARLIBS-y)
+       $(AR) rc $@ $^
        $(RANLIB) $@
 
 $(SHLIB): $(OBJECTS-y)
@@ -65,7 +61,7 @@ src/xenstat_solaris.o: src/xenstat_solar
 src/xenstat_solaris.o: src/xenstat_solaris.c src/xenstat_priv.h
        $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $<
 
-src/libxenstat.so.$(MAJOR): $(LIB)
+src/libxenstat.so.$(MAJOR): $(SHLIB)
        $(MAKE_LINK) $(<F) $@
 
 src/libxenstat.so: src/libxenstat.so.$(MAJOR)
@@ -73,16 +69,11 @@ src/libxenstat.so: src/libxenstat.so.$(M
 
 .PHONY: install
 install: all
-#install: all
-#      $(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)/xenstat.h
-#      $(INSTALL_PROG) $(LIB) $(DESTDIR)$(libdir)/libxenstat.a
-#      $(INSTALL_PROG) $(SHLIB) \
-#                      $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR).$(MINOR)
-#      $(MAKE_LINK) libxenstat.so.$(MAJOR).$(MINOR) \
-#                   $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR)
-#      $(MAKE_LINK) libxenstat.so.$(MAJOR) \
-#                   $(DESTDIR)$(libdir)/libxenstat.so
-#      -$(LDCONFIG)
+       $(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(INCLUDEDIR)
+       $(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR)/libxenstat.a
+       $(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+       ln -sf libxenstat.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenstat.so.$(MAJOR)
+       ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstat.so
 
 PYLIB=bindings/swig/python/_xenstat.so
 PYMOD=bindings/swig/python/xenstat.py
@@ -156,7 +147,7 @@ endif
 
 .PHONY: clean
 clean:
-       rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS-y) \
+       rm -f $(SHLIB) $(SHLIB_LINKS) $(OBJECTS-y) \
              $(BINDINGS) $(BINDINGSRC) $(DEPS)
 
 -include $(DEPS)
diff -r 5a131a7ca1cf -r 7516c1d3ee1f tools/xenstat/xentop/Makefile
--- a/tools/xenstat/xentop/Makefile     Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/xenstat/xentop/Makefile     Mon Mar 21 14:41:46 2011 +0000
@@ -18,9 +18,8 @@ all install xentop:
 all install xentop:
 else
 
-CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
-LDFLAGS += -L$(XEN_LIBXENSTAT)
-LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
+CFLAGS += -DGCC_PRINTF -Wall -Werror $(CFLAGS_libxenstat)
+LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS)
 CFLAGS += -DHOST_$(XEN_OS)
 
 .PHONY: all

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

<Prev in Thread] Current Thread [Next in Thread>