ia64/xen-unstable

view tools/Rules.mk @ 19835:edfdeb150f27

Fix buildsystem to detect udev > version 124

udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 25 13:02:37 2009 +0100 (2009-06-25)
parents 23f9857f642f
children
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
17 CFLAGS_include = -I$(XEN_INCLUDE)
19 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
20 LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
22 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
23 LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest
25 CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
26 LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
28 X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
30 CFLAGS += -D__XEN_TOOLS__
32 # Get gcc to generate the dependencies for us.
33 CFLAGS += -MMD -MF .$(@F).d
34 DEPS = .*.d
36 ifneq ($(XEN_OS),NetBSD)
37 # Enable implicit LFS support *and* explicit LFS names.
38 CFLAGS += $(shell getconf LFS_CFLAGS)
39 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
40 LDFLAGS += $(shell getconf LFS_LDFLAGS)
41 endif
43 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
44 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
45 CFLAGS += $(CFLAGS-y)
47 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
48 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
49 "Xen requires at least gcc-3.4")
50 $(eval $(check-y))
52 %.opic: %.c
53 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
55 %.o: %.c
56 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
58 %.o: %.cc
59 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
61 subdirs-all subdirs-clean subdirs-install: .phony
62 @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
63 $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
64 done
66 subdir-all-% subdir-clean-% subdir-install-%: .phony
67 $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)