debuggers.hg

annotate tools/Rules.mk @ 21067:b4a1832a916f

Update Xen version to 4.0.0-rc6
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 09 18:18:05 2010 +0000 (2010-03-09)
parents 58dbf27875c5
children 556ece996c0e
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
kaf24@3587 16
keir@16948 17 CFLAGS_include = -I$(XEN_INCLUDE)
keir@16948 18
keir@16948 19 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
keir@16948 20 LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
keir@16948 21
keir@16949 22 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
keir@16949 23 LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest
keir@16949 24
keir@16955 25 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
keir@16950 26 LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
keir@16950 27
keir@16988 28 X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
katzj@4582 29
kaf24@9907 30 CFLAGS += -D__XEN_TOOLS__
kaf24@9572 31
keir@19063 32 # Get gcc to generate the dependencies for us.
keir@19063 33 CFLAGS += -MMD -MF .$(@F).d
keir@19063 34 DEPS = .*.d
keir@19063 35
keir@19500 36 ifneq ($(XEN_OS),NetBSD)
kfraser@12514 37 # Enable implicit LFS support *and* explicit LFS names.
kfraser@12514 38 CFLAGS += $(shell getconf LFS_CFLAGS)
kfraser@12514 39 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
kfraser@12514 40 LDFLAGS += $(shell getconf LFS_LDFLAGS)
keir@19500 41 endif
kfraser@12514 42
kfraser@13100 43 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
kfraser@13100 44 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
kfraser@13100 45 CFLAGS += $(CFLAGS-y)
kfraser@13100 46
keir@14458 47 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
kfraser@14619 48 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
kfraser@14619 49 "Xen requires at least gcc-3.4")
kfraser@14619 50 $(eval $(check-y))
keir@14458 51
keir@20650 52 _PYTHON_PATH := $(shell which $(PYTHON))
keir@20650 53 PYTHON_PATH ?= $(_PYTHON_PATH)
keir@20156 54 INSTALL_PYTHON_PROG = \
keir@20156 55 $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG)
keir@20156 56
kaf24@3941 57 %.opic: %.c
kaf24@3941 58 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
kaf24@3941 59
kaf24@3941 60 %.o: %.c
kaf24@3941 61 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
kaf24@4489 62
kaf24@4489 63 %.o: %.cc
kaf24@4489 64 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
cl349@8124 65
keir@17317 66 subdirs-all subdirs-clean subdirs-install: .phony
keir@20775 67 @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
keir@17309 68 $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
keir@17309 69 done
keir@17309 70
keir@17317 71 subdir-all-% subdir-clean-% subdir-install-%: .phony
keir@17309 72 $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)