@@ -192,9 +192,9 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
--includedir=$(PREFIX)/lib/xen/include \
--source-path=$$source \
--extra-cflags="-I$(XEN_ROOT)/tools/include \
- -I$(XEN_ROOT)/tools/libxc \
- -I$(XEN_ROOT)/tools/xenstore \
- -I$(XEN_ROOT)/tools/xenstore/compat \
+ -I$(XEN_ROOT)/tools/libxc/include \
+ -I$(XEN_ROOT)/tools/xenstore/include \
+ -I$(XEN_ROOT)/tools/xenstore/compat/include \
$(EXTRA_CFLAGS_QEMU_XEN)" \
--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
-L$(XEN_ROOT)/tools/xenstore \
@@ -35,15 +35,15 @@ INSTALL_SHLIB = : install-shlib-unsupported-fail
SYMLINK_SHLIB = : symlink-shlib-unsupported-fail
endif
-CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
+CFLAGS_libxenctrl = -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude)
LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl$(libextension)
SHLIB_libxenctrl = -Wl,-rpath-link=$(XEN_LIBXC)
-CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
+CFLAGS_libxenguest = -I$(XEN_LIBXC)/include $(CFLAGS_xeninclude)
LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest$(libextension)
SHLIB_libxenguest = -Wl,-rpath-link=L$(XEN_LIBXC)
-CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_xeninclude)
+CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
LDLIBS_libxenstore = $(XEN_XENSTORE)/libxenstore$(libextension)
SHLIB_libxenstore = -Wl,-rpath-link=$(XEN_XENSTORE)
@@ -16,6 +16,8 @@ CFLAGS += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += -D_GNU_SOURCE
CFLAGS += -DUSE_NFS_LOCKS
+# drivers/block-log.c incorrectly uses libxc internals
+CFLAGS += -I$(XEN_ROOT)/tools/libxc
ifeq ($(CONFIG_X86_64),y)
CFLAGS += -fPIC
@@ -89,7 +89,7 @@ OSDEP_SRCS-y += xenctrl_osdep_ENOSYS.c
-include $(XEN_TARGET_ARCH)/Makefile
CFLAGS += -Werror -Wmissing-prototypes
-CFLAGS += -I. $(CFLAGS_xeninclude)
+CFLAGS += -I. -I./include $(CFLAGS_xeninclude)
# Needed for posix_fadvise64() in xc_linux.c
CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
@@ -140,12 +140,12 @@ install: build
$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
- $(INSTALL_DATA) xenctrl.h xenctrlosdep.h xentoollog.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
- $(INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(INCLUDEDIR)
.PHONY: TAGS
TAGS:
similarity index 100%
rename from tools/libxc/xc_dom.h
rename to tools/libxc/include/xc_dom.h
similarity index 100%
rename from tools/libxc/xenctrl.h
rename to tools/libxc/include/xenctrl.h
similarity index 100%
rename from tools/libxc/xenctrlosdep.h
rename to tools/libxc/include/xenctrlosdep.h
similarity index 100%
rename from tools/libxc/xenguest.h
rename to tools/libxc/include/xenguest.h
similarity index 100%
rename from tools/libxc/xentoollog.h
rename to tools/libxc/include/xentoollog.h
@@ -6,6 +6,8 @@ CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_xeninclude)
CFLAGS += $(CFLAGS_libxenstore)
+# xen-hptool.c and xen-mfndump.c incorrectly use libxc internals
+CFLAGS += -I$(XEN_ROOT)/tools/libxc
HDRS = $(wildcard *.h)
@@ -13,7 +13,7 @@ PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"
xc = Extension("xc",
extra_compile_args = extra_compile_args,
- include_dirs = [ PATH_XEN, PATH_LIBXC, "xen/lowlevel/xc" ],
+ include_dirs = [ PATH_XEN, PATH_LIBXC + "/include", "xen/lowlevel/xc" ],
library_dirs = [ PATH_LIBXC ],
libraries = [ "xenctrl", "xenguest" ],
depends = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ],
@@ -21,7 +21,7 @@ xc = Extension("xc",
xs = Extension("xs",
extra_compile_args = extra_compile_args,
- include_dirs = [ PATH_XEN, PATH_XENSTORE, "xen/lowlevel/xs" ],
+ include_dirs = [ PATH_XEN, PATH_XENSTORE + "/include", "xen/lowlevel/xs" ],
library_dirs = [ PATH_XENSTORE ],
libraries = [ "xenstore" ],
depends = [ PATH_XENSTORE + "/libxenstore.so" ],
@@ -29,7 +29,7 @@ xs = Extension("xs",
xl = Extension("xl",
extra_compile_args = extra_compile_args,
- include_dirs = [ PATH_XEN, PATH_LIBXL, PATH_LIBXC, "xen/lowlevel/xl" ],
+ include_dirs = [ PATH_XEN, PATH_LIBXL, PATH_LIBXC + "/include", "xen/lowlevel/xl" ],
library_dirs = [ PATH_LIBXL ],
libraries = [ "xenlight" ],
depends = [ PATH_LIBXL + "/libxenlight.so" ],
@@ -15,7 +15,8 @@ PROGRAMS = readnotes lsevtchn
CFLAGS += -Werror
-CFLAGS_readnotes.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
+# incorrectly uses libxc internals
+CFLAGS_readnotes.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) -I$(XEN_ROOT)/tools/libxc
CFLAGS_lsevtchn.o := $(CFLAGS_libxenctrl)
.PHONY: all
@@ -1,7 +1,8 @@
XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
-CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS)
+# xenpaging.c and file_ops.c incorrectly use libxc internals
+CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS) -I$(XEN_ROOT)/tools/libxc
LDLIBS += $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(PTHREAD_LIBS)
LDFLAGS += $(PTHREAD_LDFLAGS)
@@ -7,6 +7,7 @@ MINOR = 3
CFLAGS += -Werror
CFLAGS += -I.
CFLAGS += -I$(XEN_ROOT)/tools/
+CFLAGS += -I./include
CFLAGS += $(CFLAGS_libxenctrl)
CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
@@ -135,10 +136,10 @@ endif
ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
- $(INSTALL_DATA) xenstore.h $(DESTDIR)$(INCLUDEDIR)
- $(INSTALL_DATA) xenstore_lib.h $(DESTDIR)$(INCLUDEDIR)
- $(INSTALL_DATA) compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h
- $(INSTALL_DATA) compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h
+ $(INSTALL_DATA) include/xenstore.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) include/xenstore_lib.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) include/compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h
+ $(INSTALL_DATA) include/compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h
ln -sf xenstore-compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xs.h
ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xs_lib.h