direct-io.hg

view tools/Rules.mk @ 13062:c6f637694b85

[TOOLS] USe -mno-direct-seg-refs when building on i386.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Dec 15 11:53:45 2006 +0000 (2006-12-15)
parents 729a6231de35
children 71c40c3f92f7
line source
1 # -*- mode: Makefile; -*-
3 # `all' is the default target
4 all:
6 include $(XEN_ROOT)/Config.mk
8 XEN_XC = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
9 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
10 XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
11 XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
13 X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
15 CFLAGS += -D__XEN_TOOLS__
17 # Enable implicit LFS support *and* explicit LFS names.
18 CFLAGS += $(shell getconf LFS_CFLAGS)
19 CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
20 LDFLAGS += $(shell getconf LFS_LDFLAGS)
22 # 32-bit x86 does not perform well with -ve segment accesses on Xen.
23 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
24 CFLAGS += $(CFLAGS-y)
26 %.opic: %.c
27 $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
29 %.o: %.c
30 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
32 %.o: %.cc
33 $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
35 .PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS)
37 mk-symlinks-SunOS:
39 mk-symlinks-Linux: LINUX_ROOT=$(XEN_ROOT)/linux-2.6-xen-sparse
40 mk-symlinks-Linux:
41 mkdir -p xen/linux
42 ( cd xen/linux && \
43 ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . )
44 ( cd xen && rm -f sys && ln -sf linux sys )
46 mk-symlinks-xen:
47 mkdir -p xen
48 ( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
49 mkdir -p xen/hvm
50 ( cd xen/hvm && ln -sf ../../$(XEN_ROOT)/xen/include/public/hvm/*.h . )
51 mkdir -p xen/io
52 ( cd xen/io && ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
54 mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS)