ia64/xen-unstable

view tools/Rules.mk @ 19615:13a4f4e6d0a3

x86 hvm: Correctly emulate task switches into vm86 mode.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 19 02:12:04 2009 +0100 (2009-05-19)
parents 887337323bd8
children 23f9857f642f
line source
1 # -*- mode: Makefile; -*-
3 # `all' is the default target
4 all:
6 include $(XEN_ROOT)/Config.mk
8 export _INSTALL := $(INSTALL)
9 INSTALL = $(XEN_ROOT)/tools/cross-install
11 CONFIG_DIR = /etc
12 XEN_CONFIG_DIR = $(CONFIG_DIR)/xen
13 XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts
15 XEN_INCLUDE = $(XEN_ROOT)/tools/include
16 XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
17 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
18 XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
19 XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
21 CFLAGS_include = -I$(XEN_INCLUDE)
23 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
24 LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
26 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
27 LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest
29 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
30 LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
32 X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
34 CFLAGS += -D__XEN_TOOLS__
36 # Get gcc to generate the dependencies for us.
37 CFLAGS += -MMD -MF .$(@F).d
38 DEPS = .*.d
40 ifneq ($(XEN_OS),NetBSD)
41 # Enable implicit LFS support *and* explicit LFS names.
42 CFLAGS += $(shell getconf LFS_CFLAGS)
43 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
44 LDFLAGS += $(shell getconf LFS_LDFLAGS)
45 endif
47 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
48 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
49 CFLAGS += $(CFLAGS-y)
51 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
52 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
53 "Xen requires at least gcc-3.4")
54 $(eval $(check-y))
56 %.opic: %.c
57 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
59 %.o: %.c
60 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
62 %.o: %.cc
63 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
65 subdirs-all subdirs-clean subdirs-install: .phony
66 @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
67 $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
68 done
70 subdir-all-% subdir-clean-% subdir-install-%: .phony
71 $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)