Files
xen/tools/Rules.mk
T
kfraser@localhost.localdomain 228dadc99a Include Solaris kernel headers
Add the Solaris kernel headers used be the userspace tools to the
distribution. The same setup as used by Linux is taken. We modify the
Linux kernel headers to also install in /usr/include/xen/sys/ -
without a kernel-neutral path, it can make using the headers very
difficult, and encourages errors.

Signed-off-by: John Levon <john.levon@sun.com>
2007-06-11 15:50:35 +01:00

59 lines
1.9 KiB
Makefile

# -*- mode: Makefile; -*-
# `all' is the default target
all:
include $(XEN_ROOT)/Config.mk
XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
XEN_LIBXC = $(XEN_ROOT)/tools/libxc
XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
CFLAGS += -D__XEN_TOOLS__
# Enable implicit LFS support *and* explicit LFS names.
CFLAGS += $(shell getconf LFS_CFLAGS)
CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
LDFLAGS += $(shell getconf LFS_LDFLAGS)
# 32-bit x86 does not perform well with -ve segment accesses on Xen.
CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
CFLAGS += $(CFLAGS-y)
# Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
"Xen requires at least gcc-3.4")
$(eval $(check-y))
%.opic: %.c
$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
%.o: %.cc
$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
.PHONY: mk-symlinks
mk-symlinks:
mkdir -p xen/sys
( cd xen/sys && \
ln -sf ../../$(XEN_ROOT)/tools/include/$(XEN_OS)/*.h . )
mkdir -p xen
( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
mkdir -p xen/hvm
( cd xen/hvm && ln -sf ../../$(XEN_ROOT)/xen/include/public/hvm/*.h . )
mkdir -p xen/io
( cd xen/io && ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
mkdir -p xen/arch-x86
( cd xen/arch-x86 && ln -sf ../../$(XEN_ROOT)/xen/include/public/arch-x86/*.h . )
mkdir -p xen/foreign
( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/Makefile . )
( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/reference.size . )
( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.py . )
$(MAKE) -C xen/foreign