debuggers.hg

view tools/Rules.mk @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents ae51abc964ee
children 18807b89083d
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 XEN_INCLUDE = $(XEN_ROOT)/tools/include
12 XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
13 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
14 XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
15 XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
16 XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap2
18 CFLAGS_include = -I$(XEN_INCLUDE)
20 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
21 LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl $(DLOPEN_LIBS)
23 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
24 LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest
26 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
27 LDLIBS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
29 ifeq ($(CONFIG_Linux),y)
30 LIBXL_BLKTAP = y
31 else
32 LIBXL_BLKTAP = n
33 endif
35 ifeq ($(LIBXL_BLKTAP),y)
36 CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_include)
37 LDLIBS_libblktapctl = -L$(XEN_BLKTAP2)/control -lblktapctl
38 else
39 CFLAGS_libblktapctl =
40 LDLIBS_libblktapctl =
41 endif
43 X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
45 CFLAGS += -D__XEN_TOOLS__
47 # Get gcc to generate the dependencies for us.
48 CFLAGS += -MMD -MF .$(@F).d
49 DEPS = .*.d
51 ifneq ($(XEN_OS),NetBSD)
52 # Enable implicit LFS support *and* explicit LFS names.
53 CFLAGS += $(shell getconf LFS_CFLAGS)
54 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
55 LDFLAGS += $(shell getconf LFS_LDFLAGS)
56 endif
58 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
59 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
60 CFLAGS += $(CFLAGS-y)
62 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
63 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
64 "Xen requires at least gcc-3.4")
65 $(eval $(check-y))
67 _PYTHON_PATH := $(shell which $(PYTHON))
68 PYTHON_PATH ?= $(_PYTHON_PATH)
69 INSTALL_PYTHON_PROG = \
70 $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG)
72 %.opic: %.c
73 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
75 %.o: %.c
76 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
78 %.o: %.cc
79 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
81 subdirs-all subdirs-clean subdirs-install subdirs-distclean: .phony
82 @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
83 $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
84 done
86 subdir-all-% subdir-clean-% subdir-install-%: .phony
87 $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)
89 subdir-distclean-%: .phony
90 $(MAKE) -C $* clean