# HG changeset patch
# User Bastian Blank <waldi@xxxxxxxxxx>
# Date 1201375662 -3600
# Node ID 49f254278f6d44ab52776cc722c8674c42a14f43
# Parent 2f8522ac276b70ddc70ec5a228a4a1bb9e18df96
Define CFLAGS and LDFLAGS for libxenstore.
Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>
diff -r 2f8522ac276b -r 49f254278f6d 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
@@ -18,6 +18,9 @@ LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxe
CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest
+
+CFLAGS_libxenstore = -I$(XEN_XENSTORE)
+LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
diff -r 2f8522ac276b -r 49f254278f6d tools/blktap/lib/Makefile
--- a/tools/blktap/lib/Makefile Sat Jan 26 20:27:42 2008 +0100
+++ b/tools/blktap/lib/Makefile Sat Jan 26 20:27:42 2008 +0100
@@ -5,9 +5,9 @@ MINOR = 0
MINOR = 0
SONAME = libblktap.so.$(MAJOR)
-INCLUDES += -I. -I.. -I $(XEN_LIBXC) -I $(XEN_XENSTORE) -I$(XEN_INCLUDE)
+INCLUDES += -I. -I.. -I $(XEN_LIBXC) -I$(XEN_INCLUDE) $(CFLAGS_libxenstore)
-LIBS := -lxenstore
+LDFLAGS += $(LDFLAGS_libxenstore)
SRCS :=
SRCS += xenbus.c blkif.c xs_api.c
diff -r 2f8522ac276b -r 49f254278f6d 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
@@ -5,8 +5,9 @@ CFLAGS += -Werror
CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenctrl)
-CFLAGS += -I $(XEN_XENSTORE)
+CFLAGS += $(CFLAGS_libxenstore)
LDFLAGS += $(LDFLAGS_libxenctrl)
+LDFLAGS += $(LDFLAGS_libxenstore)
BIN = xenconsoled xenconsole
@@ -19,12 +20,12 @@ clean:
$(RM) client/*.o daemon/*.o
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
- $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_XENSTORE) \
- $(UTIL_LIBS) $(SOCKET_LIBS) -lxenstore
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) \
+ $(UTIL_LIBS) $(SOCKET_LIBS)
xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
- $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_XENSTORE) \
- $(UTIL_LIBS) $(SOCKET_LIBS) -lxenstore
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) \
+ $(UTIL_LIBS) $(SOCKET_LIBS)
.PHONY: install
install: $(BIN)
diff -r 2f8522ac276b -r 49f254278f6d 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
@@ -9,7 +9,8 @@ CFLAGS += -Wno-unused
CFLAGS += -Wno-unused
CFLAGS += -fno-strict-aliasing
CFLAGS += $(CFLAGS_libxenctrl)
-CFLAGS += $(INCLUDES) -I. -I../xenstore
+CFLAGS += $(CFLAGS_libxenstore)
+CFLAGS += $(INCLUDES) -I.
CFLAGS += -D_GNU_SOURCE
# Get gcc to generate the dependencies for us.
@@ -18,8 +19,8 @@ DEPS = .*.d
LIBS := -L. -L.. -L../lib
LIBS += $(LDFLAGS_libxenctrl)
+LIBS += $(LDFLAGS_libxenstore)
LIBS += -lpthread -lrt
-LIBS += -L$(XEN_XENSTORE) -lxenstore
OBJS := fs-xenbus.o fs-ops.o
diff -r 2f8522ac276b -r 49f254278f6d 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
@@ -12,7 +12,7 @@ include $(XEN_ROOT)/tools/Rules.mk
include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -Werror
-CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) -I$(XEN_XENSTORE)
+CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
# Make gcc generate dependencies.
CFLAGS += -Wp,-MD,.$(@F).d
@@ -20,7 +20,7 @@ PROG_DEP = .*.d
PROGRAMS = xc_restore xc_save readnotes
-LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) -L$(XEN_XENSTORE)
-lxenstore
+LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
.PHONY: all
all: build
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|