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 2/4] tools - Define CFLAGS and LDFLAGS for libxenctrl

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2/4] tools - Define CFLAGS and LDFLAGS for libxenctrl
From: Bastian Blank <bastian@xxxxxxxxxxxx>
Date: Sat, 26 Jan 2008 20:34:18 +0100
Delivery-date: Sat, 26 Jan 2008 11:35:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
# HG changeset patch
# User Bastian Blank <waldi@xxxxxxxxxx>
# Date 1201375662 -3600
# Node ID dbe5451477ab54048baf55d46a5f3349bccd3d49
# Parent  15419f59710aeaaf83fc35fbbf955b15ec713051
Define CFLAGS and LDFLAGS for libxenctrl.

Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>

diff -r 15419f59710a -r dbe5451477ab tools/Rules.mk
--- a/tools/Rules.mk    Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/Rules.mk    Sat Jan 26 20:27:42 2008 +0100
@@ -10,6 +10,11 @@ XEN_LIBXC          = $(XEN_ROOT)/tools/l
 XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
 XEN_XENSTORE       = $(XEN_ROOT)/tools/xenstore
 XEN_LIBXENSTAT     = $(XEN_ROOT)/tools/xenstat/libxenstat/src
+
+CFLAGS_include = -I$(XEN_INCLUDE)
+
+CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
+LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
 
 X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
 
diff -r 15419f59710a -r dbe5451477ab tools/blktap/drivers/Makefile
--- a/tools/blktap/drivers/Makefile     Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/blktap/drivers/Makefile     Sat Jan 26 20:27:42 2008 +0100
@@ -9,7 +9,7 @@ LIBAIO_DIR   = ../../libaio/src
 
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
-CFLAGS   += -I $(XEN_LIBXC) -I $(LIBAIO_DIR)
+CFLAGS   += $(CFLAGS_libxenctrl) -I $(LIBAIO_DIR)
 CFLAGS   += $(INCLUDES) -I. -I../../xenstore 
 CFLAGS   += -D_GNU_SOURCE
 
@@ -18,7 +18,6 @@ DEPS      = .*.d
 DEPS      = .*.d
 
 LIBS      := -L. -L.. -L../lib
-LIBS      += -L$(XEN_LIBXC)
 LIBS      += -Wl,-rpath-link,$(XEN_XENSTORE)
 
 LIBS_IMG  := $(LIBAIO_DIR)/libaio.a -lcrypto -lpthread -lz
@@ -35,7 +34,7 @@ all: $(IBIN) qcow-util
 all: $(IBIN) qcow-util
 
 blktapctrl: blktapctrl.c
-       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap -lxenctrl
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -lblktap 
$(LDFLAGS_libxenctrl)
 
 tapdisk: tapdisk.c $(BLK-OBJS-y) tapdisk.c
        $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_IMG)
diff -r 15419f59710a -r dbe5451477ab tools/console/Makefile
--- a/tools/console/Makefile    Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/console/Makefile    Sat Jan 26 20:27:42 2008 +0100
@@ -4,9 +4,9 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
 
-CFLAGS  += -I $(XEN_LIBXC)
+CFLAGS  += $(CFLAGS_libxenctrl)
 CFLAGS  += -I $(XEN_XENSTORE)
-CFLAGS  += -I $(XEN_INCLUDE)
+LDFLAGS += $(LDFLAGS_libxenctrl)
 
 BIN      = xenconsoled xenconsole
 
@@ -19,12 +19,12 @@ clean:
        $(RM) client/*.o daemon/*.o
 
 xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
-       $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-              $(UTIL_LIBS) $(SOCKET_LIBS) -lxenctrl -lxenstore
+       $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_XENSTORE) \
+              $(UTIL_LIBS) $(SOCKET_LIBS) -lxenstore
 
 xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
-       $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-             $(UTIL_LIBS) $(SOCKET_LIBS) -lxenctrl -lxenstore
+       $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_XENSTORE) \
+             $(UTIL_LIBS) $(SOCKET_LIBS) -lxenstore
 
 .PHONY: install
 install: $(BIN)
diff -r 15419f59710a -r dbe5451477ab tools/debugger/xenitp/Makefile
--- a/tools/debugger/xenitp/Makefile    Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/debugger/xenitp/Makefile    Sat Jan 26 20:27:42 2008 +0100
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 #CFLAGS  += -Werror -g -O0
 
-CFLAGS  += -I $(XEN_LIBXC)
+CFLAGS  += $(CFLAGS_libxenctrl)
 
 HDRS     = $(wildcard *.h)
 OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
@@ -40,8 +40,8 @@ clean:
        $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
 
 %: %.c $(HDRS) Makefile
-       $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
+       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS_libxenctrl)
 
 XENITP_OBJS=xenitp.o ia64-dis.o ia64-opc.o cpu-ia64-opc.o
 xenitp: $(XENITP_OBJS)
-       $(CC) $(CFLAGS) -o $@ $(XENITP_OBJS) -L$(XEN_LIBXC) -lxenctrl
+       $(CC) $(CFLAGS) -o $@ $(XENITP_OBJS) $(LDFLAGS_libxenctrl)
diff -r 15419f59710a -r dbe5451477ab tools/flask/loadpolicy/Makefile
--- a/tools/flask/loadpolicy/Makefile   Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/flask/loadpolicy/Makefile   Sat Jan 26 20:27:42 2008 +0100
@@ -12,10 +12,9 @@ PROG_DEP = .*.d
 PROG_DEP = .*.d
 BASECFLAGS+= $(PROFILE)
 #BASECFLAGS+= -I$(XEN_ROOT)/tools
-BASECFLAGS+= -I$(LIBXC_ROOT)
+BASECFLAGS+= $(CFLAGS_libxenctrl)
 BASECFLAGS+= -I$(LIBFLASK_ROOT)/include
 BASECFLAGS+= -I.
-BASECFLAGS+= -I$(XEN_INCLUDE)
 
 CFLAGS  += $(BASECFLAGS)
 LDFLAGS += $(PROFILE) -L$(XEN_LIBXC) -L$(LIBFLASK_ROOT)
@@ -31,7 +30,7 @@ all: $(CLIENTS)
 all: $(CLIENTS)
 
 $(CLIENTS): flask-%: %.o
-       $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask 
-lxenctrl -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask 
$(LDFLAGS_libxenctrl) -o $@
 
 $(CLIENTS_OBJS): $(CLIENTS_SRCS)
        $(COMPILE.c) -o $@ $<
diff -r 15419f59710a -r dbe5451477ab tools/fs-back/Makefile
--- a/tools/fs-back/Makefile    Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/fs-back/Makefile    Sat Jan 26 20:27:42 2008 +0100
@@ -8,7 +8,7 @@ CFLAGS   += -Werror
 CFLAGS   += -Werror
 CFLAGS   += -Wno-unused
 CFLAGS   += -fno-strict-aliasing
-CFLAGS   += -I $(XEN_LIBXC)
+CFLAGS   += $(CFLAGS_libxenctrl)
 CFLAGS   += $(INCLUDES) -I. -I../xenstore 
 CFLAGS   += -D_GNU_SOURCE
 
@@ -17,8 +17,8 @@ DEPS      = .*.d
 DEPS      = .*.d
 
 LIBS      := -L. -L.. -L../lib
-LIBS      += -L$(XEN_LIBXC)
-LIBS      += -lxenctrl -lpthread -lrt 
+LIBS      += $(LDFLAGS_libxenctrl)
+LIBS      += -lpthread -lrt 
 LIBS      += -L$(XEN_XENSTORE) -lxenstore
 
 OBJS     := fs-xenbus.o fs-ops.o
diff -r 15419f59710a -r dbe5451477ab tools/misc/Makefile
--- a/tools/misc/Makefile       Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/misc/Makefile       Sat Jan 26 20:27:42 2008 +0100
@@ -45,4 +45,4 @@ clean:
        $(CC) -c $(CFLAGS) -o $@ $<
 
 xenperf: %: %.o Makefile
-       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl
+       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)
diff -r 15419f59710a -r dbe5451477ab tools/security/Makefile
--- a/tools/security/Makefile   Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/security/Makefile   Sat Jan 26 20:27:42 2008 +0100
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS   += -Werror
 CFLAGS   += -fno-strict-aliasing
-CFLAGS   += -I. -I $(XEN_LIBXC)
+CFLAGS   += -I. $(CFLAGS_libxenctrl)
 
 CPPFLAGS += -MMD -MF .$*.d
 PROG_DEPS = .*.d
@@ -82,7 +82,7 @@ build: $(ACM_INST_TOOLS) $(ACM_NOINST_TO
        chmod 700 $(ACM_SCRIPTS)
 
 xensec_tool: $(OBJS_TOOL)
-       $(CC) -g $(CFLAGS) $(LDFLAGS) -O0 -o $@ $^ -L$(XEN_LIBXC) -lxenctrl
+       $(CC) -g $(CFLAGS) $(LDFLAGS) -O0 -o $@ $^ $(LDFLAGS_libxenctrl)
 
 xensec_gen: xensec_gen.py
        cp -f $^ $@
diff -r 15419f59710a -r dbe5451477ab tools/xcutils/Makefile
--- a/tools/xcutils/Makefile    Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/xcutils/Makefile    Sat Jan 26 20:27:42 2008 +0100
@@ -11,7 +11,7 @@ XEN_ROOT      = ../..
 XEN_ROOT       = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-INCLUDES += -I $(XEN_LIBXC) -I $(XEN_XENSTORE) -I$(XEN_INCLUDE)
+INCLUDES += $(CFLAGS_libxenctrl) -I $(XEN_XENSTORE) -I$(XEN_INCLUDE)
 
 CFLAGS += -Werror
 CFLAGS += $(INCLUDES)
@@ -22,7 +22,7 @@ PROG_DEP = .*.d
 
 PROGRAMS = xc_restore xc_save readnotes
 
-LDLIBS   = -L$(XEN_LIBXC) -L$(XEN_XENSTORE) -lxenguest -lxenctrl -lxenstore
+LDLIBS   = $(LDFLAGS_libxenctrl) -L$(XEN_XENSTORE) -lxenguest -lxenstore
 
 .PHONY: all
 all: build
diff -r 15419f59710a -r dbe5451477ab tools/xenmon/Makefile
--- a/tools/xenmon/Makefile     Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/xenmon/Makefile     Sat Jan 26 20:27:42 2008 +0100
@@ -15,9 +15,8 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
 CFLAGS  += -I $(XEN_XC)
-CFLAGS  += -I $(XEN_LIBXC)
-CFLAGS  += -I $(XEN_INCLUDE)
-LDFLAGS += -L $(XEN_LIBXC)
+CFLAGS  += $(CFLAGS_libxenctrl)
+LDFLAGS += $(LDFLAGS_libxenctrl)
 
 BIN = xentrace_setmask xenbaked
 SCRIPTS = xenmon.py
@@ -41,6 +40,6 @@ clean:
 
 
 %: %.c Makefile
-       $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
 xentrace_%: %.c Makefile
-       $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $<
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
diff -r 15419f59710a -r dbe5451477ab tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/xenstore/Makefile   Sat Jan 26 20:27:42 2008 +0100
@@ -11,12 +11,11 @@ BASECFLAGS += -Wp,-MD,.$(@F).d
 BASECFLAGS += -Wp,-MD,.$(@F).d
 PROG_DEP = .*.d
 BASECFLAGS+= $(PROFILE)
-BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc
+BASECFLAGS+= $(CFLAGS_libxenctrl)
 BASECFLAGS+= -I.
-BASECFLAGS+= -I$(XEN_INCLUDE)
 
 CFLAGS  += $(BASECFLAGS)
-LDFLAGS += $(PROFILE) -L$(XEN_LIBXC)
+LDFLAGS += $(PROFILE)
 
 CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm 
xenstore-chmod
 CLIENTS += xenstore-write
@@ -34,7 +33,7 @@ all: libxenstore.so libxenstore.a xensto
 all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump 
xenstore-control xenstore-ls
 
 xenstored: $(XENSTORED_OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl 
$(SOCKET_LIBS) -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) 
$(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@
 
 $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
        $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore 
$(SOCKET_LIBS) -o $@
diff -r 15419f59710a -r dbe5451477ab tools/xentrace/Makefile
--- a/tools/xentrace/Makefile   Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/xentrace/Makefile   Sat Jan 26 20:27:42 2008 +0100
@@ -3,9 +3,8 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 CFLAGS  += -Werror
 
-CFLAGS  += -I $(XEN_XC)
-CFLAGS  += -I $(XEN_LIBXC)
-CFLAGS  += -I $(XEN_INCLUDE)
+CFLAGS  += $(CFLAGS_libxenctrl)
+LDFLAGS += $(LDFLAGS_libxenctrl)
 
 HDRS     = $(wildcard *.h)
 OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
@@ -50,6 +49,6 @@ clean:
        $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
 
 %: %.c $(HDRS) Makefile
-       $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl
+       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
 xentrace_%: %.c $(HDRS) Makefile
-       $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl
+       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 2/4] tools - Define CFLAGS and LDFLAGS for libxenctrl, Bastian Blank <=