debuggers.hg

annotate 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
rev   line source
kaf24@3587 1 # -*- mode: Makefile; -*-
kaf24@3587 2
cl349@8124 3 # `all' is the default target
cl349@8124 4 all:
cl349@8124 5
kaf24@4290 6 include $(XEN_ROOT)/Config.mk
kaf24@4290 7
keir@18447 8 export _INSTALL := $(INSTALL)
keir@18447 9 INSTALL = $(XEN_ROOT)/tools/cross-install
keir@18447 10
keir@16932 11 XEN_INCLUDE = $(XEN_ROOT)/tools/include
kaf24@3587 12 XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
kaf24@3587 13 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
kaf24@5976 14 XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
josht@6357 15 XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
keir@21631 16 XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap2
kaf24@3587 17
keir@16948 18 CFLAGS_include = -I$(XEN_INCLUDE)
keir@16948 19
keir@16948 20 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
keir@22755 21 LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl $(DLOPEN_LIBS)
keir@16948 22
keir@16949 23 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
sstabellini@22018 24 LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest
keir@16949 25
keir@16955 26 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
sstabellini@22018 27 LDLIBS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
keir@16950 28
Christoph@22044 29 ifeq ($(CONFIG_Linux),y)
Christoph@22044 30 LIBXL_BLKTAP = y
Christoph@22044 31 else
Christoph@22044 32 LIBXL_BLKTAP = n
Christoph@22044 33 endif
Christoph@22044 34
Christoph@22044 35 ifeq ($(LIBXL_BLKTAP),y)
keir@21631 36 CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_include)
sstabellini@22018 37 LDLIBS_libblktapctl = -L$(XEN_BLKTAP2)/control -lblktapctl
Christoph@22044 38 else
Christoph@22044 39 CFLAGS_libblktapctl =
Christoph@22044 40 LDLIBS_libblktapctl =
Christoph@22044 41 endif
keir@21631 42
keir@16988 43 X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
katzj@4582 44
kaf24@9907 45 CFLAGS += -D__XEN_TOOLS__
kaf24@9572 46
keir@19063 47 # Get gcc to generate the dependencies for us.
keir@19063 48 CFLAGS += -MMD -MF .$(@F).d
keir@19063 49 DEPS = .*.d
keir@19063 50
keir@19500 51 ifneq ($(XEN_OS),NetBSD)
kfraser@12514 52 # Enable implicit LFS support *and* explicit LFS names.
kfraser@12514 53 CFLAGS += $(shell getconf LFS_CFLAGS)
kfraser@12514 54 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
kfraser@12514 55 LDFLAGS += $(shell getconf LFS_LDFLAGS)
keir@19500 56 endif
kfraser@12514 57
kfraser@13100 58 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
kfraser@13100 59 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
kfraser@13100 60 CFLAGS += $(CFLAGS-y)
kfraser@13100 61
keir@14458 62 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
kfraser@14619 63 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
kfraser@14619 64 "Xen requires at least gcc-3.4")
kfraser@14619 65 $(eval $(check-y))
keir@14458 66
keir@20650 67 _PYTHON_PATH := $(shell which $(PYTHON))
keir@20650 68 PYTHON_PATH ?= $(_PYTHON_PATH)
keir@20156 69 INSTALL_PYTHON_PROG = \
keir@20156 70 $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG)
keir@20156 71
kaf24@3941 72 %.opic: %.c
kaf24@3941 73 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
kaf24@3941 74
kaf24@3941 75 %.o: %.c
kaf24@3941 76 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
kaf24@4489 77
kaf24@4489 78 %.o: %.cc
kaf24@4489 79 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
cl349@8124 80
keir@21875 81 subdirs-all subdirs-clean subdirs-install subdirs-distclean: .phony
keir@20775 82 @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
keir@17309 83 $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
keir@17309 84 done
keir@17309 85
keir@17317 86 subdir-all-% subdir-clean-% subdir-install-%: .phony
keir@17309 87 $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)
keir@21875 88
keir@21875 89 subdir-distclean-%: .phony
keir@21875 90 $(MAKE) -C $* clean