Commit 72e7a351 authored by Keir Fraser's avatar Keir Fraser

Define CFLAGS and LDFLAGS for libxenstore.

Signed-off-by: default avatarBastian Blank <waldi@debian.org>
parent c7c0ed1c
......@@ -19,6 +19,9 @@ LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
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)
CFLAGS += -D__XEN_TOOLS__
......
......@@ -5,9 +5,9 @@ MAJOR = 3.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
......
......@@ -5,8 +5,9 @@ include $(XEN_ROOT)/tools/Rules.mk
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)
......
......@@ -9,7 +9,8 @@ CFLAGS += -Werror
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
......
......@@ -12,7 +12,7 @@ XEN_ROOT = ../..
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment