ia64/xen-unstable

view tools/Rules.mk @ 16911:4bac220563b1

Define CFLAGS and LDFLAGS for libxenguest.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Jan 27 12:58:02 2008 +0000 (2008-01-27)
parents ddf454872de4
children a59e0510780b
line source
1 # -*- mode: Makefile; -*-
3 # `all' is the default target
4 all:
6 include $(XEN_ROOT)/Config.mk
8 XEN_INCLUDE = $(XEN_ROOT)/tools/include
9 XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
10 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
11 XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
12 XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
14 CFLAGS_include = -I$(XEN_INCLUDE)
16 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_include)
17 LDFLAGS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl
19 CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_include)
20 LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lxenguest
22 X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
24 CFLAGS += -D__XEN_TOOLS__
26 # Enable implicit LFS support *and* explicit LFS names.
27 CFLAGS += $(shell getconf LFS_CFLAGS)
28 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
29 LDFLAGS += $(shell getconf LFS_LDFLAGS)
31 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
32 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
33 CFLAGS += $(CFLAGS-y)
35 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
36 check-$(CONFIG_X86) = $(call cc-ver-check,CC,0x030400,\
37 "Xen requires at least gcc-3.4")
38 $(eval $(check-y))
40 %.opic: %.c
41 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
43 %.o: %.c
44 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
46 %.o: %.cc
47 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<