ia64/xen-unstable

view xen/Makefile @ 17062:0769835cf50f

x86 shadow: Reduce scope of shadow lock.

emulate_map_dest doesn't require holding lock, since
only shadow related operation possibly involved is to
remove shadow which is less frequent and can acquire
lock inside. Rest are either guest table walk or
per-vcpu monitor table manipulation

Signed-off-by Kevin Tian <kevin.tian@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 14 10:33:12 2008 +0000 (2008-02-14)
parents b9004e222fde
children b2e28707ecbb
line source
1 # This is the correct place to edit the build version.
2 # All other places this is stored (eg. compile.h) should be autogenerated.
3 export XEN_VERSION = 3
4 export XEN_SUBVERSION = 3
5 export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION)
6 export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
7 -include xen-version
9 export BASEDIR := $(CURDIR)
11 .PHONY: default
12 default: build
14 .PHONY: dist
15 dist: install
17 .PHONY: build install clean distclean cscope TAGS tags MAP
18 build install debug clean distclean cscope TAGS tags MAP::
19 $(MAKE) -f Rules.mk _$@
21 .PHONY: _build
22 _build: $(TARGET).gz
24 .PHONY: _install
25 _install: $(TARGET).gz
26 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
27 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
28 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
29 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
30 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
31 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
33 .PHONY: _debug
34 _debug:
35 objdump -D -S $(TARGET)-syms > $(TARGET).s
37 .PHONY: _clean
38 _clean: delete-unfresh-files
39 $(MAKE) -C tools clean
40 $(MAKE) -f $(BASEDIR)/Rules.mk -C include clean
41 $(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
42 $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
43 $(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
44 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
45 rm -f include/asm *.o $(TARGET)* *~ core
46 rm -f include/asm-*/asm-offsets.h
48 .PHONY: _distclean
49 _distclean: clean
50 rm -f tags TAGS cscope.files cscope.in.out cscope.out cscope.po.out
52 $(TARGET).gz: $(TARGET)
53 gzip -f -9 < $< > $@.new
54 mv $@.new $@
56 $(TARGET): delete-unfresh-files
57 $(MAKE) -C tools
58 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
59 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
60 $(MAKE) -f $(BASEDIR)/Rules.mk -C include
61 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s
62 $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h
63 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)
65 # drivers/char/console.o contains static banner/compile info. Blow it away.
66 # Don't refresh these files during e.g., 'sudo make install'
67 .PHONY: delete-unfresh-files
68 delete-unfresh-files:
69 @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
70 rm -f include/xen/compile.h; \
71 fi
73 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
74 include/xen/compile.h: include/xen/compile.h.in
75 @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
76 -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
77 -e 's/@@whoami@@/$(USER)/g' \
78 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
79 -e 's/@@hostname@@/$(shell hostname)/g' \
80 -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep -i "gcc.*version")!g' \
81 -e 's/@@version@@/$(XEN_VERSION)/g' \
82 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
83 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
84 -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} {rev}:{node|short}" >/dev/null && hg parents --template "{date|date} {rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
85 < include/xen/compile.h.in > $@.new
86 tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) >> $@.new
87 @mv -f $@.new $@
89 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
90 @(set -e; \
91 echo "/*"; \
92 echo " * DO NOT MODIFY."; \
93 echo " *"; \
94 echo " * This file was auto-generated from $<"; \
95 echo " *"; \
96 echo " */"; \
97 echo ""; \
98 echo "#ifndef __ASM_OFFSETS_H__"; \
99 echo "#define __ASM_OFFSETS_H__"; \
100 echo ""; \
101 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
102 echo ""; \
103 echo "#endif") <$< >$@
105 SUBDIRS = xsm arch/$(TARGET_ARCH) common drivers
106 define all_sources
107 ( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \
108 find include -name 'asm-*' -prune -o -name '*.h' -print; \
109 find $(SUBDIRS) -name '*.[chS]' -print )
110 endef
112 define set_exuberant_flags
113 exuberant_flags=`$1 --version 2>/dev/null | grep -iq exuberant && \
114 echo "-I __initdata,__exitdata,__acquires,__releases \
115 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
116 --extra=+f --c-kinds=+px"`
117 endef
119 .PHONY: _TAGS
120 _TAGS:
121 set -e; rm -f TAGS; \
122 $(call set_exuberant_flags,etags); \
123 $(all_sources) | xargs etags $$exuberant_flags -a
125 .PHONY: _tags
126 _tags:
127 set -e; rm -f tags; \
128 $(call set_exuberant_flags,ctags); \
129 $(all_sources) | xargs ctags $$exuberant_flags -a
131 .PHONY: _cscope
132 _cscope:
133 $(all_sources) > cscope.files
134 cscope -k -b -q
136 .PHONY: _MAP
137 _MAP:
138 $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map
140 .PHONY: FORCE
141 FORCE:
143 %.o %.i: %.c FORCE
144 $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
146 %.o %.s: %.S FORCE
147 $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
149 %/: FORCE
150 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o