diff --git a/Makefile b/Makefile index c395e77..d5941c7 100644 --- a/Makefile +++ b/Makefile @@ -46,10 +46,11 @@ $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a recurse-all: $(SUBDIR_RULES) -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore -tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include +CPPFLAGS += -I$(XEN_ROOT)/tools/libxc +CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib +CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore +CPPFLAGS += -I$(XEN_ROOT)/tools/include + tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS) diff --git a/xen-config-host.h b/xen-config-host.h index 5b1f4d7..f34e76b 100644 --- a/xen-config-host.h +++ b/xen-config-host.h @@ -32,9 +32,6 @@ extern int xc_handle; extern int xen_pause_requested; extern int vcpus; -#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup" -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/xen/qemu-ifdown" - #ifdef CONFIG_STUBDOM #define bdrv_host_device bdrv_raw #endif diff --git a/xen-config.mak b/xen-config.mak index 6210619..40984bc 100644 --- a/xen-config.mak +++ b/xen-config.mak @@ -8,4 +8,4 @@ CONFIG_SOFTMMU=yes CFLAGS += -I$(QEMU_ROOT)/hw -bindir = ${prefix}/${LIBLEAFDIR}/xen/bin +bindir = ${LIBEXEC} diff --git a/xen-hooks.mak b/xen-hooks.mak index c6b4f8c..211416e 100644 --- a/xen-hooks.mak +++ b/xen-hooks.mak @@ -78,4 +78,4 @@ datadir := $(subst qemu,xen/qemu,$(datadir)) docdir := $(subst qemu,xen/qemu,$(docdir)) mandir := $(subst share/man,share/xen/man,$(mandir)) -configdir := /etc/xen +configdir := $(XEN_SCRIPT_DIR) diff --git a/xen-setup b/xen-setup index 8ca0019..fde1568 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,14 @@ rm -f config-host.mak if test -f config-host.h; then mv config-host.h config-host.h~; fi -./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=/usr +if test -z "${PREFIX}"; then + PREFIX="/usr" +fi +if test -z "${XEN_SCRIPT_DIR}"; then + XEN_SCRIPT_DIR="/etc/xen/scripts" +fi + +./configure --disable-gfx-check --disable-curses --disable-slirp "$@" --prefix=${PREFIX} target=i386-dm @@ -22,6 +29,8 @@ ln -sf ../xen-config.mak $target/config.mak cat xen-config-host.mak >>config-host.mak sed -e 's,qemu,xen/qemu,' config-host.h >config-host.h.new +echo "#define DEFAULT_NETWORK_SCRIPT \"${XEN_SCRIPT_DIR}/qemu-ifup\"" >>config-host.h.new +echo "#define DEFAULT_NETWORK_DOWN_SCRIPT \"${XEN_SCRIPT_DIR}/qemu-ifdown\"" >>config-host.h.new echo '#include "xen-config-host.h"' >>config-host.h.new if test -f config-host.h~; then mv config-host.h~ config-host.h; fi