xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 11 of 30] tools: consistently use $({CFLAGS, LDLIBS}_libxenctrl) instead of open coding
Date: Mon, 21 Mar 2011 14:44:34 +0000	[thread overview]
Message-ID: <6fda0df59ce0845d8408.1300718674@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 6fda0df59ce0845d8408de933b8d323018ad4abf
# Parent  e97432a5c7e8be2bbfbb535e2278aa48456e9459
tools: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.

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

diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/blktap2/control/Makefile
--- a/tools/blktap2/control/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/blktap2/control/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -12,7 +12,7 @@ CFLAGS            += -Wno-unused
 CFLAGS            += -Wno-unused
 CFLAGS            += -I../include -I../drivers
 CFLAGS            += $(CFLAGS_xeninclude)
-CFLAGS            += -I$(XEN_LIBXC)
+CFLAGS            += $(CFLAGS_libxenctrl)
 CFLAGS            += -D_GNU_SOURCE
 CFLAGS            += -DTAPCTL
 
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/blktap2/drivers/Makefile
--- a/tools/blktap2/drivers/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/blktap2/drivers/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -40,7 +40,7 @@ endif
 endif
 
 tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := $(LIBAIO_DIR)/libaio.a 
-tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS  += -I$(LIBAIO_DIR) -I$(XEN_LIBXC)
+tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS  += -I$(LIBAIO_DIR)
 
 ifeq ($(VHD_STATIC),y)
 td-util: CFLAGS += -static
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/flask/libflask/Makefile
--- a/tools/flask/libflask/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/flask/libflask/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -4,14 +4,12 @@ XEN_ROOT = $(CURDIR)/../../..
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-XEN_LIBXC = $(XEN_ROOT)/tools/libxc
-
 SRCS       :=
 SRCS       += flask_op.c
 
 CFLAGS   += -Werror
 CFLAGS   += -fno-strict-aliasing
-CFLAGS   += -I./include -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
+CFLAGS   += -I./include $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude)
 
 # Get gcc to generate the dependencies for us.
 CFLAGS   += -Wp,-MD,.$(@F).d
@@ -58,6 +56,6 @@ libflask.so.$(MAJOR): libflask.so.$(MAJO
 	ln -sf $< $@
 
 libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LDLIBS_libxenctrl)
 
 -include $(DEPS)
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/flask/utils/Makefile
--- a/tools/flask/utils/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/flask/utils/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -1,8 +1,6 @@ XEN_ROOT=$(CURDIR)/../../..
 XEN_ROOT=$(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
-XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
 
-LIBXC_ROOT = $(XEN_ROOT)/tools/libxc
 LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
 
 PROFILE=#-pg
@@ -12,7 +10,7 @@ BASECFLAGS+= -I$(LIBFLASK_ROOT)/include
 BASECFLAGS+= -I$(LIBFLASK_ROOT)/include
 
 CFLAGS  += $(BASECFLAGS)
-LDLIBS += $(PROFILE) -L$(XEN_LIBXC) -L$(LIBFLASK_ROOT)
+LDLIBS += $(PROFILE)
 TESTDIR  = testsuite/tmp
 TESTFLAGS= -DTESTING
 TESTENV  = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
@@ -25,7 +23,7 @@ all: $(CLIENTS)
 all: $(CLIENTS)
 
 $(CLIENTS): flask-%: %.o
-	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -lflask $(LDLIBS_libxenctrl) -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L$(LIBFLASK_ROOT) -lflask $(LDLIBS_libxenctrl) -o $@
 
 .PHONY: clean
 clean: 
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/libxc/Makefile
--- a/tools/libxc/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/libxc/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -193,10 +193,10 @@ xc_dom_bzimageloader.opic: CFLAGS += $(c
 
 libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(call zlib-options,l)
 libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
-	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz -L. -lxenctrl $(PTHREAD_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenctrl) $(PTHREAD_LIBS)
 
 xenctrl_osdep_ENOSYS.so: $(OSDEP_PIC_OBJS) libxenctrl.so
-	$(CC) -g $(CFLAGS) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OSDEP_PIC_OBJS) -L. -lxenctrl
+	$(CC) -g $(CFLAGS) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OSDEP_PIC_OBJS) $(LDLIBS_libxenctrl)
 
 -include $(DEPS)
 
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/libxl/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -87,7 +87,7 @@ libxenlight.so.$(MAJOR): libxenlight.so.
 	ln -sf $< $@
 
 libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS)
-	$(CC) $(CFLAGS) -Wl,-rpath-link -Wl,$(XEN_ROOT)/tools/libxc $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS)
 
 libxenlight.a: $(LIBXL_OBJS)
 	$(AR) rcs libxenlight.a $^
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/misc/Makefile
--- a/tools/misc/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/misc/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
 
-CFLAGS += -I $(XEN_LIBXC)
+CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += $(CFLAGS_xeninclude)
 
 HDRS     = $(wildcard *.h)
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/ocaml/common.make
--- a/tools/ocaml/common.make	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/ocaml/common.make	Mon Mar 21 14:41:46 2011 +0000
@@ -9,7 +9,7 @@ OCAMLYACC ?= ocamlyacc
 OCAMLYACC ?= ocamlyacc
 
 CFLAGS += -fPIC -Werror
-CFLAGS += $(CFLAGS_xeninclude) -I$(TOPLEVEL)/../libxc -I$(TOPLEVEL)/../xenstore -I$(TOPLEVEL)/../libxl
+CFLAGS += $(CFLAGS_xeninclude) $(CFLAGS_libxenctrl) -I$(TOPLEVEL)/../xenstore -I$(TOPLEVEL)/../libxl
 CFLAGS-$(CONFIG_Linux) += -I/usr/lib64/ocaml -I/usr/lib/ocaml
 CFLAGS-$(CONFIG_NetBSD) += -I/usr/pkg/lib/ocaml -fPIC
 
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/ocaml/libs/xc/Makefile
--- a/tools/ocaml/libs/xc/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/ocaml/libs/xc/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -2,14 +2,14 @@ XEN_ROOT=$(TOPLEVEL)/../..
 XEN_ROOT=$(TOPLEVEL)/../..
 include $(TOPLEVEL)/common.make
 
-CFLAGS += -I../mmap -I$(XEN_ROOT)/tools/libxc
-OCAMLINCLUDE += -I ../mmap -I ../uuid -I $(XEN_ROOT)/tools/libxc
+CFLAGS += -I../mmap $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
+OCAMLINCLUDE += -I ../mmap -I ../uuid
 
 OBJS = xc
 INTF = xc.cmi
 LIBS = xc.cma xc.cmxa
 
-LIBS_xc = -L$(XEN_ROOT)/tools/libxc -lxenctrl -lxenguest
+LIBS_xc = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest)
 
 xc_OBJS = $(OBJS)
 xc_C_OBJS = xc_stubs
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/tests/mce-test/tools/Makefile
--- a/tools/tests/mce-test/tools/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/tests/mce-test/tools/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
 
-CFLAGS += -I $(XEN_LIBXC)
+CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += $(CFLAGS_xeninclude) 
 
 HDRS     = $(wildcard *.h)
diff -r e97432a5c7e8 -r 6fda0df59ce0 tools/tests/xen-access/Makefile
--- a/tools/tests/xen-access/Makefile	Mon Mar 21 14:41:46 2011 +0000
+++ b/tools/tests/xen-access/Makefile	Mon Mar 21 14:41:46 2011 +0000
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS += -Werror
 
-CFLAGS += -I $(XEN_LIBXC)
+CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += $(CFLAGS_xeninclude)
 
 TARGETS-y := 
diff -r e97432a5c7e8 -r 6fda0df59ce0 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
@@ -36,9 +36,9 @@ SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,li
 
 WARN_FLAGS=-Wall -Werror
 
-CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE) $(CFLAGS_xeninclude)
-LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/
-LDLIBS-y = -lxenstore -lxenctrl
+CFLAGS+=-Isrc $(CFLAGS_libxenctrl) -I$(XEN_XENSTORE) $(CFLAGS_xeninclude)
+LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/
+LDLIBS-y = -lxenstore $(LDLIBS_libxenctrl)
 LDLIBS-$(CONFIG_SunOS) += -lkstat
 ARLIBS-y = $(XEN_XENSTORE)/libxenstore.so $(XEN_LIBXC)/libxenctrl.so
 ARLIBS-x86_64 = /usr/lib/amd64/libkstat.so

  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 ` Ian Campbell [this message]
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 ` [PATCH 14 of 30] tools: xenstat: install and use shared library Ian Campbell
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=6fda0df59ce0845d8408.1300718674@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).