ia64/xen-unstable

view tools/Rules.mk @ 13740:b51ed174fe8f

Push the target to build foreign headers into tools and xen
directories. This allows those directories to be built independently
without relying on the toplevel Makefile.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Tue Jan 30 13:46:48 2007 +0000 (2007-01-30)
parents 583441e296a1
children daed6ac9d1f7
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) mk-foreign-headers
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: mk-foreign-headers
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 . )
53 mkdir -p xen/arch-x86
54 ( cd xen/arch-x86 && ln -sf ../../$(XEN_ROOT)/xen/include/public/arch-x86/*.h . )
55 mkdir -p xen/foreign
56 ( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.h . )
58 mk-foreign-headers:
59 make -C $(XEN_ROOT)/xen/include/public/foreign
61 mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS)