ia64/xen-unstable

changeset 18009:4743bfaa9259

stubdom: make compilation independent of tools/ by building our own copy of the includes

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 09 11:51:46 2008 +0100 (2008-07-09)
parents be20b11656bb
children e1a8a4c687f0
files stubdom/Makefile tools/include/xen-sys/MiniOS/privcmd.h
line diff
     1.1 --- a/stubdom/Makefile	Wed Jul 09 11:42:45 2008 +0100
     1.2 +++ b/stubdom/Makefile	Wed Jul 09 11:51:46 2008 +0100
     1.3 @@ -52,6 +52,7 @@ TARGET_CFLAGS += -nostdinc
     1.4  TARGET_CPPFLAGS += -isystem $(realpath $(MINI_OS)/include/posix)
     1.5  TARGET_CPPFLAGS += -isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include
     1.6  TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include
     1.7 +TARGET_CPPFLAGS += -I$(CURDIR)/include
     1.8  
     1.9  TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
    1.10  
    1.11 @@ -144,9 +145,15 @@ lwip-cvs:
    1.12  .PHONY: $(CROSS_ROOT)
    1.13  $(CROSS_ROOT): cross-newlib cross-zlib cross-libpci
    1.14  
    1.15 -.PHONY: mk-symlinks
    1.16 -mk-symlinks:
    1.17 -	[ -h include ] || ln -sf ../tools/include .
    1.18 +.PHONY: mk-headers
    1.19 +mk-headers:
    1.20 +	mkdir -p include/xen && \
    1.21 +          ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/xen/include/public/*.h)) include/xen && \
    1.22 +          ( [ -h include/xen/sys ] || ln -sf ../../$(XEN_ROOT)/tools/include/xen-sys/MiniOS include/xen/sys ) && \
    1.23 +	  mkdir -p include/xen-foreign && \
    1.24 +	  ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*)) include/xen-foreign/ && \
    1.25 +	  $(MAKE) -C include/xen-foreign/ && \
    1.26 +	  ( [ -h include/xen/foreign ] || ln -sf ../xen-foreign include/xen/foreign )
    1.27  	mkdir -p libxc
    1.28  	[ -h libxc/Makefile ] || ( cd libxc && \
    1.29  	  ln -sf ../$(XEN_ROOT)/tools/libxc/*.h . && \
    1.30 @@ -177,7 +184,7 @@ TARGETS_MINIOS=$(addprefix mini-os-,$(TA
    1.31  
    1.32  .PHONY: libxc
    1.33  libxc: libxc/libxenctrl.a libxc/libxenguest.a
    1.34 -libxc/libxenctrl.a libxc/libxenguest.a:: cross-zlib mk-symlinks
    1.35 +libxc/libxenctrl.a libxc/libxenguest.a:: cross-zlib mk-headers
    1.36  	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C libxc
    1.37  
    1.38  #######
    1.39 @@ -185,7 +192,7 @@ libxc/libxenctrl.a libxc/libxenguest.a::
    1.40  #######
    1.41  
    1.42  .PHONY: ioemu
    1.43 -ioemu: cross-zlib cross-libpci mk-symlinks libxc
    1.44 +ioemu: cross-zlib cross-libpci mk-headers libxc
    1.45  	[ -f ioemu/config-host.mak ] || \
    1.46  	  ( cd ioemu ; \
    1.47            XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) CFLAGS="$(TARGET_CFLAGS)" sh configure --prefix=/usr --enable-stubdom $(IOEMU_OPTIONS))
    1.48 @@ -196,7 +203,7 @@ ioemu: cross-zlib cross-libpci mk-symlin
    1.49  ######
    1.50  
    1.51  .PHONY: caml
    1.52 -caml: cross-newlib mk-symlinks
    1.53 +caml: cross-newlib mk-headers
    1.54  	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-cvs 
    1.55  
    1.56  ###
    1.57 @@ -204,7 +211,7 @@ caml: cross-newlib mk-symlinks
    1.58  ###
    1.59  
    1.60  .PHONY: c
    1.61 -c: cross-newlib mk-symlinks
    1.62 +c: cross-newlib mk-headers
    1.63  	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-cvs 
    1.64  
    1.65  ######
    1.66 @@ -218,7 +225,7 @@ grub-cvs:
    1.67  	done
    1.68  
    1.69  .PHONY: grub
    1.70 -grub: grub-cvs cross-newlib mk-symlinks
    1.71 +grub: grub-cvs cross-newlib mk-headers
    1.72  	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
    1.73  
    1.74  ########
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/include/xen-sys/MiniOS/privcmd.h	Wed Jul 09 11:51:46 2008 +0100
     2.3 @@ -0,0 +1,18 @@
     2.4 +#ifndef __MINIOS_PUBLIC_PRIVCMD_H__
     2.5 +#define __MINIOS_PUBLIC_PRIVCMD_H__
     2.6 +
     2.7 +#include <sys/types.h>
     2.8 +
     2.9 +typedef struct privcmd_hypercall
    2.10 +{
    2.11 +	u64 op;
    2.12 +	u64 arg[5];
    2.13 +} privcmd_hypercall_t;
    2.14 +
    2.15 +typedef struct privcmd_mmap_entry {
    2.16 +	u64 va;
    2.17 +	u64 mfn;
    2.18 +	u64 npages;
    2.19 +} privcmd_mmap_entry_t; 
    2.20 +
    2.21 +#endif /* __MINIOS_PUBLIC_PRIVCMD_H__ */