From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 14 of 30] tools: xenstat: install and use shared library
Date: Mon, 21 Mar 2011 14:44:37 +0000 [thread overview]
Message-ID: <7516c1d3ee1fbf0e91cf.1300718677@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1300718663@localhost.localdomain>
# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# 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@citrix.com>
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
next prev parent reply other threads:[~2011-03-21 14:44 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 14:44 [PATCH 00 of 30] tools: shave build yaks Ian Campbell
2011-03-21 14:44 ` [PATCH 01 of 30] libxc: remove dependency on xenstore headers Ian Campbell
2011-03-21 14:44 ` [PATCH 02 of 30] tools: libxc: drop rpm.spec Ian Campbell
2011-03-21 14:44 ` [PATCH 03 of 30] tools: vnet: Remove Ian Campbell
2011-03-21 14:44 ` [PATCH 04 of 30] tools: Drop use of $(INCLUDES) Ian Campbell
2011-03-21 14:44 ` [PATCH 05 of 30] tools: vtpm: Use $(BINDIR) rather than a privately defined variable Ian Campbell
2011-03-21 14:44 ` [PATCH 06 of 30] tools: remove unnecessary uses of -L Ian Campbell
2011-03-21 14:44 ` [PATCH 07 of 30] tools: remove unnecessary uses of -I Ian Campbell
2011-03-21 14:44 ` [PATCH 08 of 30] tools: Drop XEN_XC variable Ian Campbell
2011-03-21 14:44 ` [PATCH 09 of 30] tools: blktap2: copy xenstore/hashtable.h into blktap2 Ian Campbell
2011-03-21 18:03 ` Ian Jackson
2011-03-21 20:47 ` Shriram Rajagopalan
2011-03-21 21:56 ` Ian Campbell
2011-03-21 22:17 ` Shriram Rajagopalan
2011-03-24 10:29 ` Ian Campbell
2011-03-24 17:35 ` Shriram Rajagopalan
2011-03-29 8:19 ` Ian Campbell
2011-03-31 17:17 ` Ian Jackson
2011-03-21 14:44 ` [PATCH 10 of 30] tools: consistently use $(CFLAGS_xeninclude) instead of open coding Ian Campbell
2011-03-21 14:44 ` [PATCH 11 of 30] tools: consistently use $({CFLAGS, LDLIBS}_libxenctrl) " Ian Campbell
2011-03-21 14:44 ` [PATCH 12 of 30] tools: consistently use $({CFLAGS, LDLIBS}_libxenstore) " Ian Campbell
2011-03-21 14:44 ` [PATCH 13 of 30] tools: consistently use $({CFLAGS, LDLIBS}_libxenlight) " Ian Campbell
2011-03-21 14:44 ` Ian Campbell [this message]
2011-03-21 14:44 ` [PATCH 15 of 30] tools: Drop $(X11_LDPATH) from build Ian Campbell
2011-03-21 14:44 ` [PATCH 16 of 30] tools: allow Makefiles to define CFLAGS_foo.o Ian Campbell
2011-03-21 14:44 ` [PATCH 17 of 30] tools: ocaml: link xl bindings against libxl Ian Campbell
2011-03-21 14:44 ` [PATCH 18 of 30] tools: ocaml: link evtchn bindings against libxenctrl Ian Campbell
2011-03-21 14:44 ` [PATCH 19 of 30] tools: users of libxl currently need to see libxc and libxenstore headers Ian Campbell
2011-03-21 14:44 ` [PATCH 20 of 30] tools: ocaml: push CFLAGS usage down into the specific bindings Ian Campbell
2011-03-21 14:44 ` [PATCH 21 of 30] tools: flask: Remove BASECFLAGS, just use CFLAGS Ian Campbell
2011-03-21 14:44 ` [PATCH 22 of 30] tools: flask: remove $(LOADLIBES) Ian Campbell
2011-03-21 14:44 ` [PATCH 23 of 30] tools: provide generic rules for compiling .S files Ian Campbell
2011-03-21 14:44 ` [PATCH 24 of 30] tools: Remove $(CFLAGS) from links lines Ian Campbell
2011-03-21 14:44 ` [PATCH 25 of 30] libxl: move libxl_doimid_valid_guest out of line Ian Campbell
2011-03-21 14:44 ` [PATCH 26 of 30] libxl: drop protype for libxl_ctx_set_log Ian Campbell
2011-03-21 14:44 ` [PATCH 27 of 30] libxl: remove XS transaction from public API Ian Campbell
2011-03-21 14:44 ` [PATCH 28 of 30] libxl: do not expose libxenctrl/libxenstore headers via libxl.h Ian Campbell
2011-03-21 14:44 ` [PATCH 29 of 30] tools: drop further uses of -Wp, -MD, .$(@F).d to generate dependencies Ian Campbell
2011-03-21 14:44 ` [PATCH 30 of 30] tools: remove pattern matched linking rules Ian Campbell
2011-03-21 18:15 ` [PATCH 00 of 30] tools: shave build yaks Ian Jackson
2011-03-23 16:15 ` Olaf Hering
2011-03-23 16:57 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7516c1d3ee1fbf0e91cf.1300718677@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).